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

Automatically load lint configurations based on imported packages #446

Open
ajafff opened this issue Oct 26, 2018 · 0 comments
Open

Automatically load lint configurations based on imported packages #446

ajafff opened this issue Oct 26, 2018 · 0 comments

Comments

@ajafff
Copy link
Member

ajafff commented Oct 26, 2018

microsoft/TypeScript#15589 (comment) presented the idea to introduce a concept similar to DefinitelyTyped but for lint rules/configurations. That means libraries can provide a lint configuration that is automatically picked up when importing that library. There should also be a community project that maintains lint configurations for libraries that don't ship a config file.

When importing a package:

  • looks up wotanrc property in package.json of the imported package which is expected to point to a file containing a linter config
  • looks up .wotanrc.* file in the root directory of the imported package
  • looks up package @<TBD>/<packageName>

If a file is found, it is used as configuration file for the currently linted file. TBD: should it override the user-provided config or is it unshifted to the array of base configs?

TBD:

  • property name in package.json
  • expected file name in root directory of imported package
  • name of scope for custom configurations
  • precedence of config files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant