-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(eslint): Consolidate initial set of packages #4102
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
Conversation
Certain packages (browser, react, nextjs, serverless, node) skipped as they are more involved.
c6f40de
to
0a7eb08
Compare
size-limit report
|
env: { | ||
es6: true, | ||
browser: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
jsx: 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.
By looking at the changes (specially env
), I assume the entries that exist in the parent configuration are overridden (you can't extend them and you need to define the whole entry), is this correct? If yes, does having jsx
here make any difference? If no, there are some entires in env
that are duplicated from the parent config file.
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.
as per https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files, extending merges the entries, will make changes as appropriate.
@@ -1,3 +1,4 @@ | |||
/* eslint-disable max-lines */ |
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.
Why is this exception required? Isn't the rule inherited?
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.
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.
Potentially this should be a separate PR, but I'd love to see us turn that rule back on and actually split up those files so they're easier to work with.
Co-authored-by: iker barriocanal <32816711+iker-barriocanal@users.noreply.github.com>
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.
Two small comments, but otherwise LGTM!
'examples/**', | ||
'scripts/**', | ||
'test/manual/**', |
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'll admit IDK how far off these are from being compliant with our eslint rules, but is there a reason we wouldn't want to keep them in line with everything else?
.eslintrc.js
Outdated
'build/**', | ||
'dist/**', | ||
'esm/**', | ||
'cjs/**', |
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.
Where do we have this in the repo? (To be clear, I'm talking about the 'cjs/**'
.)
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 grabbed these from Kamil's v7 branch - I'll change it so it matches our current setup better (same applies for the test/manual/**
stuff above.
Create a central
.eslintrc.js
that every individual package should extend from. Certain packages (react, nextjs, node, browser) were skipped as they are more involved.