-
Notifications
You must be signed in to change notification settings - Fork 16
chore(lint): Migrate to ESLint V9. #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
28f5d6a
Add new ESLint configuration and fix lint issues.
junhaoliao 8685095
Update dependencies.
junhaoliao 02c8fee
Merge remote-tracking branch 'yscope/main' into new-eslint
junhaoliao 881a6cf
Fix lint failures.
junhaoliao 8ffbdaf
Add `globals` as a direct dev dependency and lock `typescript-eslint`…
junhaoliao 2d6dc7e
Remove TypeScript-ESLint override from package.json.
junhaoliao 9bb70e4
Upgrade `eslint-config-yscope` to version 1.1.0 in `package-lock.json…
junhaoliao 9ccd755
Avoid upgrading other dependencies.
junhaoliao 8581d18
Merge branch 'main' into new-eslint
junhaoliao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.