@nfq/eslint-config 3.2.2 → 3.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.
@@ -0,0 +1,72 @@
1
+ module.exports = {
2
+ rules: {
3
+ '@stylistic/ts/brace-style': ['error', '1tbs', {allowSingleLine: false}],
4
+ '@stylistic/ts/comma-dangle': ['error', 'never'],
5
+ '@stylistic/ts/comma-spacing': [
6
+ 'error',
7
+ {
8
+ after: true,
9
+ before: false
10
+ }
11
+ ],
12
+ '@stylistic/ts/function-call-spacing': ['error', 'never'],
13
+ '@stylistic/ts/keyword-spacing': [
14
+ 'error',
15
+ {
16
+ after: true,
17
+ before: true
18
+ }
19
+ ],
20
+ '@stylistic/ts/lines-between-class-members': [
21
+ 'error',
22
+ 'always',
23
+ {exceptAfterSingleLine: false}
24
+ ],
25
+ '@stylistic/ts/member-delimiter-style': [
26
+ 'error',
27
+ {
28
+ multiline: {
29
+ delimiter: 'semi',
30
+ requireLast: true
31
+ },
32
+ multilineDetection: 'brackets',
33
+ singleline: {
34
+ delimiter: 'semi',
35
+ requireLast: false
36
+ }
37
+ }
38
+ ],
39
+ '@stylistic/ts/no-extra-semi': 'error',
40
+ '@stylistic/ts/object-curly-spacing': ['error', 'never'],
41
+ '@stylistic/ts/padding-line-between-statements': [
42
+ 'error',
43
+ {
44
+ blankLine: 'always',
45
+ next: '*',
46
+ prev: ['const', 'let', 'var']
47
+ },
48
+ {
49
+ blankLine: 'any',
50
+ next: ['const', 'let', 'var'],
51
+ prev: ['const', 'let', 'var']
52
+ }
53
+ ],
54
+ '@stylistic/ts/quotes': [
55
+ 'error',
56
+ 'single',
57
+ {avoidEscape: true}
58
+ ],
59
+ '@stylistic/ts/semi': 'error',
60
+ '@stylistic/ts/space-before-blocks': ['error', 'always'],
61
+ '@stylistic/ts/space-before-function-paren': [
62
+ 'error',
63
+ {
64
+ anonymous: 'never',
65
+ asyncArrow: 'always',
66
+ named: 'never'
67
+ }
68
+ ],
69
+ '@stylistic/ts/space-infix-ops': 'error',
70
+ '@stylistic/ts/type-annotation-spacing': 'error'
71
+ }
72
+ };
@@ -0,0 +1,179 @@
1
+ /* eslint-disable no-inline-comments */
2
+ module.exports = {
3
+ rules: {
4
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
5
+ '@typescript-eslint/array-type': ['error', {default: 'array'}],
6
+ '@typescript-eslint/class-literal-property-style': 'error',
7
+ '@typescript-eslint/consistent-generic-constructors': ['error', 'constructor'],
8
+ '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
9
+ '@typescript-eslint/consistent-type-assertions': ['error', {assertionStyle: 'as'}],
10
+ '@typescript-eslint/consistent-type-definitions': 'off',
11
+ '@typescript-eslint/consistent-type-exports': 'error',
12
+ '@typescript-eslint/consistent-type-imports': [
13
+ 'error',
14
+ {
15
+ disallowTypeAnnotations: true,
16
+ prefer: 'type-imports'
17
+ }
18
+ ],
19
+ '@typescript-eslint/default-param-last': 'error',
20
+ '@typescript-eslint/dot-notation': ['error', {allowKeywords: true}],
21
+ '@typescript-eslint/explicit-function-return-type': 'off',
22
+ '@typescript-eslint/explicit-member-accessibility': ['error', {accessibility: 'no-public'}],
23
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
24
+ '@typescript-eslint/indent': 'off',
25
+ '@typescript-eslint/init-declarations': 'off',
26
+ '@typescript-eslint/member-ordering': [
27
+ 'error',
28
+ {
29
+ default: {order: 'as-written'},
30
+ interfaces: {order: 'alphabetically-case-insensitive'},
31
+ typeLiterals: {order: 'alphabetically-case-insensitive'}
32
+ }
33
+ ],
34
+ '@typescript-eslint/method-signature-style': ['error', 'method'],
35
+ '@typescript-eslint/no-array-constructor': 'error',
36
+ '@typescript-eslint/no-base-to-string': 'error',
37
+ '@typescript-eslint/no-confusing-non-null-assertion': 'warn',
38
+ '@typescript-eslint/no-confusing-void-expression': 'off',
39
+ '@typescript-eslint/no-dupe-class-members': 'error',
40
+ '@typescript-eslint/no-duplicate-enum-values': 'warn',
41
+ '@typescript-eslint/no-dynamic-delete': 'off',
42
+ '@typescript-eslint/no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],
43
+ '@typescript-eslint/no-empty-interface': 'error',
44
+ '@typescript-eslint/no-empty-object-type': 'error',
45
+ '@typescript-eslint/no-explicit-any': 'off',
46
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
47
+ '@typescript-eslint/no-extraneous-class': 'off',
48
+ '@typescript-eslint/no-floating-promises': 'error',
49
+ '@typescript-eslint/no-for-in-array': 'error',
50
+ '@typescript-eslint/no-implied-eval': 'error',
51
+ '@typescript-eslint/no-inferrable-types': 'error',
52
+ '@typescript-eslint/no-invalid-this': 'error',
53
+ '@typescript-eslint/no-invalid-void-type': 'off',
54
+ '@typescript-eslint/no-loop-func': 'error',
55
+ '@typescript-eslint/no-loss-of-precision': 'error',
56
+ '@typescript-eslint/no-misused-new': 'error',
57
+ '@typescript-eslint/no-misused-promises': ['error', {checksVoidReturn: false}],
58
+ '@typescript-eslint/no-namespace': [
59
+ 'error',
60
+ {
61
+ allowDeclarations: true,
62
+ allowDefinitionFiles: true
63
+ }
64
+ ],
65
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
66
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
67
+ '@typescript-eslint/no-non-null-assertion': 'off',
68
+ '@typescript-eslint/no-redeclare': 'error',
69
+ '@typescript-eslint/no-redundant-type-constituents': 'warn',
70
+ '@typescript-eslint/no-require-imports': 'warn',
71
+ '@typescript-eslint/no-shadow': 'error',
72
+ '@typescript-eslint/no-this-alias': ['error', {allowedNames: ['self']}],
73
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
74
+ '@typescript-eslint/no-unnecessary-condition': 'error',
75
+ '@typescript-eslint/no-unnecessary-qualifier': 'error',
76
+ '@typescript-eslint/no-unnecessary-type-arguments': 'warn',
77
+ '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
78
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
79
+ '@typescript-eslint/no-unsafe-argument': 'error',
80
+ '@typescript-eslint/no-unsafe-assignment': 'off',
81
+ '@typescript-eslint/no-unsafe-call': 'error',
82
+ '@typescript-eslint/no-unsafe-function-type': 'error',
83
+ '@typescript-eslint/no-unsafe-member-access': 'error',
84
+ '@typescript-eslint/no-unsafe-return': 'error',
85
+ '@typescript-eslint/no-unused-expressions': [
86
+ 'error',
87
+ {
88
+ allowShortCircuit: true,
89
+ allowTaggedTemplates: false,
90
+ allowTernary: true
91
+ }
92
+ ],
93
+ '@typescript-eslint/no-unused-vars': [
94
+ 'error',
95
+ {
96
+ args: 'after-used',
97
+ argsIgnorePattern: '^e$',
98
+ caughtErrors: 'none',
99
+ ignoreRestSiblings: true,
100
+ vars: 'all'
101
+ }
102
+ ],
103
+ '@typescript-eslint/no-use-before-define': [
104
+ 'error',
105
+ {
106
+ classes: false,
107
+ functions: false,
108
+ variables: false
109
+ }
110
+ ],
111
+ '@typescript-eslint/no-useless-constructor': 'error',
112
+ '@typescript-eslint/no-useless-empty-export': 'error',
113
+ '@typescript-eslint/no-var-requires': 'error',
114
+ '@typescript-eslint/no-wrapper-object-types': 'error',
115
+ '@typescript-eslint/non-nullable-type-assertion-style': 'error',
116
+ '@typescript-eslint/prefer-as-const': 'error',
117
+ '@typescript-eslint/prefer-enum-initializers': 'off',
118
+ '@typescript-eslint/prefer-for-of': 'error',
119
+ '@typescript-eslint/prefer-function-type': 'off',
120
+ '@typescript-eslint/prefer-includes': 'error',
121
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
122
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
123
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
124
+ '@typescript-eslint/prefer-optional-chain': 'error',
125
+ '@typescript-eslint/prefer-readonly': 'error',
126
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
127
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
128
+ '@typescript-eslint/prefer-return-this-type': 'error',
129
+ '@typescript-eslint/prefer-string-starts-ends-with': 'error',
130
+ '@typescript-eslint/prefer-ts-expect-error': 'error',
131
+ '@typescript-eslint/promise-function-async': 'error',
132
+ '@typescript-eslint/require-array-sort-compare': 'off',
133
+ '@typescript-eslint/require-await': 'error',
134
+ '@typescript-eslint/restrict-plus-operands': 'error',
135
+ '@typescript-eslint/restrict-template-expressions': 'error',
136
+ '@typescript-eslint/return-await': 'error',
137
+ '@typescript-eslint/sort-type-constituents': ['error', {checkIntersections: false}],
138
+ '@typescript-eslint/strict-boolean-expressions': 'off',
139
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
140
+ '@typescript-eslint/triple-slash-reference': 'error',
141
+ '@typescript-eslint/unified-signatures': 'error',
142
+ 'brace-style': 'off',
143
+ 'comma-dangle': 'off',
144
+ 'comma-spacing': 'off',
145
+ 'default-param-last': 'off',
146
+ 'dot-notation': 'off',
147
+ 'func-call-spacing': 'off',
148
+ 'jsdoc/require-param-type': 'off',
149
+ 'jsdoc/require-returns-type': 'off',
150
+ 'keyword-spacing': 'off',
151
+ 'lines-between-class-members': 'off',
152
+ 'no-array-constructor': 'off',
153
+ 'no-dupe-class-members': 'off',
154
+ 'no-empty-function': 'off',
155
+ 'no-extra-semi': 'off',
156
+ 'no-implied-eval': 'off',
157
+ 'no-invalid-this': 'off',
158
+ 'no-loop-func': 'off',
159
+ 'no-loss-of-precision': 'off',
160
+ 'no-redeclare': 'off',
161
+ 'no-return-await': 'off',
162
+ 'no-shadow': 'off',
163
+ 'no-throw-literal': 'off',
164
+ 'no-undefined': 'off',
165
+ 'no-unused-expressions': 'off',
166
+ 'no-unused-vars': 'off',
167
+ 'no-use-before-define': 'off',
168
+ 'no-useless-constructor': 'off',
169
+ 'object-curly-spacing': 'off',
170
+ 'padding-line-between-statements': 'off',
171
+ quotes: 'off',
172
+ 'react/default-props-match-prop-types': 'off',
173
+ 'react/require-default-props': 'off',
174
+ semi: 'off',
175
+ 'space-before-blocks': 'off',
176
+ 'space-before-function-paren': 'off',
177
+ 'space-infix-ops': 'off'
178
+ }
179
+ };
@@ -0,0 +1,180 @@
1
+ /* eslint-disable no-inline-comments */
2
+ module.exports = {
3
+ rules: {
4
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
5
+ '@typescript-eslint/array-type': ['error', {default: 'array'}],
6
+ '@typescript-eslint/class-literal-property-style': 'error',
7
+ '@typescript-eslint/consistent-generic-constructors': ['error', 'constructor'],
8
+ '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
9
+ '@typescript-eslint/consistent-type-assertions': ['error', {assertionStyle: 'as'}],
10
+ '@typescript-eslint/consistent-type-definitions': 'off',
11
+ '@typescript-eslint/consistent-type-exports': 'error',
12
+ '@typescript-eslint/consistent-type-imports': [
13
+ 'error',
14
+ {
15
+ disallowTypeAnnotations: true,
16
+ prefer: 'type-imports'
17
+ }
18
+ ],
19
+ '@typescript-eslint/default-param-last': 'error',
20
+ '@typescript-eslint/dot-notation': ['error', {allowKeywords: true}],
21
+ '@typescript-eslint/explicit-function-return-type': 'off',
22
+ '@typescript-eslint/explicit-member-accessibility': ['error', {accessibility: 'no-public'}],
23
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
24
+ '@typescript-eslint/indent': 'off',
25
+ '@typescript-eslint/init-declarations': 'off',
26
+ '@typescript-eslint/member-ordering': [
27
+ 'error',
28
+ {
29
+ default: {order: 'as-written'},
30
+ interfaces: {order: 'alphabetically-case-insensitive'},
31
+ typeLiterals: {order: 'alphabetically-case-insensitive'}
32
+ }
33
+ ],
34
+ '@typescript-eslint/method-signature-style': ['error', 'method'],
35
+ '@typescript-eslint/no-array-constructor': 'error',
36
+ '@typescript-eslint/no-base-to-string': 'error',
37
+ '@typescript-eslint/no-confusing-non-null-assertion': 'warn',
38
+ '@typescript-eslint/no-confusing-void-expression': 'off',
39
+ '@typescript-eslint/no-dupe-class-members': 'error',
40
+ '@typescript-eslint/no-duplicate-enum-values': 'warn',
41
+ '@typescript-eslint/no-dynamic-delete': 'off',
42
+ '@typescript-eslint/no-empty-function': ['error', {allow: ['arrowFunctions', 'methods', 'asyncMethods']}],
43
+ '@typescript-eslint/no-empty-interface': 'error',
44
+ '@typescript-eslint/no-empty-object-type': 'error',
45
+ '@typescript-eslint/no-explicit-any': 'off',
46
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
47
+ '@typescript-eslint/no-extraneous-class': 'off',
48
+ '@typescript-eslint/no-floating-promises': 'error',
49
+ '@typescript-eslint/no-for-in-array': 'error',
50
+ '@typescript-eslint/no-implied-eval': 'error',
51
+ '@typescript-eslint/no-inferrable-types': 'error',
52
+ '@typescript-eslint/no-invalid-this': 'error',
53
+ '@typescript-eslint/no-invalid-void-type': 'off',
54
+ '@typescript-eslint/no-loop-func': 'error',
55
+ '@typescript-eslint/no-loss-of-precision': 'error',
56
+ '@typescript-eslint/no-misused-new': 'error',
57
+ '@typescript-eslint/no-misused-promises': ['error', {checksVoidReturn: false}],
58
+ '@typescript-eslint/no-namespace': [
59
+ 'error',
60
+ {
61
+ allowDeclarations: true,
62
+ allowDefinitionFiles: true
63
+ }
64
+ ],
65
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
66
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
67
+ '@typescript-eslint/no-non-null-assertion': 'off',
68
+ '@typescript-eslint/no-redeclare': 'error',
69
+ '@typescript-eslint/no-redundant-type-constituents': 'warn',
70
+ '@typescript-eslint/no-require-imports': 'warn',
71
+ '@typescript-eslint/no-shadow': 'error',
72
+ '@typescript-eslint/no-this-alias': ['error', {allowedNames: ['self']}],
73
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
74
+ '@typescript-eslint/no-unnecessary-condition': 'error',
75
+ '@typescript-eslint/no-unnecessary-qualifier': 'error',
76
+ '@typescript-eslint/no-unnecessary-type-arguments': 'warn',
77
+ '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
78
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
79
+ '@typescript-eslint/no-unsafe-argument': 'error',
80
+ '@typescript-eslint/no-unsafe-assignment': 'off',
81
+ '@typescript-eslint/no-unsafe-call': 'error',
82
+ '@typescript-eslint/no-unsafe-function-type': 'error',
83
+ '@typescript-eslint/no-unsafe-member-access': 'error',
84
+ '@typescript-eslint/no-unsafe-return': 'error',
85
+ '@typescript-eslint/no-unused-expressions': [
86
+ 'error',
87
+ {
88
+ allowShortCircuit: true,
89
+ allowTaggedTemplates: false,
90
+ allowTernary: true
91
+ }
92
+ ],
93
+ '@typescript-eslint/no-unused-vars': [
94
+ 'error',
95
+ {
96
+ args: 'after-used',
97
+ argsIgnorePattern: '^e$',
98
+ caughtErrors: 'none',
99
+ ignoreRestSiblings: true,
100
+ vars: 'all'
101
+ }
102
+ ],
103
+ '@typescript-eslint/no-use-before-define': [
104
+ 'error',
105
+ {
106
+ classes: false,
107
+ functions: false,
108
+ variables: false
109
+ }
110
+ ],
111
+ '@typescript-eslint/no-useless-constructor': 'error',
112
+ '@typescript-eslint/no-useless-empty-export': 'error',
113
+ '@typescript-eslint/no-var-requires': 'error',
114
+ '@typescript-eslint/no-wrapper-object-types': 'error',
115
+ '@typescript-eslint/non-nullable-type-assertion-style': 'error',
116
+ '@typescript-eslint/only-throw-error': 'error',
117
+ '@typescript-eslint/prefer-as-const': 'error',
118
+ '@typescript-eslint/prefer-enum-initializers': 'off',
119
+ '@typescript-eslint/prefer-for-of': 'error',
120
+ '@typescript-eslint/prefer-function-type': 'off',
121
+ '@typescript-eslint/prefer-includes': 'error',
122
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
123
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
124
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
125
+ '@typescript-eslint/prefer-optional-chain': 'error',
126
+ '@typescript-eslint/prefer-readonly': 'error',
127
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
128
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
129
+ '@typescript-eslint/prefer-return-this-type': 'error',
130
+ '@typescript-eslint/prefer-string-starts-ends-with': 'error',
131
+ '@typescript-eslint/prefer-ts-expect-error': 'error',
132
+ '@typescript-eslint/promise-function-async': 'error',
133
+ '@typescript-eslint/require-array-sort-compare': 'off',
134
+ '@typescript-eslint/require-await': 'error',
135
+ '@typescript-eslint/restrict-plus-operands': 'error',
136
+ '@typescript-eslint/restrict-template-expressions': 'error',
137
+ '@typescript-eslint/return-await': 'error',
138
+ '@typescript-eslint/sort-type-constituents': ['error', {checkIntersections: false}],
139
+ '@typescript-eslint/strict-boolean-expressions': 'off',
140
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
141
+ '@typescript-eslint/triple-slash-reference': 'error',
142
+ '@typescript-eslint/unified-signatures': 'error',
143
+ 'brace-style': 'off',
144
+ 'comma-dangle': 'off',
145
+ 'comma-spacing': 'off',
146
+ 'default-param-last': 'off',
147
+ 'dot-notation': 'off',
148
+ 'func-call-spacing': 'off',
149
+ 'jsdoc/require-param-type': 'off',
150
+ 'jsdoc/require-returns-type': 'off',
151
+ 'keyword-spacing': 'off',
152
+ 'lines-between-class-members': 'off',
153
+ 'no-array-constructor': 'off',
154
+ 'no-dupe-class-members': 'off',
155
+ 'no-empty-function': 'off',
156
+ 'no-extra-semi': 'off',
157
+ 'no-implied-eval': 'off',
158
+ 'no-invalid-this': 'off',
159
+ 'no-loop-func': 'off',
160
+ 'no-loss-of-precision': 'off',
161
+ 'no-redeclare': 'off',
162
+ 'no-return-await': 'off',
163
+ 'no-shadow': 'off',
164
+ 'no-throw-literal': 'off',
165
+ 'no-undefined': 'off',
166
+ 'no-unused-expressions': 'off',
167
+ 'no-unused-vars': 'off',
168
+ 'no-use-before-define': 'off',
169
+ 'no-useless-constructor': 'off',
170
+ 'object-curly-spacing': 'off',
171
+ 'padding-line-between-statements': 'off',
172
+ quotes: 'off',
173
+ 'react/default-props-match-prop-types': 'off',
174
+ 'react/require-default-props': 'off',
175
+ semi: 'off',
176
+ 'space-before-blocks': 'off',
177
+ 'space-before-function-paren': 'off',
178
+ 'space-infix-ops': 'off'
179
+ }
180
+ };
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.3.0](https://github.com/nfqde/eslint-config-nfq/compare/v3.2.2...v3.3.0) (2024-10-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * **Stylistic:** Add stylistic as migration for ts stylings ([#63](https://github.com/nfqde/eslint-config-nfq/issues/63)) ([8969123](https://github.com/nfqde/eslint-config-nfq/commit/8969123f4ea8bc5484cf26079a3215cd052137bd))
11
+
5
12
  ### [3.2.2](https://github.com/nfqde/eslint-config-nfq/compare/v3.2.1...v3.2.2) (2024-10-01)
6
13
 
7
14
 
package/README.md CHANGED
@@ -47,6 +47,10 @@ pnpm install <Project name>
47
47
 
48
48
  The following PeerDependencies are needed so the component does work:
49
49
 
50
+ - @nfq/eslint-plugin >= 0.8.0
51
+ - @stylistic/eslint-plugin-ts >= 2
52
+ - @typescript-eslint/eslint-plugin >= 6
53
+ - @typescript-eslint/parser >= 6
50
54
  - eslint-import-resolver-alias >= 1
51
55
  - eslint-plugin-array-func >= 3
52
56
  - eslint-plugin-better-styled-components >= 1
package/index.js CHANGED
@@ -2,6 +2,7 @@ const global = require('./config/globals');
2
2
  const plugins = require('./config/plugins');
3
3
  const settings = require('./config/settings');
4
4
  const rules = require('./rules');
5
+ const stylistic = require('./rules/stylistic');
5
6
  const typescript = require('./rules/typescript');
6
7
  const typescriptCypress = require('./rules/typescript-cypress-exeptions');
7
8
 
@@ -18,9 +19,10 @@ module.exports = {
18
19
  files: ['**/*.cy.{ts,cts,mts,tsx}'],
19
20
  parser: '@typescript-eslint/parser',
20
21
  parserOptions: {project: '**/tsconfig*.json'},
21
- plugins: ['@typescript-eslint'],
22
+ plugins: ['@typescript-eslint', '@stylistic/ts'],
22
23
  rules: {
23
24
  ...typescript.rules,
25
+ ...stylistic.rules,
24
26
  ...typescriptCypress.rules
25
27
  }
26
28
  },
@@ -28,8 +30,11 @@ module.exports = {
28
30
  files: ['**/*.{ts,cts,mts,tsx}'],
29
31
  parser: '@typescript-eslint/parser',
30
32
  parserOptions: {project: '**/tsconfig*.json'},
31
- plugins: ['@typescript-eslint'],
32
- rules: typescript.rules
33
+ plugins: ['@typescript-eslint', '@stylistic/ts'],
34
+ rules: {
35
+ ...typescript.rules,
36
+ ...stylistic.rule
37
+ }
33
38
  }
34
39
  ],
35
40
  parser: '@babel/eslint-parser',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nfq/eslint-config",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "engines": {
5
5
  "node": ">= 12.0.0"
6
6
  },
@@ -25,6 +25,7 @@
25
25
  "@babel/core": ">= 7",
26
26
  "@babel/eslint-parser": ">= 7",
27
27
  "@nfq/eslint-plugin": ">= 0.6.0",
28
+ "@stylistic/eslint-plugin-ts": ">= 2",
28
29
  "@typescript-eslint/eslint-plugin": ">= 6",
29
30
  "@typescript-eslint/parser": ">= 6",
30
31
  "eslint": ">= 8",
@@ -52,6 +53,7 @@
52
53
  "@babel/core": "^7.25.2",
53
54
  "@babel/eslint-parser": "^7.25.1",
54
55
  "@nfq/eslint-plugin": "^0.8.2",
56
+ "@stylistic/eslint-plugin-ts": "^2.9.0",
55
57
  "@typescript-eslint/eslint-plugin": "^8.8.0",
56
58
  "@typescript-eslint/parser": "^8.8.0",
57
59
  "eslint": "^8.57.1",
@@ -0,0 +1,72 @@
1
+ module.exports = {
2
+ rules: {
3
+ '@stylistic/ts/brace-style': ['error', '1tbs', {allowSingleLine: false}],
4
+ '@stylistic/ts/comma-dangle': ['error', 'never'],
5
+ '@stylistic/ts/comma-spacing': [
6
+ 'error',
7
+ {
8
+ after: true,
9
+ before: false
10
+ }
11
+ ],
12
+ '@stylistic/ts/function-call-spacing': ['error', 'never'],
13
+ '@stylistic/ts/keyword-spacing': [
14
+ 'error',
15
+ {
16
+ after: true,
17
+ before: true
18
+ }
19
+ ],
20
+ '@stylistic/ts/lines-between-class-members': [
21
+ 'error',
22
+ 'always',
23
+ {exceptAfterSingleLine: false}
24
+ ],
25
+ '@stylistic/ts/member-delimiter-style': [
26
+ 'error',
27
+ {
28
+ multiline: {
29
+ delimiter: 'semi',
30
+ requireLast: true
31
+ },
32
+ multilineDetection: 'brackets',
33
+ singleline: {
34
+ delimiter: 'semi',
35
+ requireLast: false
36
+ }
37
+ }
38
+ ],
39
+ '@stylistic/ts/no-extra-semi': 'error',
40
+ '@stylistic/ts/object-curly-spacing': ['error', 'never'],
41
+ '@stylistic/ts/padding-line-between-statements': [
42
+ 'error',
43
+ {
44
+ blankLine: 'always',
45
+ next: '*',
46
+ prev: ['const', 'let', 'var']
47
+ },
48
+ {
49
+ blankLine: 'any',
50
+ next: ['const', 'let', 'var'],
51
+ prev: ['const', 'let', 'var']
52
+ }
53
+ ],
54
+ '@stylistic/ts/quotes': [
55
+ 'error',
56
+ 'single',
57
+ {avoidEscape: true}
58
+ ],
59
+ '@stylistic/ts/semi': 'error',
60
+ '@stylistic/ts/space-before-blocks': ['error', 'always'],
61
+ '@stylistic/ts/space-before-function-paren': [
62
+ 'error',
63
+ {
64
+ anonymous: 'never',
65
+ asyncArrow: 'always',
66
+ named: 'never'
67
+ }
68
+ ],
69
+ '@stylistic/ts/space-infix-ops': 'error',
70
+ '@stylistic/ts/type-annotation-spacing': 'error'
71
+ }
72
+ };