Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

eslint: Lint the tests directory by default too #951

Merged
merged 1 commit into from
Jun 14, 2018
Merged

eslint: Lint the tests directory by default too #951

merged 1 commit into from
Jun 14, 2018

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jun 13, 2018

The tests directory was already added to the lint script command by create-project, however it was not yet listed in the include for eslint-loader.

The testing presets already update envs accordingly, to prevent errors from mocha/jest/... globals.

The redundant eslint.extensions option has been removed, since that was only used by the ESLint Node API, which we no longer use.

Fixes #331.

@edmorley edmorley added this to the v9 milestone Jun 13, 2018
@edmorley edmorley self-assigned this Jun 13, 2018
@edmorley edmorley changed the title eslint: Include tests and dotfiles in files linted by default eslint: Lint the tests directory by default too Jun 13, 2018
@edmorley
Copy link
Member Author

edmorley commented Jun 13, 2018

I've updated the PR to remove the dotfiles addition, since it causes import/no-extraneous-dependencies lint errors like so:
https://travis-ci.org/mozilla-neutrino/neutrino-dev/jobs/391908556#L6384

...which would mean us having to override the airbnb rule here:
https://github.com/airbnb/javascript/blob/04ab225858b75b9fb1180075b92845700849ea5b/packages/eslint-config-airbnb-base/rules/imports.js#L71-L93

...which doesn't really make it worth doing for now.

That rule is pretty annoying at times.

The `tests` directory was already added to the `lint` script command
by create-project, however it was not yet listed in the `include`
for `eslint-loader`.

The testing presets already update `envs` accordingly, to prevent
errors from mocha/jest/... globals.

The redundant `eslint.extensions` option has been removed, since that
was only used by the ESLint Node API, which we no longer use.

Fixes #331.
@edmorley edmorley merged commit e213cd6 into neutrinojs:master Jun 14, 2018
@edmorley edmorley deleted the lint-tests-dotfiles branch June 14, 2018 22:10
acconrad pushed a commit to acconrad/neutrino-dev that referenced this pull request Jul 13, 2018
The `tests` directory was already added to the `lint` script command
by create-project, however it was not yet listed in the `include`
for `eslint-loader`.

The testing presets already update `envs` accordingly, to prevent
errors from mocha/jest/... globals.

The redundant `eslint.extensions` option has been removed, since that
was only used by the ESLint Node API, which we no longer use.

Fixes neutrinojs#331.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants