putout 38.0.1 → 38.0.2
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 +8 -0
- package/lib/cli/exit-codes.js +2 -2
- package/lib/cli/exit-codes.mjs +2 -2
- package/lib/cli/index.js +4 -4
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/cli/exit-codes.js
CHANGED
|
@@ -11,8 +11,8 @@ module.exports = {
|
|
|
11
11
|
INVALID_OPTION: 7,
|
|
12
12
|
CANNOT_LOAD_PROCESSOR: 8,
|
|
13
13
|
CANNOT_LOAD_FORMATTER: 9,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
RULER_WITH_FIX: 10,
|
|
15
|
+
RULER_NO_FILES: 11,
|
|
16
16
|
INVALID_CONFIG: 12,
|
|
17
17
|
UNHANDLED: 13,
|
|
18
18
|
CANNOT_LINT_STAGED: 14,
|
package/lib/cli/exit-codes.mjs
CHANGED
|
@@ -8,8 +8,8 @@ export const WAS_STOP = 6;
|
|
|
8
8
|
export const INVALID_OPTION = 7;
|
|
9
9
|
export const CANNOT_LOAD_PROCESSOR = 8;
|
|
10
10
|
export const CANNOT_LOAD_FORMATTER = 9;
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
11
|
+
export const RULER_WITH_FIX = 10;
|
|
12
|
+
export const RULER_NO_FILES = 11;
|
|
13
13
|
export const INVALID_CONFIG = 12;
|
|
14
14
|
export const UNHANDLED = 13;
|
|
15
15
|
export const CANNOT_LINT_STAGED = 14;
|
package/lib/cli/index.js
CHANGED
|
@@ -37,8 +37,8 @@ const {
|
|
|
37
37
|
WAS_STOP,
|
|
38
38
|
INVALID_OPTION,
|
|
39
39
|
UNHANDLED,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
RULER_WITH_FIX,
|
|
41
|
+
RULER_NO_FILES,
|
|
42
42
|
INVALID_CONFIG,
|
|
43
43
|
CANNOT_LINT_STAGED,
|
|
44
44
|
INTERACTIVE_CANCELED,
|
|
@@ -154,7 +154,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
if (fix && (enable || disable || enableAll || disableAll))
|
|
157
|
-
return exit(
|
|
157
|
+
return exit(RULER_WITH_FIX, Error(`'--fix' cannot be used with ruler toggler ('--enable', '--disable')`));
|
|
158
158
|
|
|
159
159
|
if (enable || disable) {
|
|
160
160
|
const {ruler} = await simpleImport('@putout/cli-ruler');
|
|
@@ -229,7 +229,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
|
|
|
229
229
|
const noFiles = !names.length;
|
|
230
230
|
|
|
231
231
|
if (noFiles && (enableAll || disableAll))
|
|
232
|
-
return exit(
|
|
232
|
+
return exit(RULER_NO_FILES, Error('`path` is missing for ruler toggler (`--enable-all`, `--disable-all`)'));
|
|
233
233
|
|
|
234
234
|
if (noFiles)
|
|
235
235
|
return exit();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "38.0.
|
|
3
|
+
"version": "38.0.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",
|