Skip to content
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

Merged
merged 5 commits into from
May 27, 2024
Merged

ESLint update #3977

merged 5 commits into from
May 27, 2024

Conversation

chrmod
Copy link
Member

@chrmod chrmod commented May 24, 2024

No description provided.

@chrmod chrmod requested a review from remusao as a code owner May 24, 2024 20:19
@remusao remusao added the PR: Internal 🏠 Changes only affect internals label May 24, 2024
@chrmod chrmod marked this pull request as draft May 24, 2024 20:34
@chrmod
Copy link
Member Author

chrmod commented May 24, 2024

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.

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.

Copy link
Member Author

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!

@chrmod chrmod marked this pull request as ready for review May 27, 2024 16:33
"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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not stable yet?

Copy link
Member Author

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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

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

Comment on lines +22 to +35
'@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',
Copy link
Collaborator

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

Copy link
Member Author

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
Copy link
Collaborator

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?

Copy link
Member Author

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

@chrmod chrmod merged commit 177dabe into master May 27, 2024
3 checks passed
@chrmod chrmod deleted the eslint-update branch May 27, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Internal 🏠 Changes only affect internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants