Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint] make CI lint tests, utils, resolvers, ...etc #1475

Merged
merged 3 commits into from Sep 17, 2019

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Sep 14, 2019

First steps for fixing #1413.

node_modules
# we want to ignore "tests/files" here, but unfortunately doing so would
# interfere with unit test and fail it for some reason.
# tests/files
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #1413 (comment) :

There is a technical problem: Since we don't want to lint tests/files, an .eslintignore file needs to be added. But doing that alters the behavior of unit tests for no-unused-modules, the rule will consider tests/files/**/* to be ignored, hence failing the tests.

.eslintrc.yml Outdated Show resolved Hide resolved
.eslintrc.yml Show resolved Hide resolved
.eslintrc.yml Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Sep 14, 2019

Coverage Status

Coverage decreased (-1.5%) to 96.408% when pulling c3cad51 on golopot:eslint into 2e047e6 on benmosher:master.

@golopot
Copy link
Contributor Author

golopot commented Sep 14, 2019

The current approach has the disadvantage that contributors 1. cannot run eslint ., but have to run eslint . --ignore-path .eslintignore-real. 2. will need to disable editors' eslint when working on tests/files/**.

I found another approach: add the file tests/files/.eslintrc, which disables all rules by rules: { "some-rule": 0, ... }. This approach do not suffer from the aforementioned problems.

I am going to force push with the later approach.

@golopot golopot force-pushed the eslint branch 2 times, most recently from 64072d1 to e982c78 Compare September 14, 2019 18:20
@ljharb
Copy link
Member

ljharb commented Sep 15, 2019

I think the latter approach you suggest sounds better.

.eslintrc.yml Show resolved Hide resolved
memo-parser/.eslintrc.yml Outdated Show resolved Hide resolved
resolvers/.eslintrc Outdated Show resolved Hide resolved
utils/.eslintrc.yml Outdated Show resolved Hide resolved
@golopot golopot force-pushed the eslint branch 2 times, most recently from 37ce976 to a53bf3d Compare September 16, 2019 08:06
@ljharb
Copy link
Member

ljharb commented Sep 16, 2019

We shouldn't be autofixing warnings; looks like the second commit is only doing that.

I'll rebase and clean it up a bit, thanks! <3

@ljharb ljharb force-pushed the eslint branch 2 times, most recently from f7716ca to c3cad51 Compare September 17, 2019 02:31
@ljharb ljharb merged commit 813a116 into import-js:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants