-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ESLint): Migrate to flatConfig
- Loading branch information
1 parent
45ba41c
commit fd7b693
Showing
8 changed files
with
128 additions
and
48 deletions.
There are no files selected for viewing
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
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,60 @@ | ||
import nextPlugin from "@next/eslint-plugin-next"; | ||
import tsPlugin from "@typescript-eslint/eslint-plugin"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import importPlugin from "eslint-plugin-import"; | ||
import reactCompiler from 'eslint-plugin-react-compiler' | ||
|
||
export default [ | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
parser: tsParser, | ||
parserOptions: { | ||
project: "./tsconfig.json" | ||
} | ||
}, | ||
plugins: { | ||
"@typescript-eslint": tsPlugin, | ||
"import": importPlugin, | ||
"@next/next": nextPlugin, | ||
'react-compiler': reactCompiler, | ||
}, | ||
files: ["**/*.{js,jsx,ts,tsx}"], | ||
settings: { | ||
"import/resolver": { | ||
"typescript": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"node": true | ||
} | ||
}, | ||
rules: { | ||
...nextPlugin.configs["core-web-vitals"].rules, | ||
...nextPlugin.configs["recommended"].rules, | ||
...tsPlugin.configs["strict"].rules, | ||
...tsPlugin.configs["stylistic"].rules, | ||
...importPlugin.configs["recommended"].rules, | ||
...importPlugin.configs["typescript"].rules, | ||
'react-compiler/react-compiler': 'warn', | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
]; |
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
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