-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[WIP]tools: simply eslint tasks #26054
Conversation
fc4d3e4
to
c0ca7f4
Compare
Current process for updating ESLint is to run tools/update-eslint.sh. There's also a tools/update-babel-eslint.sh. You'll want to either modify those so that they still work or else remove them if they are now unnecessary. |
@gengjiawen did you try to I'm not in favor of having an Lines 1300 to 1312 in 43dd49c
P.S. could you split the PR to two commits; 1 with all the tool changes, and a second with the deletions? It's very difficult to review this PR with the GitHub GUI. |
c0ca7f4
to
3b68cc5
Compare
I'd like to better understand the motivation here. Honestly, this may be a solution in search of a problem? From #25908:
I don't know about other toolchains, but upgrading ESLint in core has become trivial. /ping @cjihrig
If it were a part of the code base that lots of people were touching or that we wanted more help with, sure. But that's decidedly not the case with ESLint-tooling-for-core. |
I agree with @Trott. Personally, I'm content with the status quo when it comes to core's current ESLint setup. |
Answering my own comment a little: One argument is to put ESLint in line with the other tools that already use Anyway, I don't actually have an opinion on this one way or the other yet. I'm trying to understand the motivation more completely so that I have a better-informed opinion. :-D |
There are other reason I don't like copy all
Also I think we have same lint logic in both |
@nodejs/linting |
I'd lean towards the status quo as well. If we do switch, however, I'd prefer to keep the tools (the new |
FWIW, if I'm not mistaken, I think the commits here are in the reverse order to how they should be. You want to simplify the process first, then remove the existing tools. Otherwise, if these land as separate commits, the build will be broken with the first commit. |
Yeap, but the ci still fails. When we fix all issue and I will rebase the commits. |
f81b443
to
1f4c339
Compare
"lint": "eslint --cache --report-unused-disable-directives --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools" | ||
}, | ||
"dependencies": { | ||
"babel-eslint": "8.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stay on the old version since it's currently used in node core.
'eslint-plugin-node-core', | ||
'eslint-plugin-markdown', | ||
'babel-eslint', | ||
'eslint-plugin-node-core' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other two on npm, so I installed them using internal npm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.npmjs.com/package/eslint-plugin-node-core has not been updated properly (though it's probably just a matter of running the update script again)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that too. Perhaps just leave this plugin in this repo for now.
I still want to delete it from sources, see #26054 (comment).
Actually it's already using in |
echoing above, i'm also content with the current system. |
Any strong reason for this ? With your suggested change, many script need to be changed. like
|
If most members of the node team don't like the idea. Fine with me. Just want to share my idea :) |
1f4c339
to
5dc33af
Compare
My reasoning being "tools go in... Putting a |
I want to explain more what I think we can benefit from this: Remove
|
Anyone know why npm install failed ? The first two check failed due to this issue. https://travis-ci.com/nodejs/node/jobs/177139705 npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
> node-core@1.0.0 install /home/travis/build/nodejs/node
> node-gyp rebuild
gyp: binding.gyp not found (cwd: /home/travis/build/nodejs/node) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/travis/.nvm/versions/node/v11.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.4.0-101-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v11.9.0/bin/node" "/home/travis/.nvm/versions/node/v11.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/nodejs/node
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-core@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-core@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2019-02-12T15_12_53_402Z-debug.log
The command "eval npm install " failed. Retrying, 2 of 3. |
I tried yarn locally, it works ... Report to npm: https://npm.community/t/npm-install-failed-on-node-core/5438. |
f04884e
to
bd085b9
Compare
bd085b9
to
be9743d
Compare
ping @gengjiawen, this needs a rebase. |
8ae28ff
to
2935f72
Compare
Ping @gengjiawen ... is this still something you'd like to do? |
I would like to. But seems no time for time being, close it :( |
This is subtask of #25908.
Main Changes made
tools/node_modules/eslint
,tools/node_modules/babel-eslint
package.json
with lint taskMakefile
andvcbuild.bat
.eslintrc.js
andtools/lint-js.js
Process
.\vcbuild.bat nobuild lint-js
, not tested on linuxThough on windows the task still works. Failed log see https://travis-ci.org/gengjiawen/node/jobs/492161168.
I am not fluent in
bash
orbat
, nor familiar with the whole lint process.Any help would be very welcome.
cc @Trott @refack @joyeecheung
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes