eslint-plugin-putout 16.1.0 → 16.3.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/README.md +14 -0
- package/lib/config/index.js +39 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -160,6 +160,20 @@ Disabled 🐊**Putout** rules:
|
|
|
160
160
|
|
|
161
161
|
When you want to enable ability to align spaces on empty lines, while have all benefits of `safe` preset: use `safe+align`.
|
|
162
162
|
|
|
163
|
+
## Flat
|
|
164
|
+
|
|
165
|
+
The time is came for a [FlatConfig](https://eslint.org/blog/2022/08/new-config-system-part-2/). To use it with `eslint-plugin-putout` add to `eslint.config.js`:
|
|
166
|
+
|
|
167
|
+
```js
|
|
168
|
+
const {recommended} = require('eslint-plugin-putout/config');
|
|
169
|
+
module.exports = [
|
|
170
|
+
...recommended, {
|
|
171
|
+
},
|
|
172
|
+
];
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
`safe` and `safeAlign` supported as well.
|
|
176
|
+
|
|
163
177
|
## License
|
|
164
178
|
|
|
165
179
|
MIT
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const nPlugin = require('eslint-plugin-n');
|
|
4
|
+
const {FlatCompat} = require('@eslint/eslintrc');
|
|
5
|
+
const putoutPlugin = require('..');
|
|
6
|
+
|
|
7
|
+
const getPutoutConfig = (name) => compat.config(putoutPlugin.configs[name]);
|
|
8
|
+
|
|
9
|
+
const compat = new FlatCompat({
|
|
10
|
+
baseDirectory: __dirname,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const n = compat.config(nPlugin.configs.recommended);
|
|
14
|
+
|
|
15
|
+
const plugins = [{
|
|
16
|
+
plugins: {
|
|
17
|
+
putout: putoutPlugin,
|
|
18
|
+
},
|
|
19
|
+
}];
|
|
20
|
+
|
|
21
|
+
module.exports.recommended = [
|
|
22
|
+
...n,
|
|
23
|
+
...getPutoutConfig('recommended'),
|
|
24
|
+
...plugins,
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
module.exports.safe = [
|
|
28
|
+
...n,
|
|
29
|
+
...compat.config(putoutPlugin.configs.safe),
|
|
30
|
+
...getPutoutConfig('safe'),
|
|
31
|
+
...plugins,
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
module.exports.safeAlign = [
|
|
35
|
+
...n,
|
|
36
|
+
...getPutoutConfig('safe+align'),
|
|
37
|
+
...plugins,
|
|
38
|
+
];
|
|
39
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "ESLint plugin for 🐊Putout",
|
|
6
6
|
"release": false,
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/coderaiser/putout.git"
|
|
13
13
|
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./lib/index.js",
|
|
16
|
+
"./config": "./lib/config/index.js"
|
|
17
|
+
},
|
|
14
18
|
"keywords": [
|
|
15
19
|
"putout",
|
|
16
20
|
"eslint",
|
|
@@ -39,8 +43,9 @@
|
|
|
39
43
|
"@babel/eslint-parser": "^7.15.0",
|
|
40
44
|
"@babel/plugin-syntax-class-properties": "^7.12.1",
|
|
41
45
|
"@babel/traverse": "^7.16.3",
|
|
46
|
+
"@eslint/eslintrc": "^1.3.1",
|
|
42
47
|
"@putout/engine-parser": "^5.0.0",
|
|
43
|
-
"@putout/eslint": "^1.
|
|
48
|
+
"@putout/eslint": "^1.3.0",
|
|
44
49
|
"@putout/eslint-config": "^7.0.0",
|
|
45
50
|
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
46
51
|
"@typescript-eslint/parser": "^5.4.0",
|
|
@@ -59,7 +64,7 @@
|
|
|
59
64
|
"mocha": "^10.0.0",
|
|
60
65
|
"montag": "^1.0.0",
|
|
61
66
|
"simport": "^1.2.0",
|
|
62
|
-
"supertape": "^
|
|
67
|
+
"supertape": "^8.0.0",
|
|
63
68
|
"try-to-catch": "^3.0.0"
|
|
64
69
|
},
|
|
65
70
|
"engines": {
|