putout 21.1.2 → 21.5.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/ChangeLog +45 -0
- package/README.md +1 -0
- package/lib/cli/index.js +6 -2
- package/package.json +4 -2
- package/putout.json +3 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
2021.11.10, v21.5.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- (putout) terminal: add support of WebStorm, VS Code
|
|
5
|
+
- (@putout/plugin-tape) add remove-stop-all
|
|
6
|
+
- (@putout/plugin-tape) add add-await-to-re-import
|
|
7
|
+
- (@putout/plugin-tape) add-stop-all: add support of async functions
|
|
8
|
+
- (eslint-plugin-putout) add add-newlines-between-types-in-union
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
2021.11.08, v21.4.0
|
|
12
|
+
|
|
13
|
+
feature:
|
|
14
|
+
- (@putout/plugin-remove-duplicates-from-union) add
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
2021.11.08, v21.3.0
|
|
18
|
+
|
|
19
|
+
feature:
|
|
20
|
+
- (@putout/plugin-convert-quotes-to-backticks) add
|
|
21
|
+
- (@putout/plugin-remove-useless-escape) add support of escaping single quotes in backquotes
|
|
22
|
+
- (eslint-plugin-putout) add remove-newline-from-empty-object
|
|
23
|
+
- (eslint-plugin-putout) add remove-empty-newline-after-last-specifier
|
|
24
|
+
- (@putout/plugin-declare-undefined-variables) add support of child_process
|
|
25
|
+
- (@putout/plugin-declare-undefined-variables) add pullout, pipe-io
|
|
26
|
+
- (@putout/plugin-declare-undefined-variables) add support of os
|
|
27
|
+
- (@putout/plugin-declare-undefined-variables) add currify, wraptile
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
2021.11.06, v21.2.0
|
|
31
|
+
|
|
32
|
+
fix:
|
|
33
|
+
- (@putout/plugin-remove-useless-return) exclude nodes with comments
|
|
34
|
+
|
|
35
|
+
feature:
|
|
36
|
+
- (package) @putout/plugin-putout-config v2.0.0
|
|
37
|
+
- (@putout/plugin-putout-config) drop support of node < 14
|
|
38
|
+
- (@putout/plugin-apply-is-array) add support of "inline" option (https://github.com/xtermjs/xterm.js/pull/3538#discussion_r743663993)
|
|
39
|
+
- (@putout/plugin-putout-config) improve support of plugin options
|
|
40
|
+
- (@putout/operator-declare) improve VariableDeclaration check
|
|
41
|
+
- (@putout/plugin-declare-undefined-variables) maybe: add maybeFn
|
|
42
|
+
- (eslint-plugin-putout) safe: disable remove-useless-return
|
|
43
|
+
- (eslint-plugin-tape) add tape-add-newline-between-tests
|
|
44
|
+
|
|
45
|
+
|
|
1
46
|
2021.11.02, v21.1.2
|
|
2
47
|
|
|
3
48
|
feature:
|
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Putout is a tool for identifying, reporting and fixing patterns found in JavaScr
|
|
|
48
48
|
- remove `boolean` from `assertion`;
|
|
49
49
|
- remove `boolean` from `logical expressions`;
|
|
50
50
|
- remove `duplicates` from `logical expressions`;
|
|
51
|
+
- remove `duplicates` from TypeScript `Union`;
|
|
51
52
|
- remove `unreachable code`;
|
|
52
53
|
- remove `duplicate keys`;
|
|
53
54
|
- remove useless `typescripts` types;
|
package/lib/cli/index.js
CHANGED
|
@@ -16,6 +16,10 @@ const {version} = require('../../package.json');
|
|
|
16
16
|
|
|
17
17
|
const simport = createSimport(__filename);
|
|
18
18
|
|
|
19
|
+
const {env} = process;
|
|
20
|
+
const isIDE = env.TERMINAL_EMULATOR || env.TERM_PROGRAM === 'vscode';
|
|
21
|
+
const chooseName = (name, resolvedName) => !isIDE ? name : resolvedName;
|
|
22
|
+
|
|
19
23
|
const {
|
|
20
24
|
runProcessors,
|
|
21
25
|
getFilePatterns,
|
|
@@ -322,7 +326,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile})
|
|
|
322
326
|
const formatterProxy = createFormatterProxy({
|
|
323
327
|
report,
|
|
324
328
|
formatterOptions,
|
|
325
|
-
name,
|
|
329
|
+
name: chooseName(name, resolvedName),
|
|
326
330
|
places,
|
|
327
331
|
index: currentIndex,
|
|
328
332
|
count: length,
|
|
@@ -372,7 +376,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile})
|
|
|
372
376
|
const line = report(currentFormat, {
|
|
373
377
|
report,
|
|
374
378
|
formatterOptions,
|
|
375
|
-
name,
|
|
379
|
+
name: chooseName(name, resolvedName),
|
|
376
380
|
source: rawSource,
|
|
377
381
|
places,
|
|
378
382
|
index: currentIndex,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.5.0",
|
|
4
4
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
5
|
"description": "🐊 Pluggable and configurable code transformer with built-in eslint, babel plugins and jscodeshift codemods support of js, jsx typescript, flow files, markdown, yaml and json",
|
|
6
6
|
"homepage": "http://github.com/coderaiser/putout",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"@putout/plugin-convert-math-pow": "^4.0.0",
|
|
99
99
|
"@putout/plugin-convert-mock-require-to-mock-import": "^1.0.0",
|
|
100
100
|
"@putout/plugin-convert-object-assign-to-merge-spread": "^5.0.0",
|
|
101
|
+
"@putout/plugin-convert-quotes-to-backticks": "^1.0.0",
|
|
101
102
|
"@putout/plugin-convert-template-to-string": "^1.0.0",
|
|
102
103
|
"@putout/plugin-convert-to-arrow-function": "^3.0.0",
|
|
103
104
|
"@putout/plugin-convert-top-level-return": "^4.0.0",
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
"@putout/plugin-package-json": "^1.0.0",
|
|
118
119
|
"@putout/plugin-promises": "^6.0.0",
|
|
119
120
|
"@putout/plugin-putout": "^8.0.0",
|
|
120
|
-
"@putout/plugin-putout-config": "^
|
|
121
|
+
"@putout/plugin-putout-config": "^2.0.0",
|
|
121
122
|
"@putout/plugin-regexp": "^3.0.0",
|
|
122
123
|
"@putout/plugin-remove-boolean-from-assertions": "^1.0.0",
|
|
123
124
|
"@putout/plugin-remove-boolean-from-logical-expressions": "^4.0.0",
|
|
@@ -128,6 +129,7 @@
|
|
|
128
129
|
"@putout/plugin-remove-duplicate-interface-keys": "^3.0.0",
|
|
129
130
|
"@putout/plugin-remove-duplicate-keys": "^2.0.0",
|
|
130
131
|
"@putout/plugin-remove-duplicates-from-logical-expressions": "^1.0.0",
|
|
132
|
+
"@putout/plugin-remove-duplicates-from-union": "^1.0.0",
|
|
131
133
|
"@putout/plugin-remove-empty": "^6.0.0",
|
|
132
134
|
"@putout/plugin-remove-iife": "^1.0.0",
|
|
133
135
|
"@putout/plugin-remove-nested-blocks": "^4.0.0",
|
package/putout.json
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"declare-undefined-variables": "off"
|
|
41
41
|
},
|
|
42
42
|
"{*rc,*.{json,yml}}": {
|
|
43
|
+
"convert-quotes-to-backticks": "off",
|
|
43
44
|
"remove-useless-escape": "off",
|
|
44
45
|
"apply-numeric-separators": "off"
|
|
45
46
|
},
|
|
@@ -189,6 +190,7 @@
|
|
|
189
190
|
"remove-constant-conditions",
|
|
190
191
|
"remove-boolean-from-assertions",
|
|
191
192
|
"remove-boolean-from-logical-expressions",
|
|
193
|
+
"remove-duplicates-from-union",
|
|
192
194
|
"remove-duplicates-from-logical-expressions",
|
|
193
195
|
"remove-duplicate-interface-keys",
|
|
194
196
|
"remove-duplicate-case",
|
|
@@ -225,6 +227,7 @@
|
|
|
225
227
|
"convert-mock-require-to-mock-import",
|
|
226
228
|
"convert-assignment-to-arrow-function",
|
|
227
229
|
"convert-assignment-to-comparison",
|
|
230
|
+
"convert-quotes-to-backticks",
|
|
228
231
|
"merge-destructuring-properties",
|
|
229
232
|
"merge-duplicate-imports",
|
|
230
233
|
"merge-if-statements",
|