lynt icon indicating copy to clipboard operation
lynt copied to clipboard

Add --plugin functionality to add extra TSLint or ESLint plugins

Open saadq opened this issue 7 years ago • 0 comments

v0.4 allows for rule overrides, however the only rules you can add on are the standard ESLint/TSLint rules as well as rules for the plugins that are shipped with lynt (eslint-plugin-flowtype, eslint-plugin-react, tslint-microsoft-contrib, and tslint-react).

What would need to be done:

  • [ ] Add a plugins field to the Options interface which would be string | Array<string>
  • [ ] Add a plugin flag to the CLI (with a plugins alias and update the help text)
  • [ ] Check if plugins exists on the options object for both ESLint and TSLint. If it exists, combine options.plugins with config.plugins.
  • [ ] Add a test in tests/config.ts (for both ESLint and TSLint) to make sure that the output config does contain options.plugins.
  • [ ] Add a test for both ESLint and TSLint in tests/api.ts that calls lynt with plugins and rules (rules from the plugin) passed to options. You can look at the other test cases as reference.

Let me know if anyone would be interested in taking this on! I'd be happy to help along the way.

saadq avatar Jun 22 '18 01:06 saadq