just-scripts 2.0.0 → 2.0.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
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "just-scripts",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 18 Aug 2022 16:10:27 GMT",
|
|
6
|
+
"tag": "just-scripts_v2.0.1",
|
|
7
|
+
"version": "2.0.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "1581488+christiango@users.noreply.github.com",
|
|
12
|
+
"package": "just-scripts",
|
|
13
|
+
"comment": "Add more configuration options for the eslint task",
|
|
14
|
+
"commit": "70ec9554f55db0c96fd0b89dd61a2f205936e029"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 16 May 2022 20:50:34 GMT",
|
|
6
21
|
"tag": "just-scripts_v2.0.0",
|
|
7
22
|
"version": "2.0.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 Thu, 18 Aug 2022 16:10:27 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.1
|
|
8
|
+
|
|
9
|
+
Thu, 18 Aug 2022 16:10:27 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Add more configuration options for the eslint task (1581488+christiango@users.noreply.github.com)
|
|
14
|
+
|
|
7
15
|
## 2.0.0
|
|
8
16
|
|
|
9
|
-
Mon, 16 May 2022 20:50:
|
|
17
|
+
Mon, 16 May 2022 20:50:34 GMT
|
|
10
18
|
|
|
11
19
|
### Major changes
|
|
12
20
|
|
|
@@ -19,6 +19,10 @@ export interface EsLintTaskOptions {
|
|
|
19
19
|
* (see https://eslint.org/docs/developer-guide/working-with-rules-deprecated#per-rule-performance).
|
|
20
20
|
*/
|
|
21
21
|
timing?: boolean;
|
|
22
|
+
/** Can be set to write the eslint report to a file */
|
|
23
|
+
outputFile?: string;
|
|
24
|
+
/** Can be set to dictate the format of use for report file generated with the output flag: https://eslint.org/docs/latest/user-guide/command-line-interface#-f---format */
|
|
25
|
+
format?: string;
|
|
22
26
|
}
|
|
23
27
|
export declare function eslintTask(options?: EsLintTaskOptions): TaskFunction;
|
|
24
28
|
//# 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;
|
|
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;CACjB;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,YAAY,CA+CxE"}
|
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, } = options;
|
|
9
|
+
const { files, configPath, ignorePath, fix, extensions, noEslintRc, maxWarnings, resolvePluginsPath, cache, cacheLocation, timing, outputFile, format } = 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'] });
|
|
@@ -24,6 +24,8 @@ function eslintTask(options = {}) {
|
|
|
24
24
|
...(maxWarnings !== undefined ? ['--max-warnings', `${maxWarnings}`] : []),
|
|
25
25
|
...(cache ? ['--cache'] : []),
|
|
26
26
|
...(cacheLocation ? ['--cache-location', cacheLocation] : []),
|
|
27
|
+
...(outputFile ? ['--output-file', outputFile] : []),
|
|
28
|
+
...(format ? ['--format', format] : []),
|
|
27
29
|
'--color',
|
|
28
30
|
];
|
|
29
31
|
just_task_1.logger.info(just_scripts_utils_1.encodeArgs(eslintArgs).join(' '));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslintTask.js","sourceRoot":"","sources":["../../src/tasks/eslintTask.ts"],"names":[],"mappings":";;;AAAA,yCAAsE;AACtE,2DAAuD;AACvD,yBAAyB;
|
|
1
|
+
{"version":3,"file":"eslintTask.js","sourceRoot":"","sources":["../../src/tasks/eslintTask.ts"],"names":[],"mappings":";;;AAAA,yCAAsE;AACtE,2DAAuD;AACvD,yBAAyB;AA4BzB,SAAgB,UAAU,CAAC,UAA6B,EAAE;IACxD,OAAO,SAAS,MAAM;QACpB,MAAM,EACJ,KAAK,EACL,UAAU,EACV,UAAU,EACV,GAAG,EACH,UAAU,EACV,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,KAAK,EACL,aAAa,EACb,MAAM,EACN,UAAU,EACV,MAAM,EACP,GAAG,OAAO,CAAC;QACZ,MAAM,SAAS,GAAG,mBAAO,CAAC,sBAAsB,CAAC,CAAC;QAClD,kIAAkI;QAClI,MAAM,gBAAgB,GAAG,UAAU,IAAI,sBAAU,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QAE1H,IAAI,SAAS,IAAI,gBAAgB,IAAI,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;YACpE,MAAM,gBAAgB,GAAG,UAAU,IAAI,sBAAU,CAAC,eAAe,CAAC,CAAC;YAEnE,MAAM,UAAU,GAAG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CAAC;gBACrC,SAAS;aACV,CAAC;YAEF,kBAAM,CAAC,IAAI,CAAC,+BAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9C,OAAO,0BAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;SAC3G;aAAM;YACL,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC1B;IACH,CAAC,CAAC;AACJ,CAAC;AA/CD,gCA+CC"}
|
package/package.json
CHANGED
package/src/tasks/eslintTask.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface EsLintTaskOptions {
|
|
|
22
22
|
* (see https://eslint.org/docs/developer-guide/working-with-rules-deprecated#per-rule-performance).
|
|
23
23
|
*/
|
|
24
24
|
timing?: boolean;
|
|
25
|
+
/** Can be set to write the eslint report to a file */
|
|
26
|
+
outputFile?: string;
|
|
27
|
+
/** Can be set to dictate the format of use for report file generated with the output flag: https://eslint.org/docs/latest/user-guide/command-line-interface#-f---format */
|
|
28
|
+
format?: string;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
@@ -38,6 +42,8 @@ export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
|
38
42
|
cache,
|
|
39
43
|
cacheLocation,
|
|
40
44
|
timing,
|
|
45
|
+
outputFile,
|
|
46
|
+
format
|
|
41
47
|
} = options;
|
|
42
48
|
const eslintCmd = resolve('eslint/bin/eslint.js');
|
|
43
49
|
// Try all possible extensions in the order listed here: https://eslint.org/docs/user-guide/configuring#configuration-file-formats
|
|
@@ -58,6 +64,8 @@ export function eslintTask(options: EsLintTaskOptions = {}): TaskFunction {
|
|
|
58
64
|
...(maxWarnings !== undefined ? ['--max-warnings', `${maxWarnings}`] : []),
|
|
59
65
|
...(cache ? ['--cache'] : []),
|
|
60
66
|
...(cacheLocation ? ['--cache-location', cacheLocation] : []),
|
|
67
|
+
...(outputFile ? ['--output-file', outputFile]: []),
|
|
68
|
+
...(format ? ['--format',format]: []),
|
|
61
69
|
'--color',
|
|
62
70
|
];
|
|
63
71
|
|