-
Notifications
You must be signed in to change notification settings - Fork 104
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
ESLint update #3977
ESLint update #3977
Conversation
Changes work fine in CI, but VSCode still don't recognise the new setup and is unable to provide eslint based suggestions. Need to figure it out before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but VSCode still don't recognise the new setup and is unable to provide eslint based suggestions
See microsoft/vscode-eslint#1644 for flat config support. I'm guessing you probably want to set something like eslint.experimental.useFlatConfig
/ eslint.useFlatConfig
in a .vscode/settings.json
and/or your editor user settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, fantastic! Many thanks!
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"lerna": "^8.0.0", | ||
"patch-package": "^8.0.0", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.4.5", | ||
"typescript-eslint": "8.0.0-alpha.16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not stable yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the way, but we can confirm it works typescript-eslint/typescript-eslint#8211
@@ -69,21 +69,21 @@ | |||
"format-fix": "prettier './packages/**/*.ts' --write" | |||
}, | |||
"devDependencies": { | |||
"@eslint/js": "^9.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the part of new setup - https://eslint.org/docs/latest/use/getting-started#manual-set-up
Perhaps we can remove other package from the package.json. Will check
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', | ||
'@typescript-eslint/no-duplicate-type-constituents': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to start fixing those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, had to add those as they came with the latest update of typescript-eslint
. will address this in separate PRs
"compilerOptions": { | ||
"types": ["@types/node"], | ||
"noEmit": true, | ||
"allowJs": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have javascript files in the source tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just for the eslint.config.js
No description provided.