-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
chore: migrate eslint to flat config #2212
base: main
Are you sure you want to change the base?
Conversation
const SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/ | ||
const SOURCE_FRAME = /[/\\]msw[/\\]src[/\\](.+)/ | ||
|
||
const BUILD_FRAME = | ||
/(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/ | ||
/(node_modules)?[/\\]lib[/\\](core|browser|node|native|iife)[/\\]|^[^/\\]*$/ |
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.
For this and other regex, eslint warned of unnecessary escape.
@@ -160,6 +160,7 @@ async function getGraphQLInput(request: Request): Promise<GraphQLInput | null> { | |||
variables, | |||
} | |||
} | |||
return null |
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.
Missing fallthrough lint warning (with new rules).
Happy to move this to an ignore and then address this separately
@@ -0,0 +1,59 @@ | |||
// @ts-check |
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.
Is there any chance the config can be written in TypeScript?
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.
It can indeed. Although only through an unstable_ flag in eslint. see here
Pull in the unstable flag (and jiti dev dependency) or leave as js?
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.
Hey @kettanaito, Would you be happy to implement in this way?
I have fixed some suggestions based on recommended lint rules from the newer version of eslint and tseslint, not sure they are all entirely correct!