Skip to content

Start linting all test/ files as part of test script#704

Merged
phillipj merged 1 commit into
janl:masterfrom
phillipj:eslint-tests
Aug 1, 2019
Merged

Start linting all test/ files as part of test script#704
phillipj merged 1 commit into
janl:masterfrom
phillipj:eslint-tests

Conversation

@phillipj

@phillipj phillipj commented Jul 8, 2019

Copy link
Copy Markdown
Collaborator

The huge changeset makes these changes not trivial to review, but skimming through it should give an impression this is all formatting changes, no functionality has been altered.

In an effort of ensuring consistent code style in test files as with the "production" source code, we should run eslint as part of the $ npm test script as well.

Most of the related fixes was done by eslint using the --fix argument:

$ npx eslint --fix test/**/*.js

Only special configuration tweaks for tests compared to the other source code, is to allow functions declaration without names. The rationale for allowing that in tests, is that the important reason we have them in the source code (proper stacktraces) aren't as important in test files.

In an effort of ensuring consistent code style in test files as with
the "production" source code, we should run eslint as part of the
`$ npm test` script as well.

Most of the related fixes was done by `eslint` using the `--fix` argument.

Only special configuration tweaks for tests compared to the other
source code, is to allow functions declaration without names. The
rationale for allowing that in tests, is that the important reason we
have them in the source code (proper stacktraces) aren't as important
in test files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant