-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): Migrate to ESLint V9. (#161)
- Upgrade eslint-config-yscope to v1.1.0 and fix lint issues.
- Loading branch information
1 parent
a8b8da7
commit 3edb817
Showing
40 changed files
with
1,746 additions
and
1,166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import CommonConfig from "eslint-config-yscope/CommonConfig.mjs"; | ||
import JestConfig from "eslint-config-yscope/JestConfig.mjs"; | ||
import ReactConfigArray from "eslint-config-yscope/ReactConfigArray.mjs"; | ||
import StylisticConfigArray from "eslint-config-yscope/StylisticConfigArray.mjs"; | ||
import TsConfigArray from "eslint-config-yscope/TsConfigArray.mjs"; | ||
import Globals from "globals"; | ||
|
||
|
||
const EslintConfig = [ | ||
{ | ||
ignores: [ | ||
"dist/", | ||
"node_modules/", | ||
], | ||
}, | ||
CommonConfig, | ||
...TsConfigArray, | ||
...StylisticConfigArray, | ||
...ReactConfigArray, | ||
{ | ||
rules: { | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
paths: [ | ||
{ | ||
message: "Please use path imports and name your imports with postfix " + | ||
"\"Icon\" to avoid confusions.", | ||
name: "@mui/icons-material", | ||
}, | ||
], | ||
patterns: [ | ||
{ | ||
group: [ | ||
"@mui/joy/*", | ||
"!@mui/joy/styles", | ||
], | ||
message: "Please use the default import from \"@mui/joy\" instead.", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ["webpack.*.js"], | ||
languageOptions: { | ||
globals: { | ||
...Globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["test/**/*"], | ||
...JestConfig, | ||
}, | ||
]; | ||
|
||
|
||
export default EslintConfig; |
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
Oops, something went wrong.