-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create initial config for eslint v9 Signed-off-by: Kangrui Johann Ye <[email protected]> * include config for eslint and typescript eslint Signed-off-by: Kangrui Johann Ye <[email protected]> * fix build Signed-off-by: Kangrui Johann Ye <[email protected]> * bump version Signed-off-by: Kangrui Johann Ye <[email protected]> --------- Signed-off-by: Kangrui Johann Ye <[email protected]>
- Loading branch information
1 parent
6824f71
commit da60a0f
Showing
18 changed files
with
692 additions
and
440 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
import tseslint from 'typescript-eslint'; | ||
import {includeIgnoreFile} from '@eslint/compat'; | ||
import {dirname, resolve} from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
import { config } from '@cloudflight/eslint-plugin-typescript'; | ||
|
||
const filename = fileURLToPath(import.meta.url); | ||
const directory = dirname(filename); | ||
const gitignorePath = resolve(directory, '.gitignore'); | ||
|
||
export default tseslint.config( | ||
includeIgnoreFile(gitignorePath), | ||
{ | ||
// these files are temporarily disabled for linting | ||
// until we are done with migrating everything to v9 | ||
ignores: [ | ||
'packages/eslint-plugin-angular/*', | ||
'packages/eslint-plugin-node/*', | ||
'packages/eslint-plugin-react/*', | ||
'packages/eslint-plugin-vue/*', | ||
'packages/eslint-plugin-typescript/src/configs/index.ts', | ||
'packages/eslint-plugin-typescript/src/configs/recommended/*', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-json/*', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-package/*', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-typescript/recommended-typescript.config.ts', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-typescript/rules/custom.ts', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-typescript/rules/format.ts', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-typescript/rules/import.ts', | ||
'packages/eslint-plugin-typescript/src/configs/recommended-typescript/rules/rxjs.ts', | ||
'packages/eslint-plugin-typescript/src/rules/*', | ||
'packages/eslint-plugin-typescript/src/util/*', | ||
'scripts/*', | ||
'.eslintrc.format.js', | ||
'eslint.config.mjs', | ||
] | ||
}, | ||
...config, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json', './packages/*/tsconfig.spec.json'], | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}, | ||
); |
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
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
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
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,2 +1,23 @@ | ||
export {configs} from './configs'; | ||
export {rules} from './rules'; | ||
import pluginJs from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import {eslintRules} from './configs/recommended-typescript/rules/eslint'; | ||
import {typescriptEslintRules} from './configs/recommended-typescript/rules/typescript-eslint'; | ||
|
||
export const config = tseslint.config( | ||
{ | ||
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'], | ||
ignores: ['jest.config*.ts'], | ||
extends: [ | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
], | ||
rules: { | ||
...eslintRules, | ||
...typescriptEslintRules, | ||
} | ||
}, | ||
{ | ||
files: ['**/*.{js,mjs,cjs}'], | ||
extends: [tseslint.configs.disableTypeChecked], | ||
}, | ||
); |
Oops, something went wrong.