-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Upgrade: eslint & eslint-config-eslint #387
Conversation
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.
Is no-unused-vars enabled? If not, should we enable it in this codebase?
that's what I am thinking, will do. |
it would be fine to add |
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.
Why the change from Chai Assert to Node's assert library? Chai Assert usually gives much more expression assertion messages and works nicely with Mocha.
I feel built-in |
02a9a34
to
8f027ae
Compare
Do we want to wait on #391 to land before doing this work? Looks like it might caused some merge conflicts. |
1a7fbac
to
b428439
Compare
sure, I like to see |
#391 has been merged! |
b428439
to
d9847d6
Compare
d9847d6
to
d097f4a
Compare
@kaicataldo I just rebased the newest changes, and thanks for the reminder! :) |
* @returns {Function} The function to pass into a filter method. | ||
* @private | ||
*/ | ||
function fileType(extension) { |
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.
Was this unused?
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.
it was used before the change, but I replaced it with lib/*.js
.
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.
Ah, I see - missed that. Thanks 👍
Makefile.js
Outdated
@@ -112,21 +94,21 @@ target.browserify = function() { | |||
// 1. create temp and build directory | |||
if (!test("-d", TEMP_DIR)) { | |||
mkdir(TEMP_DIR); | |||
mkdir(TEMP_DIR + "/lib"); | |||
mkdir(`${TEMP_DIR}/lib`); |
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.
Looks like the /
is unnecessary here. I wonder if we should just use path.join()
?
Makefile.js
Outdated
} | ||
|
||
if (!test("-d", BUILD_DIR)) { | ||
mkdir(BUILD_DIR); | ||
} | ||
|
||
// 2. copy files into temp directory | ||
cp("-r", "lib/*", TEMP_DIR + "/lib"); | ||
cp("-r", "lib/*", `${TEMP_DIR}/lib`); |
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.
Looks like the /
is unnecessary here. I wonder if we should just use path.join()
?
Makefile.js
Outdated
cp("espree.js", TEMP_DIR); | ||
cp("package.json", TEMP_DIR); | ||
|
||
|
||
// 3. browserify the temp directory | ||
nodeCLI.exec("browserify", TEMP_DIR + "espree.js", "-o", BUILD_DIR + "espree.js", "-s espree"); | ||
nodeCLI.exec("browserify", `${TEMP_DIR}espree.js`, "-o", `${BUILD_DIR}espree.js`, "-s espree"); |
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 wonder if we should just use path.join()
?
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.
LGTM, with a few very minor (non-blocking) suggestions.
I didn't realize we were also using assert
in the main ESLint repo. Just so I'm clear, are we trying to move towards using Node's assert
module?
Signed-off-by: weiran.zsd <weiran.zsd@alibaba-inc.com>
no, I don't think we have made the decision. |
PR eslint#389 deleted "lib/visitor-keys.js" and replaced all usages with the eslint-visitor-keys package. PR eslint#387 added lib/visitor-keys.js back again for no apparent reason. It looks like eslint#387 has been started before eslint#389, so it needed to integrate those changes and by mistake the file has been added again.
PR #389 deleted "lib/visitor-keys.js" and replaced all usages with the eslint-visitor-keys package. PR #387 added lib/visitor-keys.js back again for no apparent reason. It looks like #387 has been started before #389, so it needed to integrate those changes and by mistake the file has been added again.
the pr upgrade these devdeps: