Skip to content

Commit 4860738

Browse files
authored
chore(devDeps): update 'eslint' and its plugins (#4737)
1 parent abfddf8 commit 4860738

File tree

7 files changed

+361
-337
lines changed

7 files changed

+361
-337
lines changed

.eslintrc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ parserOptions:
1212
jsx: false
1313
sourceType: script
1414
rules:
15+
no-var: 0
1516
strict:
1617
- error
1718
- safe
@@ -42,7 +43,8 @@ overrides:
4243
parserOptions:
4344
ecmaVersion: 2018
4445
sourceType: module
45-
parser: babel-eslint
46+
requireConfigFile: false # for @babel/eslint-parser
47+
parser: '@babel/eslint-parser'
4648
env:
4749
browser: false
4850
- files:

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) {
390390
});
391391
break;
392392
case 'function':
393-
/* eslint-disable-next-line no-unused-vars */
393+
/* eslint-disable-next-line no-unused-vars, no-unreachable-loop */
394394
for (prop in value) {
395395
canonicalizedObj = {};
396396
break;

package-lock.json

Lines changed: 344 additions & 318 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"devDependencies": {
8282
"@11ty/eleventy": "^0.11.0",
8383
"@11ty/eleventy-plugin-inclusive-language": "^1.0.0",
84+
"@babel/eslint-parser": "^7.15.4",
8485
"@babel/preset-env": "^7.14.8",
8586
"@mocha/docdash": "^3.0.1",
8687
"@rollup/plugin-babel": "^5.1.0",
@@ -90,7 +91,6 @@
9091
"@rollup/plugin-node-resolve": "^8.4.0",
9192
"assetgraph-builder": "^8.2.0",
9293
"autoprefixer": "^9.8.6",
93-
"babel-eslint": "^10.1.0",
9494
"canvas": "^2.8.0",
9595
"chai": "^4.2.0",
9696
"coffee-script": "^1.12.7",
@@ -99,15 +99,14 @@
9999
"coveralls": "^3.1.1",
100100
"cross-env": "^7.0.2",
101101
"cross-spawn": "^7.0.3",
102-
"eslint": "^7.8.1",
103-
"eslint-config-prettier": "^6.11.0",
104-
"eslint-config-semistandard": "^15.0.1",
105-
"eslint-config-standard": "^14.1.1",
106-
"eslint-plugin-import": "^2.22.0",
107-
"eslint-plugin-node": "^11.0.0",
108-
"eslint-plugin-prettier": "^3.1.4",
109-
"eslint-plugin-promise": "^4.2.1",
110-
"eslint-plugin-standard": "^4.0.1",
102+
"eslint": "^7.32.0",
103+
"eslint-config-prettier": "^8.3.0",
104+
"eslint-config-semistandard": "^16.0.0",
105+
"eslint-config-standard": "^16.0.3",
106+
"eslint-plugin-import": "^2.24.2",
107+
"eslint-plugin-node": "^11.1.0",
108+
"eslint-plugin-prettier": "^4.0.0",
109+
"eslint-plugin-promise": "^5.1.0",
111110
"fail-on-errors-webpack-plugin": "^3.0.0",
112111
"fs-extra": "^9.0.1",
113112
"husky": "^4.2.5",

scripts/update-authors.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ const excludeEmails = [
3838
// `Co-authored-by:` in the message body. Both have been used in the past
3939
// to indicate multiple authors per commit, with the latter standardized
4040
// by GitHub now.
41-
const authorRe = new RegExp(
42-
'(^Author:|^Co-authored-by:)\\s+(?<author>[^<]+)\\s+(?<email><[^>]+>)',
43-
'i'
44-
);
41+
const authorRe = /(^Author:|^Co-authored-by:)\\s+(?<author>[^<]+)\\s+(?<email><[^>]+>)/i;
4542

4643
rl.on('line', line => {
4744
const match = line.match(authorRe);

test/integration/suite.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('skipped suite w/no callback', function() {
3030
if (err) {
3131
return done(err);
3232
}
33-
var pattern = new RegExp('TypeError', 'g');
33+
var pattern = /TypeError/g;
3434
var result = res.output.match(pattern) || [];
3535
expect(result, 'to have length', 0);
3636
done();
@@ -44,7 +44,7 @@ describe('skipped suite w/ callback', function() {
4444
if (err) {
4545
return done(err);
4646
}
47-
var pattern = new RegExp('TypeError', 'g');
47+
var pattern = /TypeError/g;
4848
var result = res.output.match(pattern) || [];
4949
expect(result, 'to have length', 0);
5050
done();

test/unit/utils.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ describe('lib/utils', function() {
323323
});
324324

325325
it('should handle various non-undefined, non-null, non-object, non-array, non-date, and non-function values', function() {
326-
var regexp = new RegExp('(?:)');
326+
var regexp = /(?:)/;
327327
var regExpObj = {regexp: regexp};
328328
var regexpString = '/(?:)/';
329329

0 commit comments

Comments
 (0)