-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Enable the no-var
linting rule in more core files
#13029
Conversation
no-var
linting rule in more core filesno-var
linting rule in more core files
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/00150e1f9934047/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/dc1e2450a916a0e/output.txt |
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 great, thank you!
I've added one (small) suggestion, but it's obviously not a blocker :-)
/* no-babel-preset */ | ||
/* eslint-disable no-var */ |
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.
Including this here for future reference, to clarify that we've considered the implications of these changes:
Here, and in src/core/unicode.js
, we include these files as-is in the "legacy"-builds because of issues with Babel; please note
Lines 198 to 200 in 052db45
// `src/core/{glyphlist,unicode}.js` (Babel is too slow for those when | |
// source-maps are enabled) should be excluded from processing. | |
const babelExcludes = [ |
Hence this PR will result in let
/const
being included even in the "legacy"-builds, however that should be fine given the following compatibility information:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#browser_compatibility
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility
Note also that IE 11 support is now explicitly removed, and this CSS-compatibility configuration for the GENERIC
-builds:
Lines 78 to 90 in 052db45
// Default Autoprefixer config used for generic, components, minified-pre | |
var AUTOPREFIXER_CONFIG = { | |
overrideBrowserslist: [ | |
"last 2 versions", | |
"Chrome >= 49", // Last supported on Windows XP | |
"Firefox >= 52", // Last supported on Windows XP | |
"Firefox ESR", | |
"Safari >= 10", | |
"> 0.5%", | |
"not IE > 0", | |
"not dead", | |
], | |
}; |
…c/core/unicode.js` This avoids creating intermediate strings and should be slightly more efficient.
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/00150e1f9934047/output.txt Total script time: 24.49 mins
Image differences available at: http://54.67.70.0:8877/00150e1f9934047/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/dc1e2450a916a0e/output.txt Total script time: 28.92 mins
Image differences available at: http://3.101.106.178:8877/dc1e2450a916a0e/reftest-analyzer.html#web=eq.log |
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/0e938857338b95e/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/a9925bc3d6c1c64/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/0e938857338b95e/output.txt Total script time: 3.64 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/a9925bc3d6c1c64/output.txt Total script time: 5.88 mins
|
This is mostly done using the
gulp lint --fix
command, and manual changes in a small number of cases where ESLint couldn't determine what to use, in an effort to reduce the number of disabled ESLint rules in the core folder and to use modern syntax.