This repository has been archived by the owner on Jan 20, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from sangm/master
[RFC] Replace ember-cli-eslint with the standard eslint
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
- Start Date: 2018-08-13 | ||
- RFC PR: (leave this empty) | ||
|
||
# Summary | ||
|
||
Remove https://github.com/ember-cli/ember-cli-eslint from projects generated by | ||
`ember-cli`. | ||
|
||
[ember-cli-eslint](https://github.com/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`: | ||
|
||
1. Integration with editors | ||
2. Utilize precommit hooks with `eslint` | ||
3. Support a standard way to run `eslint` (such as `yarn lint:js`) | ||
|
||
We can also discuss configuring `testem` to automatically run `eslint` as part | ||
of `yarn test` | ||
|
||
# Motivation | ||
|
||
1. Improve our build speed | ||
2. Simplicity. `eslint` is common among JS stack, and integrations with editors | ||
/ precommit-hooks are ubiquitous. Removing this layer of abstraction will | ||
simplify how `eslint` is used throughout `ember-cli`. Most editors have | ||
plugins available for `eslint`, and as long as the `.eslint.rc` is not | ||
removed, we should still see the benefits of `eslint` in our Ember projects. | ||
3. Hacks required to support features such as [PR #122 | ||
broccoli-lint-eslint](https://github.com/ember-cli/broccoli-lint-eslint/pull/122#discussion-diff-153937455R28) | ||
|
||
# Detailed design | ||
|
||
1. Change blueprint to pull in `eslint` as opposed to `ember-cli-eslint` under | ||
`devDependencies`. | ||
2. 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 | ||
|
||
1. No console warnings during builds | ||
2. lint failures are no longer included in browser tests | ||
|
||
# Alternatives | ||
|
||
1. Leave `ember-cli-eslint` alone | ||
|
||
# Unresolved questions | ||
|
||
N/A |