eslint-plugin-putout 26.2.0 → 27.0.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/lib/json.mjs +13 -13
- package/lib/jsx.mjs +5 -5
- package/lib/markdown.mjs +2 -2
- package/lib/ts.mjs +12 -17
- package/package.json +4 -6
package/lib/json.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
2
2
|
import * as putout from './plugin.mjs';
|
|
3
3
|
|
|
4
4
|
export default [{
|
|
@@ -9,31 +9,31 @@ export default [{
|
|
|
9
9
|
],
|
|
10
10
|
rules: {
|
|
11
11
|
'no-undef': 'off',
|
|
12
|
-
'@stylistic/
|
|
12
|
+
'@stylistic/quotes': [
|
|
13
13
|
'error',
|
|
14
14
|
'double',
|
|
15
15
|
],
|
|
16
|
-
'@stylistic/
|
|
16
|
+
'@stylistic/quote-props': [
|
|
17
17
|
'error',
|
|
18
18
|
'always',
|
|
19
19
|
],
|
|
20
|
-
'@stylistic/
|
|
20
|
+
'@stylistic/comma-dangle': [
|
|
21
21
|
'error',
|
|
22
22
|
'never',
|
|
23
23
|
],
|
|
24
|
-
'@stylistic/
|
|
25
|
-
'@stylistic/
|
|
26
|
-
'@stylistic/
|
|
24
|
+
'@stylistic/comma-spacing': 'off',
|
|
25
|
+
'@stylistic/function-paren-newline': 'off',
|
|
26
|
+
'@stylistic/eol-last': [
|
|
27
27
|
'error',
|
|
28
28
|
'always',
|
|
29
29
|
],
|
|
30
|
-
'@stylistic/
|
|
30
|
+
'@stylistic/no-multi-spaces': 'off',
|
|
31
31
|
},
|
|
32
32
|
}, {
|
|
33
33
|
name: 'putout: json: package.json',
|
|
34
34
|
files: ['**/package.json'],
|
|
35
35
|
rules: {
|
|
36
|
-
'@stylistic/
|
|
36
|
+
'@stylistic/indent': [
|
|
37
37
|
'error',
|
|
38
38
|
2,
|
|
39
39
|
],
|
|
@@ -42,25 +42,25 @@ export default [{
|
|
|
42
42
|
name: 'putout: json: ignore',
|
|
43
43
|
files: ['**/*ignore{json}'],
|
|
44
44
|
rules: {
|
|
45
|
-
'@stylistic/
|
|
45
|
+
'@stylistic/comma-dangle': 'off',
|
|
46
46
|
},
|
|
47
47
|
}, {
|
|
48
48
|
name: 'putout: json: yaml',
|
|
49
49
|
files: ['**/*.{yml,yaml}{json}'],
|
|
50
50
|
plugins: {
|
|
51
|
-
'@stylistic':
|
|
51
|
+
'@stylistic': stylistic,
|
|
52
52
|
putout,
|
|
53
53
|
},
|
|
54
54
|
rules: {
|
|
55
55
|
'putout/objects-braces-inside-array': 'off',
|
|
56
|
-
'@stylistic/
|
|
56
|
+
'@stylistic/indent': 'off',
|
|
57
57
|
'comma-spacing': 'off',
|
|
58
58
|
},
|
|
59
59
|
}, {
|
|
60
60
|
name: 'putout: json: filesystem',
|
|
61
61
|
files: ['**/.filesystem.json'],
|
|
62
62
|
plugins: {
|
|
63
|
-
'@stylistic':
|
|
63
|
+
'@stylistic': stylistic,
|
|
64
64
|
putout,
|
|
65
65
|
},
|
|
66
66
|
rules: {
|
package/lib/jsx.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
2
2
|
import react from 'eslint-plugin-react';
|
|
3
3
|
|
|
4
4
|
export const jsx = {
|
|
5
5
|
name: 'putout: jsx',
|
|
6
6
|
rules: {
|
|
7
|
-
'@stylistic/
|
|
8
|
-
'@stylistic/jsx
|
|
9
|
-
'@stylistic/jsx
|
|
7
|
+
'@stylistic/no-extra-parens': 'off',
|
|
8
|
+
'@stylistic/jsx-indent': 'error',
|
|
9
|
+
'@stylistic/jsx-wrap-multilines': ['error', {
|
|
10
10
|
arrow: 'parens-new-line',
|
|
11
11
|
return: 'parens-new-line',
|
|
12
12
|
declaration: 'parens-new-line',
|
|
@@ -14,7 +14,7 @@ export const jsx = {
|
|
|
14
14
|
},
|
|
15
15
|
plugins: {
|
|
16
16
|
react,
|
|
17
|
-
'@stylistic
|
|
17
|
+
'@stylistic': stylistic,
|
|
18
18
|
},
|
|
19
19
|
settings: {
|
|
20
20
|
react: {
|
package/lib/markdown.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {jsx} from './jsx.mjs';
|
|
|
7
7
|
const [ts, tsx] = tsConfig;
|
|
8
8
|
|
|
9
9
|
const commonRules = {
|
|
10
|
-
'@stylistic/
|
|
10
|
+
'@stylistic/eol-last': [
|
|
11
11
|
'error',
|
|
12
12
|
'never',
|
|
13
13
|
],
|
|
@@ -96,7 +96,7 @@ export default [{
|
|
|
96
96
|
name: 'putout: md: json',
|
|
97
97
|
files: ['**/*.md{json}'],
|
|
98
98
|
rules: {
|
|
99
|
-
'@stylistic/
|
|
99
|
+
'@stylistic/eol-last': [
|
|
100
100
|
'error',
|
|
101
101
|
'never',
|
|
102
102
|
],
|
package/lib/ts.mjs
CHANGED
|
@@ -2,14 +2,14 @@ import {rules} from '@putout/eslint-config';
|
|
|
2
2
|
import parser from '@typescript-eslint/parser';
|
|
3
3
|
import tseslint from 'typescript-eslint';
|
|
4
4
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
5
|
-
import
|
|
5
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
6
6
|
import {jsx} from './jsx.mjs';
|
|
7
7
|
import * as plugin from './plugin.mjs';
|
|
8
8
|
|
|
9
9
|
const {assign} = Object;
|
|
10
10
|
|
|
11
11
|
const reEnable = (rule) => ({
|
|
12
|
-
[`@stylistic
|
|
12
|
+
[`@stylistic/${rule}`]: 'error',
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
const warnOnUnsupportedTypeScriptVersion = false;
|
|
@@ -26,7 +26,7 @@ const handled = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const broken = {
|
|
29
|
-
'@stylistic/
|
|
29
|
+
'@stylistic/indent': 'off',
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const slow = {
|
|
@@ -42,24 +42,19 @@ const extensionRules = {
|
|
|
42
42
|
'no-undef': 'off',
|
|
43
43
|
'no-var': 'off',
|
|
44
44
|
|
|
45
|
-
'@stylistic/
|
|
45
|
+
'@stylistic/comma-spacing': 'error',
|
|
46
46
|
|
|
47
|
-
'@stylistic/
|
|
47
|
+
'@stylistic/lines-between-class-members': 'off',
|
|
48
48
|
|
|
49
|
-
'@stylistic/
|
|
50
|
-
'@stylistic/ts/padding-line-between-statements': convertPaddingLines(rules['@stylistic/js/padding-line-between-statements']),
|
|
49
|
+
'@stylistic/padding-line-between-statements': convertPaddingLines(rules['@stylistic/padding-line-between-statements']),
|
|
51
50
|
|
|
52
|
-
'@stylistic/
|
|
53
|
-
'@stylistic/ts/object-curly-spacing': rules['@stylistic/js/object-curly-spacing'],
|
|
51
|
+
'@stylistic/object-curly-spacing': rules['@stylistic/object-curly-spacing'],
|
|
54
52
|
|
|
55
|
-
'@stylistic/
|
|
56
|
-
'@stylistic/ts/semi': rules['@stylistic/js/semi'],
|
|
53
|
+
'@stylistic/semi': rules['@stylistic/semi'],
|
|
57
54
|
|
|
58
|
-
'@stylistic/
|
|
59
|
-
'@stylistic/ts/no-extra-parens': rules['@stylistic/js/no-extra-parens'],
|
|
55
|
+
'@stylistic/no-extra-parens': rules['@stylistic/no-extra-parens'],
|
|
60
56
|
|
|
61
|
-
'@stylistic/
|
|
62
|
-
'@stylistic/ts/space-before-function-paren': rules['@stylistic/js/space-before-function-paren'],
|
|
57
|
+
'@stylistic/space-before-function-paren': rules['@stylistic/space-before-function-paren'],
|
|
63
58
|
|
|
64
59
|
...reEnable('object-curly-spacing'),
|
|
65
60
|
...reEnable('func-call-spacing'),
|
|
@@ -99,7 +94,7 @@ const ts = {
|
|
|
99
94
|
},
|
|
100
95
|
plugins: {
|
|
101
96
|
'@typescript-eslint': tsPlugin,
|
|
102
|
-
'@stylistic
|
|
97
|
+
'@stylistic': stylistic,
|
|
103
98
|
'putout': plugin,
|
|
104
99
|
},
|
|
105
100
|
rules: {
|
|
@@ -109,7 +104,7 @@ const ts = {
|
|
|
109
104
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
110
105
|
'@typescript-eslint/ban-types': 'off',
|
|
111
106
|
'@typescript-eslint/no-empty-function': 'off',
|
|
112
|
-
'@stylistic/
|
|
107
|
+
'@stylistic/type-annotation-spacing': 'error',
|
|
113
108
|
},
|
|
114
109
|
};
|
|
115
110
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "27.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "ESLint plugin for 🐊Putout",
|
|
6
6
|
"release": false,
|
|
@@ -42,11 +42,9 @@
|
|
|
42
42
|
"@eslint/eslintrc": "^3.0.0",
|
|
43
43
|
"@putout/engine-parser": "^13.0.0",
|
|
44
44
|
"@putout/eslint": "^4.0.0",
|
|
45
|
-
"@putout/eslint-config": "^
|
|
45
|
+
"@putout/eslint-config": "^12.0.0",
|
|
46
46
|
"@putout/eslint-flat": "^3.0.0",
|
|
47
|
-
"@stylistic/eslint-plugin
|
|
48
|
-
"@stylistic/eslint-plugin-jsx": "^4.0.1",
|
|
49
|
-
"@stylistic/eslint-plugin-ts": "^4.0.1",
|
|
47
|
+
"@stylistic/eslint-plugin": "^4.4.0",
|
|
50
48
|
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
51
49
|
"@typescript-eslint/parser": "^8.3.0",
|
|
52
50
|
"align-spaces": "^2.0.0",
|
|
@@ -78,7 +76,7 @@
|
|
|
78
76
|
},
|
|
79
77
|
"peerDependencies": {
|
|
80
78
|
"eslint": ">=9",
|
|
81
|
-
"putout": ">=
|
|
79
|
+
"putout": ">=40"
|
|
82
80
|
},
|
|
83
81
|
"license": "MIT",
|
|
84
82
|
"publishConfig": {
|