Use `eslint` and `ember-template-lint` directly (no longer lint during builds/rebuilds by default) by dcyriller · Pull Request #9009 · ember-cli/ember-cli

@dcyriller mentioned this pull request

Jan 10, 2020

@dcyriller

As v2 is in beta at the moment
ESLint is not run anymore by the command `ember test` in a brand new app
(or addon). Indeed, ember-cli-eslint is gone now.

rwjblue

rwjblue

Turbo87

kellyselden

kellyselden

kellyselden

kellyselden

As part of merging RFC#121 we collectively agreed that the normal Node
ecosystem conventions should apply. This means that we **must** ensure
that `npm test` (or `yarn test`) fails when we consider the repository
to be in a "bad state".

Prior to the changes proposed in the RFC, this was true (mostly
:smiley: ) because ember-cli-eslint and ember-cli-template-lint would
add errors to the `ember test` run. The pre-RFC121 setup fell down in a
few (IMHO important and fatal) ways:

* It was only possible to lint files that were part of the application
  build. This meant that issues in files in other directories (e.g.
  `index.js`, `ember-cli-build.js`, etc) would *not* fail `npm test` /
  `yarn test`.
* For addon's, important compatibility tests (ember-try scenarios) were
  never ran. If an addon didn't use the generated `.travis.yml` setup
  they would _never_ have their compatibility tests ran :scream:.

This commit does a few specific things to address the concerns above,
and make it possible to deliver on the promises that we made in order to
land RFC121:

* Add a `lint` script to projects that runs both `lint:js` and
  `lint:hbs` (in parallel) aggregating the results.
* Add a `test:ember` script that runs `ember test` (previously was the
  test script).
* Change the `test` script to run `lint:js`, `lint:hbs`, and
  `test:ember` scripts
* For addons, rename the `test:each` script to `test:ember-compatibility`
  (`test:each` seemed too ambiguous) and ensure `test` script runs this
  as well.
* Simplify the `.travis.yml` configuration now that `npm test` actually
  does the right thing :smile_cat:

kellyselden

@rwjblue rwjblue changed the title RFC-121: Remove ember-cli-eslint and ember-cli-template-lint from app blueprints Use eslint and ember-template-lint directly (no longer lint during builds/rebuilds by default)

Feb 24, 2020

chancancode added a commit to ember-learn/super-rentals-tutorial that referenced this pull request

Feb 26, 2020
ember-cli/ember-cli#9009 changed the yarn
test script such that it is not directly calling `ember test`.
Since `--path` is an option we want to pass to `ember test`, we
should call it directly.

chancancode pushed a commit to ember-learn/super-rentals that referenced this pull request

Feb 26, 2020

chancancode pushed a commit to ember-learn/super-rentals that referenced this pull request

Feb 26, 2020

This was referenced

Jan 18, 2022