Skip to content

Commit 3761435

Browse files
committedAug 3, 2021
[eslint] fix eslint failures
1 parent c8876b1 commit 3761435

File tree

7 files changed

+21
-22
lines changed

7 files changed

+21
-22
lines changed
 

‎.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"parserOptions": {
1717
"sourceType": "module",
18-
"ecmaVersion": 6,
18+
"ecmaVersion": 2020,
1919
},
2020
"rules": {
2121
"comma-dangle": [2, "always-multiline"],

‎resolvers/webpack/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,18 +271,18 @@ function createWebpack1ResolveSync(webpackRequire, resolveConfig, plugins) {
271271
makeRootPlugin(ModulesInRootPlugin, 'module', resolveConfig.root),
272272
new ModulesInDirectoriesPlugin(
273273
'module',
274-
resolveConfig.modulesDirectories || resolveConfig.modules || ['web_modules', 'node_modules']
274+
resolveConfig.modulesDirectories || resolveConfig.modules || ['web_modules', 'node_modules'],
275275
),
276276
makeRootPlugin(ModulesInRootPlugin, 'module', resolveConfig.fallback),
277277
new ModuleAsFilePlugin('module'),
278278
new ModuleAsDirectoryPlugin('module'),
279279
new DirectoryDescriptionFilePlugin(
280280
'package.json',
281-
['module', 'jsnext:main'].concat(resolveConfig.packageMains || webpack1DefaultMains)
281+
['module', 'jsnext:main'].concat(resolveConfig.packageMains || webpack1DefaultMains),
282282
),
283283
new DirectoryDefaultFilePlugin(['index']),
284284
new FileAppendPlugin(resolveConfig.extensions || ['', '.webpack.js', '.web.js', '.js']),
285-
new ResultSymlinkPlugin()
285+
new ResultSymlinkPlugin(),
286286
);
287287

288288

@@ -422,7 +422,7 @@ function findConfigPath(configPath, packageDir) {
422422
}
423423

424424
const maybePath = path.resolve(
425-
path.join(packageDir, 'webpack.config' + maybeExtension)
425+
path.join(packageDir, 'webpack.config' + maybeExtension),
426426
);
427427
if (fs.existsSync(maybePath)) {
428428
configPath = maybePath;

‎tests/.eslintrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"env": {
3+
"mocha": true,
4+
},
5+
"rules": {
6+
"max-len": 0,
7+
"import/default": 0,
8+
},
9+
}

‎tests/.eslintrc.yml

-8
This file was deleted.

‎utils/.eslintrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 6,
4+
},
5+
}

‎utils/parse.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ exports.default = function parse(path, content, context) {
5252
console.warn('Line ' + e.lineNumber + ', column ' + e.column + ': ' + e.message);
5353
}
5454
if (!ast || typeof ast !== 'object') {
55-
console.warn(
56-
'`parseForESLint` from parser `' +
57-
parserPath +
58-
'` is invalid and will just be ignored'
59-
);
55+
console.warn('`parseForESLint` from parser `' + parserPath + '` is invalid and will just be ignored');
6056
} else {
6157
return ast;
6258
}

‎utils/resolve.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ const erroredContexts = new Set();
217217
*/
218218
function resolve(p, context) {
219219
try {
220-
return relative( p
221-
, context.getFilename()
222-
, context.settings
223-
);
220+
return relative(p, context.getFilename(), context.settings);
224221
} catch (err) {
225222
if (!erroredContexts.has(context)) {
226223
// The `err.stack` string starts with `err.name` followed by colon and `err.message`.

0 commit comments

Comments
 (0)
Please sign in to comment.