-
Notifications
You must be signed in to change notification settings - Fork 9
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
Centralize and simplify ESLint config #62
Comments
I have considered exactly this. The question discussed at that time was to create a supporting lib much like WCSS. That way users can pull in this lib and pick-and-choose what additional 'directives' they want to use. This issue brings up a concern for a code dependency during development. For this specific issue, I have looked at using https://eslint.org/docs/developer-guide/shareable-configs in the past.
This one I looked into as well, but the use of esLint across the floor was amazing low and no one had good recommendations to start from. Doing a quick search, there are a few recommendation projects out there, but they are really out of date. |
Defining our own esLint is a very large task. Others like Google or AirBnB have done amazing work to define these rules. Is there a current style guide that we want to adopt? I feel that it will be impossible to create our own style guide until we draw a line in the sand and define a starting point. Currently, that starting point is the basic install of esLint. My vote is for using eslint-config-airbnb-base and starting there? And using this, does that then negate the need to store our config in the cloud? |
Using someone else's config as a base makes sense, since creating a style guide is a lot of work. I think it would still be good to store our config in a package/repo. That way there's one place to make updates. We'll likely want to override some settings and add stuff like lit-element linting. Unless we could have the config live in the generator and have it updated with the work done for #68? |
So the scenario is this.
I think for No.2 we need to go with the sharable config idea above so that updates can be pushed to each repo without having to manually update anything. |
See https://github.com/AlaskaAirlines/auro-eslint-config to support this update. |
# [3.0.0](v2.11.0...v3.0.0) (2021-05-17) ### Bug Fixes * **husky:** update husky script to reference correct linters script ([a469915](a469915)) ### Features * **dart-sass:** update to dart-sass from node-sass [#111](#111) ([f6aa3fe](f6aa3fe)) * **generator init api:** update generator to use a single name input [#93](#93) ([d90e5d4](d90e5d4)) * **v3.0:** add remote eslint support [#62](#62) ([d5df429](d5df429)) * **v3.0:** update default npm namespace to [@AuroDesignSystem](https://github.com/aurodesignsystem) ([fc6f24e](fc6f24e)) * **v3.0:** update stylelintrc for extended support [#83](#83) ([c63c572](c63c572)) * **v3.0:** update to support fixed attr by default [#108](#108) ([69e06c6](69e06c6)) ### BREAKING CHANGES * **generator init api:** This update changes the generator execution command. Removes supoprt for namespace argument and instead uses single namespace-name argument. * **v3.0:** This update will require that direct dependencies using the namespace will need to be updated prior to release. This update will redirect all new packages to be published in the new @AuroDesignSystem namespace.
# [3.0.0](v2.11.0...v3.0.0) (2021-05-17) ### Bug Fixes * **husky:** update husky script to reference correct linters script ([a469915](a469915)) ### Features * **dart-sass:** update to dart-sass from node-sass [#111](#111) ([f6aa3fe](f6aa3fe)) * **generator init api:** update generator to use a single name input [#93](#93) ([d90e5d4](d90e5d4)) * **v3.0:** add remote eslint support [#62](#62) ([d5df429](d5df429)) * **v3.0:** update default npm namespace to [@AuroDesignSystem](https://github.com/aurodesignsystem) ([fc6f24e](fc6f24e)) * **v3.0:** update stylelintrc for extended support [#83](#83) ([c63c572](c63c572)) * **v3.0:** update to support fixed attr by default [#108](#108) ([69e06c6](69e06c6)) ### BREAKING CHANGES * **generator init api:** This update changes the generator execution command. Removes supoprt for namespace argument and instead uses single namespace-name argument. * **v3.0:** This update will require that direct dependencies using the namespace will need to be updated prior to release. This update will redirect all new packages to be published in the new @AuroDesignSystem namespace.
Is your feature request related to a problem? Please describe.
Our ESLint config has way too many rules (200+ lines of rules in addition to the recommended config), including multiple deprecated rules and rules that are already off by default explicitly turned off. In addition, it's easy for the config to get out of sync between projects and when changes are made in one component's config they aren't made in the other component packages.
Describe the solution you'd like
We should put our ESLint config into it's own repo + package (eslint-config-auro?), so that changes can be made in one place and components simply have to extend the config and update to the latest package to get the changes.
This will also allow devs to open PRs/issues on the repo if they want to propose code style changes.
Describe alternatives you've considered
Extend someone else's config and don't maintain this ourselves. We'll probably want to make tweaks to it though, in which case we're back to the problem of making the same ESLint changes across 20 (and counting) components.
Additional context
Motivated by #61, a change we'll want to make across every component. Putting our ESLint config into a package should make this easier.
The text was updated successfully, but these errors were encountered: