-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Use eslint v9 flat config #699
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you for your contribution. We will check and reply to you as soon as possible.
Let's remove also: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore from // eslint-disable-next-line
// @ts-ignore from and check all |
Okay, I'll make those changes now |
@plbstl Let's rebase ASAP, you'll avoid more conflicts, because i'm working on other new things 😄 |
For the recent changes in #697, I was thinking |
@plbstl Are you able to set this |
I checked the source code, the option is only available as a CLI flag |
Replaced It also has an additional rule |
@plbstl You've merge main wrongly, because i see unnecessary files(which shouldn't be shown as change here) in And you have a lot of conflicts, let's solve it |
@PatrykKuniczak The conflicts have now been resolved |
First of all, eslint config wasn't found be IDE {
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Chrome Extension Utils",
"extends": "./packages/tsconfig/base.json",
"compilerOptions": {
"noEmit": false
},
"include": ["eslint.config.ts"]
} and "ready": "tsc -p eslint.tsconfig.json && turbo ready" for And after all we have this warns, which are the problem, why we not decide to bump I think this PR is overkill for that simply solution as eslint is. PS: After bundle this |
Can you tell me the name of the IDE? The repo does not contain any config files for IDEs. You have to instruct the specific IDE eslint plugin to load the config. Just as discussed in #699 (comment)
Same goes for I don't know where the Since |
You've pinned This PR in I have been using WebStorm |
This is what I meant to link to: |
@plbstl In the future, you can It's easier to navigate by everybody, because it creates clickable link 😄 |
@plbstl Let's rebase branch |
Thank you, that's what I did but for some reason it added a search param for a
|
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.
All your imports:
import * as anything from "anything"
should be:
import anything from "anything"
If it doesn't work you don't include
or set types
in tsconfig properly
It works. Its just that eslint shows a warning for the Should I change it back and turn off the rule? Or change the imports to named imports? Or something else? |
Maybe set it off, because we're using default imports |
The change works for Going through the esbuild docs, the examples I see uses a |
@plbstl You're right, because no default is exported from there :) Leave it, in the way you've done it But there's greater problem. my IDE still can't find config, because of Or use If yes, then add PS: With second approach, we can have 100% ts coverage, maybe it's worth efford 😄 |
eslint-vscode does not show issues
type=module is present in package.json
…-boilerplate-react-vite into migrate-to-eslint-v9
prettier's default `--ignore-path` is `[.gitignore, .prettierignore]`
2a01c21
to
49e6002
Compare
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.
I've resolve conflicts, and add 1 missing types, but theres still some work:
As you can see, there's a bunch of warns:
Let's fix it, but:
https://github.com/iamturns/eslint-config-airbnb-typescript
Isn't longer supported, you need to find sth else, which supporting eslint v9
eslint-config-airbnb-base
is also have last update 3 years ago
eslint-plugin-import
is still as a peer deps
And there's missing types:
Let's try to find solution, because we don't want to merge it, becasue of potential problems with deps, we want to avoid it, that's why we don't decided to implement it for now, but i hope you're able to fix it.
PS: For reproduce that error try e.g. pnpm add -D nodemon -w
@plbstl Are you working on it? |
Priority*
Purpose of the PR*
Use eslint version 9 flat config.
Changes*
This PR upgrades
eslint
to version 9 and uses the flat config.How to check the feature
Add code that warns or errors when
eslint
is set up correctly.Reference