digitalbazaar / eslint-config-digitalbazaar

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Multiple configs and more plugins #2

Open davidlehn opened 5 years ago

davidlehn commented 5 years ago

Look into how to best provide multiple configs and plugins. I'm guessing composing based on use case may be better than a kitchen sink approach? client vs server seems used in a few spots, like here: https://github.com/thenativeweb/eslint-config-es

We also want support for mocha and vue as needed.

There are a thousand plugins and rules we may want to use to improve code quality. Some starting points:

aljones15 commented 5 years ago

multiple configs is pretty simple:

https://eslint.org/docs/user-guide/configuring#using-eslintrecommended

just add a new file next to index.js then reference it via a/ so in extends: ['eslint-config-digitalbazaar/vue']

aljones15 commented 5 years ago

This is just so this isn't lost (have way more pressing issues than a new eslint plugin today): eslint-plugin-import lints es6 import export statements letting us compose rules on how we want to import and export modules in addition to one very valuable feature with is no-unresolved which actually checks that the paths in imports match up to real files and then can also be configured to make sure the imported name matches an exported name in the module.

I made a list of proposed rules for this here.