Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

chore: Add ESLint config from sentry-javascript#327

Merged
Lms24 merged 2 commits intomainfrom
lms-eslint
Nov 23, 2022
Merged

chore: Add ESLint config from sentry-javascript#327
Lms24 merged 2 commits intomainfrom
lms-eslint

Conversation

@Lms24
Copy link
Copy Markdown
Member

@Lms24 Lms24 commented Nov 22, 2022

This PR adds the ESLint config from the JS SDK monorepo by tmp-adding the @sentry-internal/eslint-config-sdk as a dev dependency. Furthermore, this PR replaces the .eslintrc.js with the root .eslintrc of the monorepo and adds a few changes to it. Overall, our ESLint config should right now conform with the monorepo's, albeit with a few temporarily added rule exceptions.

I mostly deactivated rules that were complicated to apply right now or required deeper understanding of the code base. I applied auto-fixable changes and applied some quick and easy rules manually afterwards. Mostly stuff like return values or missing type declarations.

Going forward, once we migrated to the monorepo, we have to:

  • Remove the dev-dependency again (not necessary in the monorepo)
  • Extract the marked parts in the eslintrc.js and discard the rest of that file
  • Re-acrivate rules one-by-one
  • Remove ts-ignores and eslint-ignores from the files and properly fix the violations

The first commit contains the config changes, the second one the resulting code changes. We'll merge this PR without squashing to preserve both steps to update old PRs/branches more easily.

ref #311

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 22, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
build/npm/index.js 34.95 KB (+0.35% 🔺) 699 ms (+0.35% 🔺) 39 ms (-60.56% 🔽) 738 ms

@Lms24 Lms24 marked this pull request as draft November 22, 2022 17:09
@Lms24
Copy link
Copy Markdown
Member Author

Lms24 commented Nov 22, 2022

Just noticed that there are more type errors in the tests. Will take a look tomorrow and mark this PR as ready to review afterwards.

@Lms24 Lms24 marked this pull request as ready for review November 23, 2022 09:35
@Lms24 Lms24 requested a review from mydea November 23, 2022 09:35
@Lms24 Lms24 merged commit 20e1651 into main Nov 23, 2022
@Lms24 Lms24 deleted the lms-eslint branch November 23, 2022 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants