@putout/eslint 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/eslint.js +12 -1
- package/package.json +2 -2
package/lib/eslint.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const {join} = require('node:path');
|
|
3
4
|
const process = require('node:process');
|
|
4
5
|
const tryToCatch = require('try-to-catch');
|
|
5
6
|
|
|
@@ -9,9 +10,12 @@ const {isIgnored} = require('./ignore');
|
|
|
9
10
|
const {keys} = Object;
|
|
10
11
|
const eslintId = ' (eslint)';
|
|
11
12
|
|
|
12
|
-
const overrideConfigFile = process.env.ESLINT_CONFIG_FILE;
|
|
13
13
|
const noESLint = process.env.NO_ESLINT;
|
|
14
14
|
const noESLintWarnings = process.env.NO_ESLINT_WARNINGS;
|
|
15
|
+
const {ESLINT_CONFIG_FILE} = process.env;
|
|
16
|
+
|
|
17
|
+
const dir = process.cwd();
|
|
18
|
+
const overrideConfigFile = parseOverride(dir, ESLINT_CONFIG_FILE);
|
|
15
19
|
|
|
16
20
|
const NO_FLAT_CONFIG_FOUND = 'Could not find config file.';
|
|
17
21
|
const WARNING = 1;
|
|
@@ -161,3 +165,10 @@ function parseError(e) {
|
|
|
161
165
|
message: `Plugin missing: ${messageData.pluginName}`,
|
|
162
166
|
};
|
|
163
167
|
}
|
|
168
|
+
|
|
169
|
+
function parseOverride(dir, configFilePath) {
|
|
170
|
+
if (!configFilePath)
|
|
171
|
+
return configFilePath;
|
|
172
|
+
|
|
173
|
+
return join(dir, configFilePath);
|
|
174
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/eslint",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Wrapper that simplifies ESLint API and makes it compatible with 🐊Putout",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git://github.com/coderaiser/putout.git"
|
|
19
|
+
"url": "git+https://github.com/coderaiser/putout.git"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "madrun test",
|