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.
eslint
is common among JS stack, and integrations with editors / precommit-hooks are ubiquitous. Removing this layer of abstraction will simplify howeslint
is used throughoutember-cli
. Most editors have plugins available foreslint
, and as long as the.eslint.rc
is not removed, we should still see the benefits ofeslint
in our Ember projects. - Hacks required to support features such as PR #122 broccoli-lint-eslint
Detailed design
- Change blueprint to pull in
eslint
as opposed toember-cli-eslint
underdevDependencies
. - Provide documentation on
eslint
and 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-eslint
alone
Unresolved questions
N/A