Skip to content

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

Merged
merged 8 commits into from
Nov 2, 2021
Merged

Conversation

AbhiPrasad
Copy link
Member

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.

  • Refactoring each eslint file: 026e6e0
  • Fixing or ignoring things that broke when rules were changed: 11ff81d

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad
Certain packages (browser, react, nextjs, serverless, node) skipped
as they are more involved.

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.47 KB (0%)
@sentry/browser - Webpack 23.35 KB (0%)
@sentry/react - Webpack 23.38 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.92 KB (0%)

env: {
es6: true,
browser: true,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
jsx: true,
},
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

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.

AbhiPrasad and others added 2 commits October 29, 2021 13:10

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: iker barriocanal <32816711+iker-barriocanal@users.noreply.github.com>

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad
Copy link
Member

@lobsterkatie lobsterkatie left a 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!

Comment on lines +16 to +18
'examples/**',
'scripts/**',
'test/manual/**',
Copy link
Member

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/**',
Copy link
Member

@lobsterkatie lobsterkatie Oct 29, 2021

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/**'.)

Copy link
Member Author

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.

Verified

This commit was signed with the committer’s verified signature.
AbhiPrasad Abhijeet Prasad
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) November 2, 2021 11:48
@AbhiPrasad AbhiPrasad merged commit d136f4e into master Nov 2, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-eslint-ref branch November 2, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants