eslint-plugin-putout 23.0.0 → 23.1.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.
Files changed (2) hide show
  1. package/lib/ts.js +28 -7
  2. package/package.json +3 -3
package/lib/ts.js CHANGED
@@ -9,14 +9,36 @@ const reEnable = (rule) => ({
9
9
 
10
10
  const warnOnUnsupportedTypeScriptVersion = false;
11
11
 
12
+ const noFix = {
13
+ '@typescript-eslint/no-unsafe-function-type': 'off',
14
+ '@typescript-eslint/no-require-imports': 'off',
15
+ '@typescript-eslint/no-empty-object-type': 'off',
16
+ };
17
+
18
+ const handled = {
19
+ '@typescript-eslint/no-extra-non-null-assertion': 'off',
20
+ '@stylistic/brace-style': 'off', // putout/object-property-newline instead
21
+ };
22
+
23
+ const broken = {
24
+ '@stylistic/ts/indent': 'off',
25
+ };
26
+
27
+ const slow = {
28
+ '@typescript-eslint/dot-notation': 'off',
29
+ '@typescript-eslint/require-await': 'off',
30
+ };
31
+
12
32
  const extensionRules = {
33
+ ...noFix,
34
+ ...handled,
35
+ ...broken,
36
+ ...slow,
13
37
  'no-undef': 'off',
14
38
  'no-var': 'off',
15
39
 
16
40
  '@stylistic/ts/comma-spacing': 'error',
17
41
 
18
- '@stylistic/ts/indent': 'off', // broken
19
- '@stylistic/brace-style': 'off', // putout/object-property-newline instead
20
42
  '@stylistic/ts/lines-between-class-members': 'off',
21
43
 
22
44
  '@stylistic/js/padding-line-between-statements': 'off',
@@ -28,25 +50,24 @@ const extensionRules = {
28
50
  '@stylistic/js/semi': 'off',
29
51
  '@stylistic/ts/semi': rules['@stylistic/js/semi'],
30
52
 
53
+ '@stylistic/js/no-extra-parens': 'off',
54
+ '@stylistic/ts/no-extra-parens': rules['@stylistic/js/no-extra-parens'],
55
+
31
56
  '@stylistic/js/space-before-function-paren': 'off',
32
57
  '@stylistic/ts/space-before-function-paren': rules['@stylistic/js/space-before-function-paren'],
33
58
 
34
59
  ...reEnable('object-curly-spacing'),
35
60
  ...reEnable('func-call-spacing'),
36
61
  '@typescript-eslint/no-array-constructor': 'off',
37
- '@typescript-eslint/dot-notation': 'off', // requires type information
38
- '@typescript-eslint/no-extra-parens': 'error',
39
62
  '@typescript-eslint/no-implied-eval': 'off',
40
63
 
41
64
  'no-unused-vars': 'off',
42
65
  '@typescript-eslint/no-unused-vars': 'error',
43
66
 
44
- '@typescript-eslint/require-await': 'off', // needs project information
45
67
  'no-redeclare': 'off',
46
68
  '@typescript-eslint/no-redeclare': 'error',
47
69
 
48
70
  '@typescript-eslint/no-unsafe-declaration-merging': 'error',
49
- '@typescript-eslint/no-extra-non-null-assertion': 'off',
50
71
  };
51
72
 
52
73
  const ts = {
@@ -66,7 +87,7 @@ const ts = {
66
87
  '@typescript-eslint/no-explicit-any': 'off',
67
88
  '@typescript-eslint/ban-types': 'off',
68
89
  '@typescript-eslint/no-empty-function': 'off',
69
- '@typescript-eslint/type-annotation-spacing': 'error',
90
+ '@stylistic/ts/type-annotation-spacing': 'error',
70
91
  },
71
92
  };
72
93
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "23.0.0",
3
+ "version": "23.1.0",
4
4
  "type": "commonjs",
5
5
  "description": "ESLint plugin for 🐊Putout",
6
6
  "release": false,
@@ -46,8 +46,8 @@
46
46
  "@putout/eslint-config": "^9.0.0",
47
47
  "@stylistic/eslint-plugin-jsx": "^2.1.0",
48
48
  "@stylistic/eslint-plugin-ts": "^2.1.0",
49
- "@typescript-eslint/eslint-plugin": "^7.0.1",
50
- "@typescript-eslint/parser": "^7.0.1",
49
+ "@typescript-eslint/eslint-plugin": "^8.3.0",
50
+ "@typescript-eslint/parser": "^8.3.0",
51
51
  "align-spaces": "^1.0.0",
52
52
  "eslint-plugin-n": "^17.0.0",
53
53
  "eslint-plugin-react": "^7.32.2",