Summary
Remove https://github.com/ember-cli/ember-cli-eslint from projects generated by
ember-cli.
ember-cli-eslint is an addon
designed to show lint errors during test runs. Tooling around eslint has
improved enough where this feature may no longer be necessary.
To be clear, the proposal is not to remove linting in tests. It is to follow the rest of JavaScript community and follow the standard tooling process.
There are multiple ways to run eslint:
- Integration with editors
- Utilize precommit hooks with
eslint - Support a standard way to run
eslint(such asyarn lint:js)
We can also discuss configuring testem to automatically run eslint as part
of yarn test
Motivation
- Improve our build speed
- Simplicity.
eslintis common among JS stack, and integrations with editors / precommit-hooks are ubiquitous. Removing this layer of abstraction will simplify howeslintis used throughoutember-cli. Most editors have plugins available foreslint, and as long as the.eslint.rcis not removed, we should still see the benefits ofeslintin our Ember projects. - Hacks required to support features such as PR #122 broccoli-lint-eslint
Detailed design
- Change blueprint to pull in
eslintas opposed toember-cli-eslintunderdevDependencies. - Provide documentation on
eslintand editor integration as well as precommit hooks
Redefine npm test or yarn test (depending on whether the --yarn option was
used to create project) to
ember test && npm run lint:js && npm run lint:hbs
and
ember test && yarn lint:js && yarn lint:hbs
How We Teach This
Providing documentation regarding how to run linting should suffice as well as documentation to editor integration.
Deleting abstractions and going towards a explicit path, eslint within the
ember-cli ecosystem becomes easier to teach.
Drawbacks
- No console warnings during builds
- lint failures are no longer included in browser tests
Alternatives
- Leave
ember-cli-eslintalone
Unresolved questions
N/A