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

feat: add internal eslint plugin for repo-specific lint rules #1373

Merged
merged 7 commits into from Dec 24, 2019

Conversation

bradzacher
Copy link
Member

@bradzacher bradzacher commented Dec 23, 2019

There's a few things I want to enforce internally.
Save us from having to communicate these things in PR reviews.

  • ensuring people don't do import ts from 'typescript' in packages.
    • this breaks compat with users that don't use allowSyntheticDefaultImports
  • ensuring people don't accidentally do import {} from '@typescript-eslint/typescript-estree' from the plugins, where the package isn't a dependency.
    • this breaks encapsulation, and will cause problems if we move things around in future

Adding this in now reduces the barrier to entry, meaning we can easily add rules to warn against patterns we see people do in the future.

@bradzacher bradzacher added the enhancement New feature or request label Dec 23, 2019
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher marked this pull request as ready for review December 23, 2019 03:52
@codecov
Copy link

codecov bot commented Dec 23, 2019

Codecov Report

Merging #1373 into master will decrease coverage by 0.04%.
The diff coverage is 92.42%.

@@            Coverage Diff             @@
##           master    #1373      +/-   ##
==========================================
- Coverage   94.09%   94.04%   -0.05%     
==========================================
  Files         133      139       +6     
  Lines        5940     5975      +35     
  Branches     1685     1691       +6     
==========================================
+ Hits         5589     5619      +30     
- Misses        187      192       +5     
  Partials      164      164
Impacted Files Coverage Δ
...lint-plugin/src/rules/prefer-nullish-coalescing.ts 98.07% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/require-await.ts 100% <ø> (ø) ⬆️
packages/eslint-plugin-internal/src/index.ts 0% <0%> (ø)
packages/eslint-plugin-internal/src/rules/index.ts 0% <0%> (ø)
...ackages/eslint-plugin/src/rules/prefer-includes.ts 100% <100%> (ø) ⬆️
...estree/src/create-program/createIsolatedProgram.ts 75% <100%> (ø) ⬆️
...pt-estree/src/create-program/createWatchProgram.ts 92.3% <100%> (ø) ⬆️
...-plugin/src/rules/no-unnecessary-type-arguments.ts 92% <100%> (ø) ⬆️
packages/eslint-plugin/src/util/types.ts 82.47% <100%> (ø) ⬆️
packages/eslint-plugin-internal/src/util/index.ts 100% <100%> (ø)
... and 31 more

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants