putout 22.0.1 → 22.2.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 +68 -2
- package/README.md +6 -6
- package/help.json +0 -1
- package/package.json +4 -4
- package/putout.json +1 -0
package/ChangeLog
CHANGED
|
@@ -1,9 +1,75 @@
|
|
|
1
|
+
2021.11.27, v22.2.0
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- (@putout/plugin-remove-unused-variables) OptionalMemberExpression: computed property
|
|
5
|
+
- (eslint-plugin-putout) array-element-newline: minimum elements: 4 -> 5
|
|
6
|
+
- (eslint-plugin-putout) add-newlinew-before-function-call: trimed whitespaces on empty line
|
|
7
|
+
- (eslint-plugin-putout) add-newline-before-function-call: add support of comments
|
|
8
|
+
- (eslint-plugin-putout) add-newline-before-function-call: continue -> return
|
|
9
|
+
|
|
10
|
+
feature:
|
|
11
|
+
- (package) @putout/plugin-remove-constant-conditions v3.0.0
|
|
12
|
+
- (@putout/plugin-remove-constant-conditions) drop support of node < 14
|
|
13
|
+
- (@putout/plugin-remove-constant-conditions) add support of consequent not body
|
|
14
|
+
- (eslint-plugin-putout) safe: disable remove-unreachable-code
|
|
15
|
+
- (@putout/plugin-remove-unused-variables) improve support of OptionalMemberExpression
|
|
16
|
+
- (eslint-plugin-putout) add-newline-after-function-call: add support of ArrayExpression and ObjectExpression
|
|
17
|
+
- (eslint-plugin-putout) add add-newline-after-function-call
|
|
18
|
+
- (@putout/eslint-config) padding-line-between-statements: add support of while
|
|
19
|
+
- (eslint-plugin-putout) add add-newline-before-function-call
|
|
20
|
+
- (@putout/eslint-config) add func-call-spacing (https://eslint.org/docs/rules/func-call-spacing)
|
|
21
|
+
- (eslint-plugin-putout) plugin-tape-remove-newline-before-t-end: add support of trimed newline
|
|
22
|
+
- (eslint-plugin-putout) add add-newline-before-t-end
|
|
23
|
+
- (@putout/plugin-declare-undefined-variables) add maybeEmptyArray
|
|
24
|
+
- (eslint-plugin-putout) array-element-newline: add support of Identifier
|
|
25
|
+
- (@putout/eslint-config) padding-line-between-statements: add newline between for and return
|
|
26
|
+
- (@putout/plugin-remove-useless-spread) add support of logical expressions
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
2021.11.21, v22.1.1
|
|
30
|
+
|
|
31
|
+
feature:
|
|
32
|
+
- (package) yargs-parser v21.0.0
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
2021.11.21, v22.1.0
|
|
36
|
+
|
|
37
|
+
fix:
|
|
38
|
+
- (@putout/plugin-convert-quotes-to-backticks) a couple newlines
|
|
39
|
+
- (@putout/plugin-convert-quotes-to-backticks) newlines
|
|
40
|
+
|
|
41
|
+
feature:
|
|
42
|
+
- (putout) *.md: disable convert-quotes-to-backticks
|
|
43
|
+
- (@putout/plugin-convert-quotes-to-backtics) add support of newlines
|
|
44
|
+
- (eslint-plugin-putout) objects-braces-inside-array: enable for json, disable for yaml
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
2021.11.19, v22.0.2
|
|
48
|
+
|
|
49
|
+
fix:
|
|
50
|
+
- (@putout/plugin-convert-generic-to-shorthand) exclude when no type parameters
|
|
51
|
+
|
|
52
|
+
feature:
|
|
53
|
+
- (package) @putout/plugin-convert-generic-to-shorthand v2.0.0
|
|
54
|
+
- (@putout/plugin-convert-generic-to-shorthand) drop support of node < 14
|
|
55
|
+
- (eslint-plugin-putout) add array-element-newline
|
|
56
|
+
- (eslint-plugin-putout) add remove-empty-newline-before-first-specifier
|
|
57
|
+
- (@putout/engine-parser) export babel/plugins
|
|
58
|
+
- (@putout/engine-parser) export acorn, espree, esprima
|
|
59
|
+
- (@putout/engine-parser) export babel parser
|
|
60
|
+
- (@putout/plugin-tape) convert-ok-to-match: exclude: keys
|
|
61
|
+
- (@putout/plugin-tape) convert-ok-to-match: rm RegExp, t.match adds it
|
|
62
|
+
- (eslint-plugin-putout) single-property-destructuring: exclude ImportSpecifier with local different then imported
|
|
63
|
+
- (@putout/compare) add support of empty template
|
|
64
|
+
- (eslint-plugin-putout) remove-empty-newline-after-last-specifier: add support of ObjectExpression
|
|
65
|
+
|
|
66
|
+
|
|
1
67
|
2021.11.14, v22.0.1
|
|
2
68
|
|
|
3
69
|
fix:
|
|
4
70
|
- (putout) parse-options: read rules: directory with config -> current working directory
|
|
5
|
-
-
|
|
6
|
-
-
|
|
71
|
+
- (@putout/engine-processor) markdown disable change without fix in favour of simpler rules
|
|
72
|
+
- (@putout/processor-markdown) add support of rules splited to fix and traverse
|
|
7
73
|
|
|
8
74
|
feature:
|
|
9
75
|
- (@putout/rules-set-homepage) update homepage so it linked to package directory (#88)
|
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/help.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "22.0
|
|
3
|
+
"version": "22.2.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",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@putout/plugin-convert-for-each-to-for-of": "^6.0.0",
|
|
92
92
|
"@putout/plugin-convert-for-in-to-for-of": "^2.0.0",
|
|
93
93
|
"@putout/plugin-convert-for-to-for-of": "^2.0.0",
|
|
94
|
-
"@putout/plugin-convert-generic-to-shorthand": "^
|
|
94
|
+
"@putout/plugin-convert-generic-to-shorthand": "^2.0.0",
|
|
95
95
|
"@putout/plugin-convert-index-of-to-includes": "^1.0.0",
|
|
96
96
|
"@putout/plugin-convert-map-to-for-of": "^1.0.0",
|
|
97
97
|
"@putout/plugin-convert-math-pow": "^4.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",
|