-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new ESLint configuration and fix lint issues.
- Loading branch information
1 parent
af322a6
commit c51305b
Showing
38 changed files
with
1,241 additions
and
1,271 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,59 @@ | ||
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"; | ||
|
||
|
||
const EslintConfig = [ | ||
{ | ||
ignores: [ | ||
"dist/", | ||
"node_modules/", | ||
], | ||
}, | ||
CommonConfig, | ||
...TsConfigArray.map( | ||
(config) => ({ | ||
files: [ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
], | ||
...config, | ||
}) | ||
), | ||
...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: ["test/**/*"], | ||
...JestConfig, | ||
}, | ||
]; | ||
|
||
|
||
export default EslintConfig; |
Oops, something went wrong.