just-scripts 2.3.0 → 2.3.1
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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/tasks/eslintTask.d.ts +5 -0
- package/lib/tasks/eslintTask.d.ts.map +1 -1
- package/lib/tasks/eslintTask.js +9 -2
- package/lib/tasks/eslintTask.js.map +1 -1
- package/package.json +1 -1
- package/src/tasks/eslintTask.ts +17 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "just-scripts",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 07 Aug 2024 22:28:08 GMT",
|
|
6
|
+
"version": "2.3.1",
|
|
7
|
+
"tag": "just-scripts_v2.3.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "1581488+christiango@users.noreply.github.com",
|
|
12
|
+
"package": "just-scripts",
|
|
13
|
+
"commit": "317358e1755c8ffe3ec47d9af53c1e2c388904da",
|
|
14
|
+
"comment": "Add support for setting ESLINT_USE_FLAT_CONFIG to assist with upgrades to eslint v9"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 26 Mar 2024 00:12:38 GMT",
|
|
6
21
|
"version": "2.3.0",
|
|
7
22
|
"tag": "just-scripts_v2.3.0",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - just-scripts
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 07 Aug 2024 22:28:08 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.3.1
|
|
8
|
+
|
|
9
|
+
Wed, 07 Aug 2024 22:28:08 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Add support for setting ESLINT_USE_FLAT_CONFIG to assist with upgrades to eslint v9 (1581488+christiango@users.noreply.github.com)
|
|
14
|
+
|
|
7
15
|
## 2.3.0
|
|
8
16
|
|
|
9
|
-
Tue, 26 Mar 2024 00:12:
|
|
17
|
+
Tue, 26 Mar 2024 00:12:38 GMT
|
|
10
18
|
|
|
11
19
|
### Minor changes
|
|
12
20
|
|
|
@@ -25,6 +25,11 @@ export interface EsLintTaskOptions {
|
|
|
25
25
|
format?: string;
|
|
26
26
|
/** Prevents the logging & auto-fixing of warnings */
|
|
27
27
|
quiet?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Can be set to force the flat config on or off, which can be helpful when migrating to ESLint v9.
|
|
30
|
+
* This will be passed as an environment variable to eslint with the value ESLINT_USE_FLAT_CONFIG (https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#flat-config-is-now-the-default-and-has-some-changes).
|
|
31
|
+
*/
|
|
32
|
+
useFlatConfig?: boolean;
|
|
28
33
|
}
|
|
29
34
|
export declare function eslintTask(options?: EsLintTaskOptions): TaskFunction;
|
|
30
35
|
//# sourceMappingURL=eslintTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslintTask.d.ts","sourceRoot":"","sources":["../../src/tasks/eslintTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,YAAY,EAAE,MAAM,WAAW,CAAC;AAItE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2KAA2K;IAC3K,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"eslintTask.d.ts","sourceRoot":"","sources":["../../src/tasks/eslintTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,YAAY,EAAE,MAAM,WAAW,CAAC;AAItE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2KAA2K;IAC3K,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,YAAY,CA6DxE"}
|
package/lib/tasks/eslintTask.js
CHANGED
|
@@ -6,7 +6,7 @@ const just_scripts_utils_1 = require("just-scripts-utils");
|
|
|
6
6
|
const fs = require("fs");
|
|
7
7
|
function eslintTask(options = {}) {
|
|
8
8
|
return function eslint() {
|
|
9
|
-
const { files, configPath, ignorePath, fix, extensions, noEslintRc, maxWarnings, resolvePluginsPath, cache, cacheLocation, timing, outputFile, format, quiet, } = options;
|
|
9
|
+
const { files, configPath, ignorePath, fix, extensions, noEslintRc, maxWarnings, resolvePluginsPath, cache, cacheLocation, timing, outputFile, format, quiet, useFlatConfig, } = options;
|
|
10
10
|
const eslintCmd = just_task_1.resolve('eslint/bin/eslint.js');
|
|
11
11
|
// Try all possible extensions in the order listed here: https://eslint.org/docs/user-guide/configuring#configuration-file-formats
|
|
12
12
|
const eslintConfigPath = configPath || just_task_1.resolveCwd('.eslintrc', { extensions: ['.js', '.cjs', '.yaml', '.yml', '.json'] });
|
|
@@ -29,8 +29,15 @@ function eslintTask(options = {}) {
|
|
|
29
29
|
...(quiet ? ['--quiet'] : []),
|
|
30
30
|
'--color',
|
|
31
31
|
];
|
|
32
|
+
const env = {};
|
|
33
|
+
if (timing) {
|
|
34
|
+
env.TIMING = '1';
|
|
35
|
+
}
|
|
36
|
+
if (useFlatConfig !== undefined) {
|
|
37
|
+
env.ESLINT_USE_FLAT_CONFIG = JSON.stringify(useFlatConfig);
|
|
38
|
+
}
|
|
32
39
|
just_task_1.logger.info(just_scripts_utils_1.encodeArgs(eslintArgs).join(' '));
|
|
33
|
-
return just_scripts_utils_1.spawn(process.execPath, eslintArgs, { stdio: 'inherit',
|
|
40
|
+
return just_scripts_utils_1.spawn(process.execPath, eslintArgs, { stdio: 'inherit', env });
|
|
34
41
|
}
|
|
35
42
|
else {
|
|
36
43
|
return Promise.resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslintTask.js","sourceRoot":"","sources":["../../src/tasks/eslintTask.ts"],"names":[],"mappings":";;;AAAA,yCAAsE;AACtE,2DA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AU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9C,OAAO,0BAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;SACvE;aAAM;YACL,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC1B;IACH,CAAC,CAAC;AACJ,CAAC;AA7DD,gCA6DC"}
|
package/package.json
CHANGED
package/src/tasks/eslintTask.ts
CHANGED
|
@@ -28,6 +28,11 @@ export interface EsLintTaskOptions {
|
|
|
28
28
|
format?: string;
|
|
29
29
|
/** Prevents the logging & auto-fixing of warnings */
|
|
30
30
|
quiet?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Can be set to force the flat config on or off, which can be helpful when migrating to ESLint v9.
|
|
33
|
+
* This will be passed as an environment variable to eslint with the value ESLINT_USE_FLAT_CONFIG (https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#flat-config-is-now-the-default-and-has-some-changes).
|
|
34
|
+
*/
|
|
35
|
+
useFlatConfig?: boolean;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
@@ -47,6 +52,7 @@ export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
|
47
52
|
outputFile,
|
|
48
53
|
format,
|
|
49
54
|
quiet,
|
|
55
|
+
useFlatConfig,
|
|
50
56
|
} = options;
|
|
51
57
|
const eslintCmd = resolve('eslint/bin/eslint.js');
|
|
52
58
|
// Try all possible extensions in the order listed here: https://eslint.org/docs/user-guide/configuring#configuration-file-formats
|
|
@@ -74,8 +80,18 @@ export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
|
74
80
|
'--color',
|
|
75
81
|
];
|
|
76
82
|
|
|
83
|
+
const env: Record<string, string> = {};
|
|
84
|
+
|
|
85
|
+
if (timing) {
|
|
86
|
+
env.TIMING = '1';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (useFlatConfig !== undefined) {
|
|
90
|
+
env.ESLINT_USE_FLAT_CONFIG = JSON.stringify(useFlatConfig);
|
|
91
|
+
}
|
|
92
|
+
|
|
77
93
|
logger.info(encodeArgs(eslintArgs).join(' '));
|
|
78
|
-
return spawn(process.execPath, eslintArgs, { stdio: 'inherit',
|
|
94
|
+
return spawn(process.execPath, eslintArgs, { stdio: 'inherit', env });
|
|
79
95
|
} else {
|
|
80
96
|
return Promise.resolve();
|
|
81
97
|
}
|