putout 22.0.2 → 22.2.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 +60 -1
- package/README.md +6 -6
- package/lib/cli/index.js +1 -1
- package/package.json +4 -4
- package/putout.json +1 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
+
2021.11.28, v22.2.1
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- (@putout/plugin-remove-constant-conditions) report: "constant condtions should not be used" -> "Avoid constant conditions"
|
|
5
|
+
|
|
6
|
+
feature:
|
|
7
|
+
- (package) @putout/plugin-madrun v11.0.0
|
|
8
|
+
- (putout) improve ability to test from IDE
|
|
9
|
+
- (@putout/plugin-madrun) drop support of putout < 22
|
|
10
|
+
- (@putout/plugin-madrun) add declare
|
|
11
|
+
- (eslint-plugin-putout) putout: add ability to preserve comments places
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
2021.11.27, v22.2.0
|
|
15
|
+
|
|
16
|
+
fix:
|
|
17
|
+
- (@putout/plugin-remove-unused-variables) OptionalMemberExpression: computed property
|
|
18
|
+
- (eslint-plugin-putout) array-element-newline: minimum elements: 4 -> 5
|
|
19
|
+
- (eslint-plugin-putout) add-newlinew-before-function-call: trimed whitespaces on empty line
|
|
20
|
+
- (eslint-plugin-putout) add-newline-before-function-call: add support of comments
|
|
21
|
+
- (eslint-plugin-putout) add-newline-before-function-call: continue -> return
|
|
22
|
+
|
|
23
|
+
feature:
|
|
24
|
+
- (package) @putout/plugin-remove-constant-conditions v3.0.0
|
|
25
|
+
- (@putout/plugin-remove-constant-conditions) drop support of node < 14
|
|
26
|
+
- (@putout/plugin-remove-constant-conditions) add support of consequent not body
|
|
27
|
+
- (eslint-plugin-putout) safe: disable remove-unreachable-code
|
|
28
|
+
- (@putout/plugin-remove-unused-variables) improve support of OptionalMemberExpression
|
|
29
|
+
- (eslint-plugin-putout) add-newline-after-function-call: add support of ArrayExpression and ObjectExpression
|
|
30
|
+
- (eslint-plugin-putout) add add-newline-after-function-call
|
|
31
|
+
- (@putout/eslint-config) padding-line-between-statements: add support of while
|
|
32
|
+
- (eslint-plugin-putout) add add-newline-before-function-call
|
|
33
|
+
- (@putout/eslint-config) add func-call-spacing (https://eslint.org/docs/rules/func-call-spacing)
|
|
34
|
+
- (eslint-plugin-putout) plugin-tape-remove-newline-before-t-end: add support of trimed newline
|
|
35
|
+
- (eslint-plugin-putout) add add-newline-before-t-end
|
|
36
|
+
- (@putout/plugin-declare-undefined-variables) add maybeEmptyArray
|
|
37
|
+
- (eslint-plugin-putout) array-element-newline: add support of Identifier
|
|
38
|
+
- (@putout/eslint-config) padding-line-between-statements: add newline between for and return
|
|
39
|
+
- (@putout/plugin-remove-useless-spread) add support of logical expressions
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
2021.11.21, v22.1.1
|
|
43
|
+
|
|
44
|
+
feature:
|
|
45
|
+
- (package) yargs-parser v21.0.0
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
2021.11.21, v22.1.0
|
|
49
|
+
|
|
50
|
+
fix:
|
|
51
|
+
- (@putout/plugin-convert-quotes-to-backticks) a couple newlines
|
|
52
|
+
- (@putout/plugin-convert-quotes-to-backticks) newlines
|
|
53
|
+
|
|
54
|
+
feature:
|
|
55
|
+
- (putout) *.md: disable convert-quotes-to-backticks
|
|
56
|
+
- (@putout/plugin-convert-quotes-to-backtics) add support of newlines
|
|
57
|
+
- (eslint-plugin-putout) objects-braces-inside-array: enable for json, disable for yaml
|
|
58
|
+
|
|
59
|
+
|
|
1
60
|
2021.11.19, v22.0.2
|
|
2
61
|
|
|
3
62
|
fix:
|
|
@@ -13,7 +72,7 @@ feature:
|
|
|
13
72
|
- (@putout/engine-parser) export babel parser
|
|
14
73
|
- (@putout/plugin-tape) convert-ok-to-match: exclude: keys
|
|
15
74
|
- (@putout/plugin-tape) convert-ok-to-match: rm RegExp, t.match adds it
|
|
16
|
-
- (eslint-plugin-putout) single-property-destructuring: exclude ImportSpecifier
|
|
75
|
+
- (eslint-plugin-putout) single-property-destructuring: exclude ImportSpecifier with local different then imported
|
|
17
76
|
- (@putout/compare) add support of empty template
|
|
18
77
|
- (eslint-plugin-putout) remove-empty-newline-after-last-specifier: add support of ObjectExpression
|
|
19
78
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|

|
|
11
11
|
|
|
12
|
-
Putout
|
|
12
|
+
🐊[`Putout`](https://github.com/coderaiser/putout) find and fix problems in your `JavaScript`, `JSX`, `Typescript`, `Flow`, `Yaml, `Json`and`Markdown`. It can:
|
|
13
13
|
|
|
14
14
|
- remove unused `variables`;
|
|
15
15
|
- remove unused `for-of variables`;
|
|
@@ -142,7 +142,7 @@ putout lib test --fix
|
|
|
142
142
|
|
|
143
143
|
## Plugins
|
|
144
144
|
|
|
145
|
-
By default `
|
|
145
|
+
By default 🐊`Putout` uses all enabled by default plugins, anyways it can be run with a couple mentioned plugins (splitted with ","):
|
|
146
146
|
|
|
147
147
|
```sh
|
|
148
148
|
putout lib --plugins remove-debugger,remove-unused-variables
|
|
@@ -150,7 +150,7 @@ putout lib --plugins remove-debugger,remove-unused-variables
|
|
|
150
150
|
|
|
151
151
|
## Environment variables
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
🐊`Putout` supports next `environment variables`:
|
|
154
154
|
|
|
155
155
|
- `PUTOUT_FILES` - files that should be processed by putout, divided by ",";
|
|
156
156
|
|
|
@@ -190,9 +190,9 @@ When you need to ignore some routes no metter what, you can use `ignore` section
|
|
|
190
190
|
|
|
191
191
|
## Plugins
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
🐊`Putout` supports `plugins`, there is two types: with prefix official `@putout/plugin-` and user plugins with prefix `putout-plugin-`. To use your plugin create plugin as `npm` package with keywords `putout`, `putout-plugin` and add it to `.putout.json`.
|
|
194
194
|
|
|
195
|
-
For example if you need to `remove-something` create `putout
|
|
195
|
+
For example if you need to `remove-something` create 🐊[`Putout`](https://github.com/coderaiser/putout) plugin with name `putout-plugin-remove-something` and it to `package.json`:
|
|
196
196
|
|
|
197
197
|
```json
|
|
198
198
|
{
|
|
@@ -204,7 +204,7 @@ For example if you need to `remove-something` create `putout` plugin with name `
|
|
|
204
204
|
|
|
205
205
|
## Codemods
|
|
206
206
|
|
|
207
|
-
`
|
|
207
|
+
🐊`Putout` supports `codemodes` in the similar to plugins way, just create a directory `~/.putout` and put your plugins there. Here is example: [convert-tape-to-supertape](https://github.com/coderaiser/putout/tree/master/codemods/plugin-convert-tape-to-supertape) and [this is example of work](https://github.com/coderaiser/putout/commit/ad02cebc344ce73cdee668cffc5078bf08830d52).
|
|
208
208
|
|
|
209
209
|
## API
|
|
210
210
|
|
package/lib/cli/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const {version} = require('../../package.json');
|
|
|
17
17
|
const simport = createSimport(__filename);
|
|
18
18
|
|
|
19
19
|
const {env} = process;
|
|
20
|
-
const isIDE = env.TERMINAL_EMULATOR || env.TERM_PROGRAM === 'vscode';
|
|
20
|
+
const isIDE = /JetBrains/.test(env.TERMINAL_EMULATOR) || env.TERM_PROGRAM === 'vscode';
|
|
21
21
|
const chooseName = (name, resolvedName) => !isIDE ? name : resolvedName;
|
|
22
22
|
|
|
23
23
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.2.1",
|
|
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",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@putout/plugin-extract-sequence-expressions": "^2.0.0",
|
|
109
109
|
"@putout/plugin-github": "^2.0.0",
|
|
110
110
|
"@putout/plugin-gitignore": "^3.0.0",
|
|
111
|
-
"@putout/plugin-madrun": "^
|
|
111
|
+
"@putout/plugin-madrun": "^11.0.0",
|
|
112
112
|
"@putout/plugin-merge-destructuring-properties": "^5.0.0",
|
|
113
113
|
"@putout/plugin-merge-duplicate-imports": "^4.0.0",
|
|
114
114
|
"@putout/plugin-merge-if-statements": "^3.0.0",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@putout/plugin-remove-boolean-from-assertions": "^1.0.0",
|
|
123
123
|
"@putout/plugin-remove-boolean-from-logical-expressions": "^4.0.0",
|
|
124
124
|
"@putout/plugin-remove-console": "^3.0.0",
|
|
125
|
-
"@putout/plugin-remove-constant-conditions": "^
|
|
125
|
+
"@putout/plugin-remove-constant-conditions": "^3.0.0",
|
|
126
126
|
"@putout/plugin-remove-debugger": "^4.0.0",
|
|
127
127
|
"@putout/plugin-remove-duplicate-case": "^1.0.0",
|
|
128
128
|
"@putout/plugin-remove-duplicate-interface-keys": "^3.0.0",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"try-catch": "^3.0.0",
|
|
197
197
|
"try-to-catch": "^3.0.0",
|
|
198
198
|
"wraptile": "^3.0.0",
|
|
199
|
-
"yargs-parser": "^
|
|
199
|
+
"yargs-parser": "^21.0.0"
|
|
200
200
|
},
|
|
201
201
|
"keywords": [
|
|
202
202
|
"ast",
|