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

Add eslint-recommended #488

Merged
merged 4 commits into from May 7, 2019

Conversation

ThomasdenH
Copy link
Contributor

Closes #477.

This PR adds a modifier for Typescript of eslint-recommended. It has its separate file, such that it and plugin:@typescript-eslint/recommended can be used independently. I have included reasoning for the rules in the configuration.

The goal of this configuration is to modify the recommended set of eslint rules to be usable with Typescript. This means excluding those rules that are already tested by the compiler, and including additional rules for idiomatic code that is always available in Typescript.

@bradzacher
Copy link
Member

bradzacher commented Apr 30, 2019

Not to be a pain, but please use JSON instead of YAML.
To keep things consistent across the repo :)

You could alternately use .js considering you want comments

@ThomasdenH
Copy link
Contributor Author

I changed it to .js!

@bradzacher
Copy link
Member

I'm an idiot, should have said - make it .ts, with an export default {....
Don't forget to run prettier over it.

You will have to import it in src/index.ts, otherwise eslint won't be able to find it.

@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #488 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
- Coverage   95.81%   95.76%   -0.06%     
==========================================
  Files          77       78       +1     
  Lines        3489     3491       +2     
  Branches      963      963              
==========================================
  Hits         3343     3343              
- Misses         51       53       +2     
  Partials       95       95
Impacted Files Coverage Δ
...es/eslint-plugin/src/configs/eslint-recommended.ts 0% <0%> (ø)
packages/eslint-plugin/src/index.ts 0% <0%> (ø) ⬆️

@ThomasdenH
Copy link
Contributor Author

I have changed the file to .ts. Only the coverage check wasn't successful.

@bradzacher bradzacher added enhancement New feature or request recommended-rules Discussion about recommended rule sets labels May 7, 2019
@bradzacher bradzacher merged commit 2600a9f into typescript-eslint:master May 7, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request recommended-rules Discussion about recommended rule sets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additions to eslint:recommended
4 participants