-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate to eslint.config.ts and format code
- Loading branch information
Showing
14 changed files
with
78 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { getDirname, path } from 'vuepress/utils' | ||
|
||
const DIRNAME = getDirname(import.meta.url) | ||
const __dirname = getDirname(import.meta.url) | ||
|
||
export const fooPlugin = { | ||
name: 'test-plugin', | ||
clientConfigFile: path.resolve(DIRNAME, './nonDefaultExportClientConfig.js'), | ||
clientConfigFile: path.resolve( | ||
__dirname, | ||
'./nonDefaultExportClientConfig.js', | ||
), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import path from 'node:path' | ||
import { vuepress } from 'eslint-config-vuepress' | ||
import { PACKAGES, ROOT } from './scripts/constants.js' | ||
|
||
export default vuepress( | ||
{ | ||
imports: { | ||
packageDir: [ | ||
ROOT, | ||
path.resolve(ROOT, 'e2e'), | ||
...PACKAGES.map((item) => path.resolve(ROOT, `packages/${item}`)), | ||
], | ||
}, | ||
javascript: { | ||
overrides: { | ||
'no-underscore-dangle': [ | ||
'warn', | ||
{ | ||
allow: [ | ||
'__dirname', | ||
'_context', | ||
'_pageChunk', | ||
'_registeredComponents', | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
vue: { | ||
overrides: { | ||
'no-useless-assignment': 'off', // TODO: false positive in vue sfc | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ['**/tests/**'], | ||
rules: { | ||
'import/no-unresolved': 'off', | ||
'no-console': 'off', | ||
'prefer-template': 'off', | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type { ClientConfig } from '../clientConfig.js' | ||
|
||
declare module '@internal/clientConfigs' { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export const clientConfigs: ClientConfig[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import fs from 'node:fs' | ||
import path from 'node:path' | ||
import { fileURLToPath } from 'node:url' | ||
|
||
export const ROOT = path.resolve(fileURLToPath(import.meta.url), '../..') | ||
export const PACKAGES = fs.readdirSync(path.resolve(ROOT, 'packages')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters