Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add eslint:recommended to a usage example #591

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 3 commits into from
Jun 6, 2019

Conversation

borekb
Copy link
Contributor

@borekb borekb commented Jun 5, 2019

Resolves #588.

@ThomasdenH
Copy link
Contributor

ThomasdenH commented Jun 5, 2019

The recommended set is not entirely suitable for Typescript. Have a look at packages/eslint-plugin/src/configs, there is a configuration that fixes that. It'd be great if you could add "plugin:@typescript-eslint/eslint-recommended", since it clearly isn't documented well enough.

@borekb
Copy link
Contributor Author

borekb commented Jun 5, 2019

@ThomasdenH Good points, thanks! Will look into it later today.

@borekb
Copy link
Contributor Author

borekb commented Jun 5, 2019

@ThomasdenH I tried to experiment with how various configs behave on our codebase and it lead me to create #592. Will happily document integration with eslint:recommended once it's clear to me how it's best done.

@bradzacher
Copy link
Member

bradzacher commented Jun 5, 2019

The best integration would be:

[
  'eslint:recommended',
  // airbnb, etc
  'plugin:@typescript-eslint/eslint-recommended',
  'plugin:@typescript-eslint/recommended'
  // prettier, etc
]

@borekb
Copy link
Contributor Author

borekb commented Jun 5, 2019

Great! Would you put it to the basic Usage section or dedicate a new one to it?

Another option is to link to eslint-plugin/src/configs which already has a good README about the various configs and probably a better chance to stay up to date :)

@bradzacher
Copy link
Member

I would say this should probably do a few things.
I doubt we'll add any more "recommended" style configs, and the configs readme is more there so I can direct people to it when they get their knickers in a knot over the recommended ruleset :)

Could you please do the following.

  • change the wording from
- You can also enable all the recommended rules at once. Add `plugin:@typescript-eslint/recommended` in extends:
+ You can also enable all the recommended rules for our plugin. Add `plugin:@typescript-eslint/recommended` in extends:
  • add a new "section" below that along the lines of
You can also use eslint recommended with this plugin. Add both `eslint:recommended ` and `plugin:@typescript-eslint/eslint-recommended`:
[
  'eslint:recommended',
  'plugin:@typescript-eslint/eslint-recommended',
  'plugin:@typescript-eslint/recommended'
]

@borekb
Copy link
Contributor Author

borekb commented Jun 6, 2019

@bradzacher great suggestions, thank you! Updated in 2e6f60e.

@bradzacher bradzacher added the documentation Documentation ("docs") that needs adding/updating label Jun 6, 2019
@bradzacher bradzacher merged commit c03b6ed into typescript-eslint:master Jun 6, 2019
@borekb borekb deleted the patch-1 branch June 6, 2019 15:48
@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
documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mention eslint:recommended in eslint-plugin's README?
3 participants