[remote-dbg-next] .eslintignore does not ignore node_modules folder in test/jest
Categories
(DevTools :: about:debugging, defect, P1)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ogasidlo, Assigned: ogasidlo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [remote-debugging-reserve] remote-debugging-technical-debt)
Attachments
(1 file)
As we have a contained environment for our jest tests in test/jest
and a separate package.json
, we also have a node_modules
folder.
This folder is automatically ignored by mercurial, so will not be staged for a commit. But it is picked up by our linter.
STR:
- Go to
devtools/client/aboutdebugging-new/test/jest
- Run
yarn install
to create thenode_modules
folder - Go back to root and run
./mach lint --fix devtools/client/aboutdebugging-new/
ER:
Linter does not throw errors for node_modules
AR:
mozilla-central/devtools/client/aboutdebugging-new/test/jest/node_modules/nan/nan.
2037 error Virtual function declarations should specify only one of `virtual`, `final`, or `override` (cpp-virtual-final)
2132 error Virtual function declarations should specify only one of `virtual`, `final`, or `override` (cpp-virtual-final)
✖ 2 problems (2 errors, 0 warnings)
Solving this issue with an .eslintignore
on the test/jest
level should work, but doesn't as clang is not picking up on the ignore file.
Comment 1•5 years ago
|
||
clang ignore file is https://searchfox.org/mozilla-central/source/.clang-format-ignore , .eslintignore
will not be picked up by clang.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
As we want to exclude JS code, this needs to go into tools/rewriting/ThirdPartyPaths.txt
.
.clang-format-ignore
is just for C++ / Objective-C code.
Comment 3•5 years ago
|
||
(In reply to Ola Gasidlo [:ogasidlo] [:ola] from comment #2)
As we want to exclude JS code, this needs to go into
tools/rewriting/ThirdPartyPaths.txt
.
.clang-format-ignore
is just for C++ / Objective-C code.
Ah good to know that the linter ignore file is a separate one. Note that it's not JS we want to ignore, but C++, if you look in devtools/client/aboutdebugging-new/test/jest/node_modules/nan/nan, it's filled with *.h files :)
Assignee | ||
Comment 4•5 years ago
|
||
As the third-party node modules are throwing errors while running ./mach lint, the path was added to the ignore list for third party folders / files.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
Description
•