| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
<deleted, I meant to request changes, not approve, sorry>
Sorry, something went wrong.
There was a problem hiding this comment.
An explanation: jslint isn't supposed to be referring to the underlying tool and was never (as far as I know) intended that way. It's intend to be referring to the action. So jslint is correct. Running make jslint executes linting for js files.
It's unfortunate that jslint is readily identifiable as an existing tool.
I'm pretty sure this change has been proposed before and was rejected. However, (if I'm not misremembering all that) the fact that it has come up at least twice now suggests that the name is genuinely bothersome to some people, so maybe it is worth changing?
Except for the fact that now everyone has to know to run make eslint all of a sudden when they've been running make jslint forever. And tutorials are now wrong. And so on
I'm definitely -1 on getting rid of make jslint entirely. But if you wanted to add a make eslint alias that just runs make jslint, I wouldn't stop it. It does seem to be not very future-proof. One day we'll switch to another underlying tool and need to change the command again....
Sorry, something went wrong.
|
@Trott I'd like to eventually get rid of "jslint" in the codebase though. Would you be less opposed if make jslint displayed an error telling the user to use make eslint instead? Having make eslint and make jslint be aliases of each other could be confusing. Someone might erroneously think that the latter runs JSLint, while the former runs ESLint. |
Sorry, something went wrong.
|
@seishun How about we leave the underlying tool out of the naming entirely? Maybe something like this?: Given that:
Perhaps instead of make jslint and make cpplint, we should reformat like the test-* stuff?:
We can have a period of time where jslint is an undocumented alias for lint-js. After a period of time, jslint emits a warning pointing at the new name but is still an effective alias. At some point after that, it emits the warning and does nothing else. And maybe it stays that way forever or maybe we remove the alias at some point after that. |
Sorry, something went wrong.
|
@Trott I'm open to that, although I'm not totally comfortable with inventing a generic term for linting JS. Let's see what other @nodejs/collaborators think.
What harm is there in introducing a warning right away? |
Sorry, something went wrong.
|
I think keeping 'jslint' is best, especially if we decide to switch to another tool in the future (so we don't have to change the name everywhere again at that point). |
Sorry, something went wrong.
I'd rather we do this, it's not tool specific and it fits the rest of the makefile. I've also been confused by the use of jslint in our codebase. |
Sorry, something went wrong.
Mostly people complaining. :-D There will undoubtedly be those who feel that the current task name should work indefinitely. If you're up for having that conversation sooner rather than later, then go for it. My inclination is usually to make the smallest changes reasonable, one at a time. But that isn't always the best thing to do, so... |
Sorry, something went wrong.
Has it actually ever though? Has anyone tried to run the jslint tool on Node files because their make jslint failed? |
Sorry, something went wrong.
|
@benjamingr That's what the PR description seems to describe. I'm in favor of what @Trott is suggesting here. Make js and css postfixes. It fits the style, and it removes all ambiguity. |
Sorry, something went wrong.
|
@benjamingr when I set up my repo to open my first Node.js PRs I was very confused about the name. I like make lint-js a lot as it does not comply to any library and I think that is a good way to make the live of newcomers a tad easier. |
Sorry, something went wrong.
|
I was also confused by the name at one point, although I wouldn't say my confusion actually caused any issues (since I never needed to know what the file was doing anyway). |
Sorry, something went wrong.
|
I am inclined to what @mscdex has said. |
Sorry, something went wrong.
@mscdex @thefourtheye Given the reason, would lint-js and lint-cpp be acceptable? That would be analogous to test-addons etc. |
Sorry, something went wrong.
|
@Trott Those names themselves are fine, but I just don't see a need to change anything. |
Sorry, something went wrong.
|
I am rather for keeping it. Let alone to avoid the churn and bikeshedding. Also don't feel there is a need. |
Sorry, something went wrong.
|
I'm also in favor of keeping the existing names. |
Sorry, something went wrong.
|
As suggested by @Trott, replaced eslint with lint-js and cpplint with lint-cpp. The old names still work, but print warnings. This makes it more consistent with other task names such as test-addons and prevents confusion, so why not? One thing I'm not sure about is vcbuild.bat output when running lint tasks. I wonder if "running eslint"/"running cpplint" would be preferable to "running lint-js"/"running lint-cpp". |
Sorry, something went wrong.
There was a problem hiding this comment.
working env vars are named with _ so lint_cpp
Sorry, something went wrong.
There was a problem hiding this comment.
lint_js_ci
Sorry, something went wrong.
There was a problem hiding this comment.
lint_js
Sorry, something went wrong.
There was a problem hiding this comment.
To have a the output be similar to lint-cpp, I'd do:
set lint_js_cmd=%config%\node tools\eslint\bin\eslint.js --cache --rule "linebreak-style: 0" --rulesdir=tools\eslint-rules --ext=.js,.md benchmark doc lib test tools
echo %lint_js_cmd%
%lint_js_cmd%
And similarly with `lint-js-ci`
Sorry, something went wrong.
So for lint-cpp the invocation trough call :run-python tools/lint-cpp.py %cppfilelist% will also output the actual CLI invocation of python, so the output is: running lint-cpp 'src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h test\gc\binding.cc tools\icu\*.cc tools\icu\*.h'
"C:\bin\dev\python27\python.exe" tools/lint-cpp.py src\async-wrap.cc src\backtrace_posix.cc src\backtrace_win32 ...Which IMHO is nice and useful |
Sorry, something went wrong.
Sorry, I messed up. The filename is actually cpplint.py, and it shouldn't be renamed because it's actually the name of the tool. |
Sorry, something went wrong.
|
I am a bit surprised that there are a couple of persons saying that there is no need for changing something when there were four people mentioning that they were confused about the name. Does anyone of you @mscdex @cjihrig @thefourtheye @eljefedelrodeodeljefe have a strong opinion about this? I do not see any negative side as I do not see the churn as a real negative point here. |
Sorry, something went wrong.
|
No strong opinion, but ideally I would want the understanding that churn and bikeshedding is distraction from doing valuable things. Not only the authors' but also those of multiple reviewers. And hence should be discouraged. See, I learned to be conservative about the codebase since it's a very serious business running it in production. Just think of this: what is the consequence in closing this now. Nothing really. Go ahead as you deem it pls. |
Sorry, something went wrong.
Sorry, something went wrong.
|
So what is the conclusion here? |
Sorry, something went wrong.
|
AFAICT we have three +1 and two -0. Unless someone wants to explicitly -1, this could land. |
Sorry, something went wrong.
There was a problem hiding this comment.
+1 from me too
Sorry, something went wrong.
|
I think there was enough time to express a clear -1 and this has not happened, so it should be fine to land this. @seishun it needs a rebase though. |
Sorry, something went wrong.
"jslint" is the name of a tool that actually is not used, which can cause confusion. PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
|
Running CI one last time since there was a rebase: https://ci.nodejs.org/job/node-test-pull-request/10217/ |
Sorry, something went wrong.
"jslint" is the name of a tool that actually is not used, which can cause confusion. PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
"jslint" is the name of a tool that actually is not used, which can cause confusion. PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
"jslint" is the name of a tool that actually is not used, which can cause confusion. PR-URL: nodejs/node#15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
|
Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label. If it is backported I think it would make sense to remove the warning when calling make jslint, as that could be considered a behavior change in CI systems. |
Sorry, something went wrong.
"jslint" is the name of a tool that actually is not used, which can cause confusion. Backport-PR-URL: #16297 PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
"jslint" is the name of a tool that actually is not used, which can cause confusion. Backport-PR-URL: #16297 PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
"jslint" is the name of a tool that actually is not used, which can cause confusion. Backport-PR-URL: #16297 PR-URL: #15272 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
| Back | FazBrowse Home | New Git URL |
"jslint" is the name of a tool that actually is not used, which can cause confusion.
(I installed the jslint extension in VSCode and it took me a while to figure out why it's not working)
Checklist
Affected core subsystem(s)
build