Skip to content
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: Use '@typescript-eslint/parser' for ESLint #985

Merged
merged 3 commits into from
Jan 27, 2021

Conversation

smockle
Copy link
Member

@smockle smockle commented Jan 26, 2021

Follow-up to #959
Part of #970

The current ESLint configuration surfaces many false negatives (“before” screenshot below). By adopting configuration and tooling closer to that used in the main GitHub repo and by GitHub’s React projects (which use @typescript-eslint/parser), only valid errors remain (“after” screenshot below).

Screenshots

Before After
before after

Merge checklist

  • [-] Added or updated TypeScript definitions (index.d.ts) if necessary
  • [-] Added/updated tests
  • [-] Added/updated documentation
  • [-] Tested in Chrome
  • [-] Tested in Firefox
  • [-] Tested in Safari
  • [-] Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2021

⚠️ No Changeset found

Latest commit: e1e17d3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/ahermp2w9
✅ Preview: https://primer-components-git-typescript-eslint-parser.primer.vercel.app

Copy link

@bscofield bscofield left a comment

Choose a reason for hiding this comment

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

👍 🙇

@colebemis
Copy link
Contributor

Interesting, a lot of the linting errors are coming from no-shadow which is disabled in the config 🤔

@vercel vercel bot temporarily deployed to Preview January 27, 2021 16:10 Inactive
@smockle
Copy link
Member Author

smockle commented Jan 27, 2021

Interesting, a lot of the linting errors are coming from no-shadow which is disabled in the config 🤔

Fixed in 2214db8. TIL rule overrides (like the existing "no-shadow": 0) must be in the same block as the extends’d ruleset they override (which I’d moved).

@vercel vercel bot temporarily deployed to Preview January 27, 2021 16:14 Inactive
@smockle smockle merged commit 8751b43 into main Jan 27, 2021
@smockle smockle deleted the typescript-eslint-parser branch January 27, 2021 16:19
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.

3 participants