@putout/eslint-config 6.9.0 → 6.12.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 +7 -9
- package/eslintrc.js +11 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/eslint-config.svg?style=flat&longCache=true
|
|
4
4
|
[NPMURL]: https://npmjs.org/package/@putout/eslint-config "npm"
|
|
5
5
|
|
|
6
|
-
🐊[
|
|
6
|
+
🐊[**Putout**](https://github.com/coderaiser/putout) config for **ESLint**. If 🐊**Putout** brakes formatting **ESLint** will fix it back 😉.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -34,22 +34,20 @@ Add `scripts` section to `package.json`:
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
And create
|
|
37
|
+
And create [`.madrun.mjs`](https://github.com/coderaiser/madrun):
|
|
38
38
|
|
|
39
39
|
```js
|
|
40
|
-
|
|
40
|
+
import {series} from 'madrun';
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'lint': () => series(['putout', 'eslint']),
|
|
46
|
-
'fix:lint': () => series(['putout', 'eslint'], '--fix'),
|
|
42
|
+
export default {
|
|
43
|
+
'lint': () => 'putout lib test',
|
|
44
|
+
'fix:lint': () => run('lint', '--fix'),
|
|
47
45
|
};
|
|
48
46
|
```
|
|
49
47
|
|
|
50
48
|
```sh
|
|
51
49
|
$ npm run lint
|
|
52
|
-
$ npm run lint
|
|
50
|
+
$ npm run fix:lint
|
|
53
51
|
|
|
54
52
|
```
|
|
55
53
|
|
package/eslintrc.js
CHANGED
|
@@ -27,10 +27,13 @@ module.exports = {
|
|
|
27
27
|
'=': 'none',
|
|
28
28
|
'|': 'before',
|
|
29
29
|
'||': 'before',
|
|
30
|
+
':': 'before',
|
|
31
|
+
'?': 'before',
|
|
30
32
|
},
|
|
31
33
|
}],
|
|
32
34
|
'function-paren-newline': ['error', 'multiline-arguments'],
|
|
33
35
|
'key-spacing': 'error',
|
|
36
|
+
'newline-per-chained-call': 'error',
|
|
34
37
|
'space-infix-ops': ['error', {
|
|
35
38
|
int32Hint: false,
|
|
36
39
|
}],
|
|
@@ -129,6 +132,14 @@ module.exports = {
|
|
|
129
132
|
blankLine: 'always',
|
|
130
133
|
prev: '*',
|
|
131
134
|
next: 'while',
|
|
135
|
+
}, {
|
|
136
|
+
blankLine: 'always',
|
|
137
|
+
prev: '*',
|
|
138
|
+
next: 'function',
|
|
139
|
+
}, {
|
|
140
|
+
blankLine: 'any',
|
|
141
|
+
prev: 'cjs-export',
|
|
142
|
+
next: 'function',
|
|
132
143
|
}],
|
|
133
144
|
'require-atomic-updates': 'off',
|
|
134
145
|
'yoda': 'error',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "putout config for eslint",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"fresh:lint": "madrun fresh:lint",
|
|
22
22
|
"lint:fresh": "madrun lint:fresh",
|
|
23
23
|
"fix:lint": "madrun fix:lint",
|
|
24
|
-
"prepublishOnly": "madrun prepublishOnly"
|
|
24
|
+
"prepublishOnly": "madrun prepublishOnly",
|
|
25
|
+
"wisdom": "madrun wisdom"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {},
|
|
27
28
|
"peerDependencies": {
|
|
@@ -34,9 +35,9 @@
|
|
|
34
35
|
"eslint-config"
|
|
35
36
|
],
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@putout/test": "^
|
|
38
|
+
"@putout/test": "^5.0.0",
|
|
38
39
|
"c8": "^7.5.0",
|
|
39
|
-
"madrun": "^
|
|
40
|
+
"madrun": "^9.0.0",
|
|
40
41
|
"putout": "*"
|
|
41
42
|
},
|
|
42
43
|
"license": "MIT",
|