-
Notifications
You must be signed in to change notification settings - Fork 12
/
eslint+8.0.0-beta.1.patch
68 lines (68 loc) · 2.89 KB
/
eslint+8.0.0-beta.1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git a/node_modules/eslint/lib/cli-engine/cli-engine.js b/node_modules/eslint/lib/cli-engine/cli-engine.js
index aae7160..45c7156 100644
--- a/node_modules/eslint/lib/cli-engine/cli-engine.js
+++ b/node_modules/eslint/lib/cli-engine/cli-engine.js
@@ -595,6 +595,7 @@ class CLIEngine {
cwd: options.cwd,
ignorePath: options.ignorePath,
resolvePluginsRelativeTo: options.resolvePluginsRelativeTo,
+ resolver: options.resolver,
rulePaths: options.rulePaths,
specificConfigPath: options.configFile,
useEslintrc: options.useEslintrc,
diff --git a/node_modules/eslint/lib/cli.js b/node_modules/eslint/lib/cli.js
index 477310d..af6a75a 100644
--- a/node_modules/eslint/lib/cli.js
+++ b/node_modules/eslint/lib/cli.js
@@ -83,6 +83,7 @@ function translateOptions({
quiet,
reportUnusedDisableDirectives,
resolvePluginsRelativeTo,
+ resolver,
rule,
rulesdir
}) {
@@ -119,6 +120,7 @@ function translateOptions({
overrideConfigFile: config,
reportUnusedDisableDirectives: reportUnusedDisableDirectives ? "error" : void 0,
resolvePluginsRelativeTo,
+ resolver,
rulePaths: rulesdir,
useEslintrc: eslintrc
};
diff --git a/node_modules/eslint/lib/eslint/eslint.js b/node_modules/eslint/lib/eslint/eslint.js
index b4a1d02..89213d0 100644
--- a/node_modules/eslint/lib/eslint/eslint.js
+++ b/node_modules/eslint/lib/eslint/eslint.js
@@ -173,6 +173,7 @@ function processOptions({
plugins = {},
reportUnusedDisableDirectives = null, // ← should be null by default because if it's a string then it overrides the 'reportUnusedDisableDirectives' setting in config files. And we cannot use `overrideConfig.reportUnusedDisableDirectives` instead because we cannot configure the `error` severity with that.
resolvePluginsRelativeTo = null, // ← should be null by default because if it's a string then it suppresses RFC47 feature.
+ resolver = null,
rulePaths = [],
useEslintrc = true,
...unknownOptions
@@ -305,6 +306,7 @@ function processOptions({
ignorePath,
reportUnusedDisableDirectives,
resolvePluginsRelativeTo,
+ resolver: resolver ? require(resolver) : undefined,
rulePaths,
useEslintrc
};
diff --git a/node_modules/eslint/lib/options.js b/node_modules/eslint/lib/options.js
index 2dd186d..dfe32c1 100644
--- a/node_modules/eslint/lib/options.js
+++ b/node_modules/eslint/lib/options.js
@@ -115,6 +115,11 @@ module.exports = optionator({
type: "path::String",
description: "A folder where plugins should be resolved from, CWD by default"
},
+ {
+ option: "resolver",
+ type: "path::String",
+ description: "Absolute path to a resolver module"
+ },
{
heading: "Specifying rules and plugins"
},