eslint-plugin-putout 11.19.0 → 12.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/add-newline-after-function-call/index.js +1 -1
- package/lib/markdown.js +8 -2
- package/lib/ts.js +32 -9
- package/package.json +7 -7
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
|
|
13
13
|
const regExp = /^;?\n( +)?\n +$/;
|
|
14
14
|
|
|
15
|
-
module.exports.category = '
|
|
15
|
+
module.exports.category = 'layout';
|
|
16
16
|
module.exports.report = () => 'Add newline after function call';
|
|
17
17
|
|
|
18
18
|
module.exports.filter = ({text, node, getText, getCommentsAfter}) => {
|
package/lib/markdown.js
CHANGED
|
@@ -33,13 +33,19 @@ module.exports = [{
|
|
|
33
33
|
parserOpts,
|
|
34
34
|
plugins: [
|
|
35
35
|
'@babel/plugin-syntax-class-properties',
|
|
36
|
-
'@babel/plugin-syntax-top-level-await',
|
|
37
36
|
],
|
|
38
37
|
},
|
|
39
38
|
},
|
|
40
39
|
}, {
|
|
41
40
|
...ts,
|
|
42
41
|
files: '*.md{ts}',
|
|
43
|
-
rules:
|
|
42
|
+
rules: {
|
|
43
|
+
...commonRules,
|
|
44
|
+
...ts.rules,
|
|
45
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
46
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
47
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
48
|
+
'@typescript-eslint/array-type': 'off',
|
|
49
|
+
},
|
|
44
50
|
}];
|
|
45
51
|
|
package/lib/ts.js
CHANGED
|
@@ -1,21 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
module.exports = [{
|
|
3
|
+
const ts = {
|
|
6
4
|
files: '*.ts',
|
|
7
|
-
parser: '@
|
|
5
|
+
parser: '@typescript-eslint/parser',
|
|
8
6
|
parserOptions: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
parserOpts,
|
|
12
|
-
plugins: ['@babel/plugin-syntax-typescript'],
|
|
7
|
+
ecmaFeatures: {
|
|
8
|
+
jsx: false,
|
|
13
9
|
},
|
|
14
10
|
},
|
|
11
|
+
plugins: [
|
|
12
|
+
'@typescript-eslint',
|
|
13
|
+
],
|
|
14
|
+
extends: [
|
|
15
|
+
'plugin:@typescript-eslint/recommended',
|
|
16
|
+
],
|
|
15
17
|
rules: {
|
|
16
18
|
'no-undef': 'off',
|
|
17
19
|
'no-var': 'off',
|
|
18
20
|
'putout/no-unresolved': 'off',
|
|
21
|
+
'semi': 'off',
|
|
22
|
+
'@typescript-eslint/semi': 'error',
|
|
23
|
+
'@typescript-eslint/array-type': 'error',
|
|
24
|
+
'space-before-function-paren': 'off',
|
|
25
|
+
'@typescript-eslint/space-before-function-paren': ['error', {
|
|
26
|
+
anonymous: 'never',
|
|
27
|
+
named: 'never',
|
|
28
|
+
asyncArrow: 'always',
|
|
29
|
+
}],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
module.exports = [
|
|
34
|
+
ts, {
|
|
35
|
+
...ts,
|
|
36
|
+
files: '*.tsx',
|
|
37
|
+
parserOptions: {
|
|
38
|
+
ecmaFeatures: {
|
|
39
|
+
jsx: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
19
42
|
},
|
|
20
|
-
|
|
43
|
+
];
|
|
21
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "eslint plugin for putout",
|
|
5
5
|
"release": false,
|
|
6
6
|
"tag": false,
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@babel/core": "^7.12.3",
|
|
37
37
|
"@babel/eslint-parser": "^7.15.0",
|
|
38
38
|
"@babel/plugin-syntax-class-properties": "^7.12.1",
|
|
39
|
-
"@babel/plugin-syntax-top-level-await": "^7.12.1",
|
|
40
|
-
"@babel/plugin-syntax-typescript": "^7.12.1",
|
|
41
39
|
"@putout/engine-parser": "^4.6.0",
|
|
42
40
|
"@putout/eslint-config": "^6.0.0",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
42
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
43
43
|
"align-spaces": "^1.0.0",
|
|
44
44
|
"eslint-plugin-node": "^11.0.0",
|
|
45
45
|
"estree-to-babel": "^4.0.1",
|
|
46
|
-
"try-catch": "^3.0.0"
|
|
46
|
+
"try-catch": "^3.0.0",
|
|
47
|
+
"typescript": "^4.5.2"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@typescript-eslint/parser": "^5.4.0",
|
|
50
50
|
"c8": "^7.5.0",
|
|
51
51
|
"eslint": "^8.0.1",
|
|
52
52
|
"eslint-plugin-eslint-plugin": "^3.2.0",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"simport": "^1.2.0",
|
|
57
57
|
"supertape": "^6.6.0",
|
|
58
58
|
"try-to-catch": "^3.0.0",
|
|
59
|
-
"typescript": "^
|
|
59
|
+
"@babel/plugin-syntax-typescript": "^7.12.1"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=14"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"eslint": ">=8.0.0",
|
|
66
|
-
"putout": ">=
|
|
66
|
+
"putout": ">=22"
|
|
67
67
|
},
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"publishConfig": {
|