putout 22.3.4 → 22.4.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 +16 -0
- package/README.md +2 -0
- package/lib/cli/get-options.js +18 -1
- package/package.json +2 -2
package/ChangeLog
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
2021.12.02, v22.4.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- (putout) add env variable PUTOUT_CONFIG_FILE
|
|
5
|
+
- (eslint-plugin-putout) ts: add extension rules
|
|
6
|
+
- (eslint-plugin-putout) ts: enable @typescript-eslint/type-annotation-spacing
|
|
7
|
+
- (eslint-plugin-putout) safe: add remove-useless-arguments
|
|
8
|
+
- (eslint-plugin-putout) tape-remove-newline-before-t-end: add support of case when no assertions found before t.end()
|
|
9
|
+
- (eslint-plugin-putout) ts: disable: ban-types, no-explicit-any, no-empty-function
|
|
10
|
+
- (package) eslint-plugin-putout v12.0.0
|
|
11
|
+
- (eslint-plugin-putout) drop support of putout < 22
|
|
12
|
+
- (eslint-plugin-putout) add first class support of typescript
|
|
13
|
+
- (eslint-plugin-putout) improve support of add-newline-{before,after}-function-call
|
|
14
|
+
- (@putout/plugin-remove-empty-pattern) add support of nested ArrayPattern
|
|
15
|
+
|
|
16
|
+
|
|
1
17
|
2021.12.01, v22.3.4
|
|
2
18
|
|
|
3
19
|
fix:
|
package/README.md
CHANGED
|
@@ -153,6 +153,8 @@ putout lib --plugins remove-debugger,remove-unused-variables
|
|
|
153
153
|
🐊`Putout` supports next `environment variables`:
|
|
154
154
|
|
|
155
155
|
- `PUTOUT_FILES` - files that should be processed by putout, divided by ",";
|
|
156
|
+
- `PUTOUT_CONFIG_FILE` - path to 🐊`Putout` config file;
|
|
157
|
+
- `ESLINT_CONFIG_FILE` - path to `ESLint` config file;
|
|
156
158
|
|
|
157
159
|
```sh
|
|
158
160
|
PUTOUT_FILES=lib,test putout --fix
|
package/lib/cli/get-options.js
CHANGED
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const {
|
|
4
|
+
join,
|
|
5
|
+
dirname,
|
|
6
|
+
} = require('path');
|
|
4
7
|
|
|
5
8
|
const buildPlugins = require('./build-plugins');
|
|
6
9
|
const parseOptions = require('../parse-options');
|
|
7
10
|
|
|
11
|
+
const {assign} = Object;
|
|
12
|
+
const {env} = process;
|
|
13
|
+
const {PUTOUT_CONFIG_FILE} = env;
|
|
14
|
+
|
|
15
|
+
const maybeConfig = {
|
|
16
|
+
plugins: [],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
PUTOUT_CONFIG_FILE && assign(maybeConfig, require(join(process.cwd(), PUTOUT_CONFIG_FILE)));
|
|
20
|
+
|
|
8
21
|
module.exports = ({noConfig, plugins, name, transform, rulesdir}) => {
|
|
9
22
|
const transformPlugins = buildPlugins(transform);
|
|
10
23
|
|
|
11
24
|
if (noConfig)
|
|
12
25
|
return {
|
|
26
|
+
...maybeConfig,
|
|
13
27
|
dir: dirname(name),
|
|
14
28
|
plugins: [
|
|
15
29
|
...plugins,
|
|
16
30
|
...transformPlugins,
|
|
31
|
+
...maybeConfig.plugins,
|
|
17
32
|
],
|
|
18
33
|
};
|
|
19
34
|
|
|
@@ -24,9 +39,11 @@ module.exports = ({noConfig, plugins, name, transform, rulesdir}) => {
|
|
|
24
39
|
|
|
25
40
|
return {
|
|
26
41
|
...result,
|
|
42
|
+
...maybeConfig,
|
|
27
43
|
plugins: [
|
|
28
44
|
...result.plugins,
|
|
29
45
|
...transformPlugins,
|
|
46
|
+
...maybeConfig.plugins,
|
|
30
47
|
],
|
|
31
48
|
};
|
|
32
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.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",
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"currify": "^4.0.0",
|
|
221
221
|
"eslint": "^8.0.1",
|
|
222
222
|
"eslint-plugin-node": "^11.0.0",
|
|
223
|
-
"eslint-plugin-putout": "^
|
|
223
|
+
"eslint-plugin-putout": "^12.0.0",
|
|
224
224
|
"just-camel-case": "^4.0.2",
|
|
225
225
|
"lerna": "^4.0.0",
|
|
226
226
|
"madrun": "^8.6.0",
|