putout 21.2.0 → 21.6.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 CHANGED
@@ -1,3 +1,45 @@
1
+ 2021.11.10, v21.6.0
2
+
3
+ feature:
4
+ - (package) @putout/plugin-remove-useless-functions v2.0.0
5
+ - (@putout/plugin-remove-useless-functions) drop support of node < 14
6
+ - (putout) apply-filter-boolean: disabled and will be removed in next major version
7
+ - (@putout/plugin-remove-useless-functions) add support of id
8
+ - (eslint-plugin-putout) add babel options from @putout/engine-parser for TypeScript and Markdown
9
+ - (@putout/engine-parser) export babel/options
10
+ - (@putout/plugin-tape) add-stop-all: add support of test.only(), test.skip()
11
+ - (@putout/plugin-tape) remove-stop-all: add support of test.only(), test.skip()
12
+
13
+
14
+ 2021.11.10, v21.5.0
15
+
16
+ feature:
17
+ - (putout) terminal: add support of WebStorm, VS Code
18
+ - (@putout/plugin-tape) add remove-stop-all
19
+ - (@putout/plugin-tape) add add-await-to-re-import
20
+ - (@putout/plugin-tape) add-stop-all: add support of async functions
21
+ - (eslint-plugin-putout) add add-newlines-between-types-in-union
22
+
23
+
24
+ 2021.11.08, v21.4.0
25
+
26
+ feature:
27
+ - (@putout/plugin-remove-duplicates-from-union) add
28
+
29
+
30
+ 2021.11.08, v21.3.0
31
+
32
+ feature:
33
+ - (@putout/plugin-convert-quotes-to-backticks) add
34
+ - (@putout/plugin-remove-useless-escape) add support of escaping single quotes in backquotes
35
+ - (eslint-plugin-putout) add remove-newline-from-empty-object
36
+ - (eslint-plugin-putout) add remove-empty-newline-after-last-specifier
37
+ - (@putout/plugin-declare-undefined-variables) add support of child_process
38
+ - (@putout/plugin-declare-undefined-variables) add pullout, pipe-io
39
+ - (@putout/plugin-declare-undefined-variables) add support of os
40
+ - (@putout/plugin-declare-undefined-variables) add currify, wraptile
41
+
42
+
1
43
  2021.11.06, v21.2.0
2
44
 
3
45
  fix:
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.2.0",
3
+ "version": "21.6.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",
@@ -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",
@@ -147,7 +149,7 @@
147
149
  "@putout/plugin-remove-useless-continue": "^1.0.0",
148
150
  "@putout/plugin-remove-useless-escape": "^1.0.0",
149
151
  "@putout/plugin-remove-useless-for-of": "^2.0.0",
150
- "@putout/plugin-remove-useless-functions": "^1.0.3",
152
+ "@putout/plugin-remove-useless-functions": "^2.0.0",
151
153
  "@putout/plugin-remove-useless-map": "^1.0.0",
152
154
  "@putout/plugin-remove-useless-mapped-types": "^1.0.0",
153
155
  "@putout/plugin-remove-useless-mapping-modifiers": "^1.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
  },
@@ -110,6 +111,7 @@
110
111
  ".md"
111
112
  ],
112
113
  "rules": {
114
+ "apply-filter-boolean": "off",
113
115
  "apply-array-at": "off",
114
116
  "apply-as-type-assertions": "off",
115
117
  "apply-utility-types": "off",
@@ -189,6 +191,7 @@
189
191
  "remove-constant-conditions",
190
192
  "remove-boolean-from-assertions",
191
193
  "remove-boolean-from-logical-expressions",
194
+ "remove-duplicates-from-union",
192
195
  "remove-duplicates-from-logical-expressions",
193
196
  "remove-duplicate-interface-keys",
194
197
  "remove-duplicate-case",
@@ -225,6 +228,7 @@
225
228
  "convert-mock-require-to-mock-import",
226
229
  "convert-assignment-to-arrow-function",
227
230
  "convert-assignment-to-comparison",
231
+ "convert-quotes-to-backticks",
228
232
  "merge-destructuring-properties",
229
233
  "merge-duplicate-imports",
230
234
  "merge-if-statements",