@perfective/eslint-config 0.31.2 → 0.33.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2020-2025 Andrey Mikheychik (https://github.com/amikheychik)
3
+ Copyright (c) 2020-2026 Andrey Mikheychik (https://github.com/amikheychik)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.adoc CHANGED
@@ -105,14 +105,14 @@ const eslintConfig = perfectiveEslintConfig([
105
105
  {
106
106
  // These rules are overridden to all files
107
107
  rules: {
108
- '@stylistic/js/indent': ['warn', 2],
108
+ '@stylistic/indent': ['warn', 2],
109
109
  },
110
110
  },
111
111
  {
112
112
  // These rules are overridden to TypeScript files only
113
113
  files: typescriptFiles,
114
114
  rules: {
115
- '@stylistic/ts/indent': ['warn', 2],
115
+ '@stylistic/indent': ['warn', 4],
116
116
  },
117
117
  },
118
118
  ]);
package/README.md CHANGED
@@ -100,14 +100,14 @@ you need to use `eslint.config.mjs` file instead of `eslint.config.js` to run it
100
100
  {
101
101
  // These rules are overridden to all files
102
102
  rules: {
103
- '@stylistic/js/indent': ['warn', 2],
103
+ '@stylistic/indent': ['warn', 2],
104
104
  },
105
105
  },
106
106
  {
107
107
  // These rules are overridden to TypeScript files only
108
108
  files: typescriptFiles,
109
109
  rules: {
110
- '@stylistic/ts/indent': ['warn', 2],
110
+ '@stylistic/indent': ['warn', 4],
111
111
  },
112
112
  },
113
113
  ]);
@@ -1,4 +1,4 @@
1
- import eslintPluginCypress from 'eslint-plugin-cypress/flat';
1
+ import eslintPluginCypress from 'eslint-plugin-cypress';
2
2
  import { cypressFiles } from "../../linter/glob.js";
3
3
  import { importNoExtraneousDependencies } from "../import/rules/no-extraneous-dependencies.js";
4
4
  export function cypressConfig(files = [cypressFiles]) {
@@ -59,6 +59,7 @@ export const eslintPossibleProblemsRules = {
59
59
  'no-sparse-arrays': 'error',
60
60
  'no-template-curly-in-string': 'error',
61
61
  'no-this-before-super': 'error',
62
+ 'no-unassigned-vars': 'error',
62
63
  'no-undef': 'off',
63
64
  'no-unexpected-multiline': 'error',
64
65
  'no-unmodified-loop-condition': 'error',
@@ -84,8 +85,8 @@ export const eslintPossibleProblemsRules = {
84
85
  variables: false,
85
86
  allowNamedExports: false
86
87
  }],
87
- 'no-useless-backreference': 'error',
88
88
  'no-useless-assignment': 'error',
89
+ 'no-useless-backreference': 'error',
89
90
  'require-atomic-updates': ['error', {
90
91
  allowProperties: false
91
92
  }],
@@ -49,7 +49,7 @@ export const eslintSuggestionsRules = {
49
49
  properties: true
50
50
  }],
51
51
  'no-alert': 'error',
52
- 'no-array-constructor': 'error',
52
+ 'no-array-constructor': 'warn',
53
53
  'no-bitwise': 'error',
54
54
  'no-caller': 'error',
55
55
  'no-case-declarations': 'error',
@@ -165,6 +165,9 @@ export const eslintSuggestionsRules = {
165
165
  'prefer-rest-params': 'error',
166
166
  'prefer-spread': 'error',
167
167
  'prefer-template': 'warn',
168
+ 'preserve-caught-error': ['off', {
169
+ requireCatchParameter: true
170
+ }],
168
171
  'quote-props': 'off',
169
172
  'radix': 'error',
170
173
  'require-await': 'error',
@@ -1,4 +1,4 @@
1
- import { flatConfigs } from 'eslint-plugin-import';
1
+ import eslintPluginImport from 'eslint-plugin-import';
2
2
  import { javascriptFiles, typescriptFiles } from "../../linter/glob.js";
3
3
  import { javascriptLanguageOptions, typescriptLanguageOptions } from "../../linter/language-options.js";
4
4
  import { helpfulWarningsRules } from "./helpful-warnings-rules.js";
@@ -8,7 +8,7 @@ import { styleGuideRules } from "./style-guide-rules.js";
8
8
  export function importConfig() {
9
9
  return {
10
10
  plugins: {
11
- import: flatConfigs.recommended.plugins.import
11
+ import: eslintPluginImport
12
12
  },
13
13
  rules: Object.assign(Object.assign(Object.assign(Object.assign({}, staticAnalysisRules), helpfulWarningsRules), moduleSystemsRules), styleGuideRules)
14
14
  };
@@ -1,5 +1,6 @@
1
1
  export const staticAnalysisRules = {
2
2
  'import/default': 'error',
3
+ 'import/ enforce-node-protocol-usage': 'off',
3
4
  'import/named': ['error', {
4
5
  commonjs: false
5
6
  }],
@@ -53,6 +53,7 @@ export function jestConfig(files = jestFiles) {
53
53
  'jest/no-standalone-expect': 'error',
54
54
  'jest/no-test-prefixes': 'warn',
55
55
  'jest/no-test-return-statement': 'error',
56
+ 'jest/no-unneeded-async-expect-function': 'warn',
56
57
  'jest/no-untyped-mock-factory': 'warn',
57
58
  'jest/padding-around-after-all-blocks': 'warn',
58
59
  'jest/padding-around-after-each-blocks': 'warn',
@@ -65,6 +66,7 @@ export function jestConfig(files = jestFiles) {
65
66
  'jest/prefer-called-with': 'error',
66
67
  'jest/prefer-comparison-matcher': 'warn',
67
68
  'jest/prefer-each': 'error',
69
+ 'jest/prefer-ending-with-an-expect': 'error',
68
70
  'jest/prefer-equality-matcher': 'error',
69
71
  'jest/prefer-expect-assertions': 'off',
70
72
  'jest/prefer-expect-resolves': 'warn',
@@ -75,14 +77,18 @@ export function jestConfig(files = jestFiles) {
75
77
  'jest/prefer-lowercase-title': ['error', {
76
78
  allowedPrefixes: [],
77
79
  ignore: [],
80
+ ignoreTodos: false,
78
81
  ignoreTopLevelDescribe: true
79
82
  }],
80
83
  'jest/prefer-mock-promise-shorthand': 'warn',
84
+ 'jest/prefer-mock-return-shorthand': 'warn',
81
85
  'jest/prefer-snapshot-hint': ['error', 'always'],
82
86
  'jest/prefer-spy-on': 'warn',
83
87
  'jest/prefer-strict-equal': 'warn',
84
88
  'jest/prefer-to-be': 'warn',
85
89
  'jest/prefer-to-contain': 'warn',
90
+ 'jest/prefer-to-have-been-called': 'warn',
91
+ 'jest/prefer-to-have-been-called-times': 'warn',
86
92
  'jest/prefer-to-have-length': 'warn',
87
93
  'jest/prefer-todo': 'warn',
88
94
  'jest/require-hook': ['error', {
@@ -93,6 +99,7 @@ export function jestConfig(files = jestFiles) {
93
99
  'jest/valid-describe-callback': 'error',
94
100
  'jest/valid-expect-in-promise': 'error',
95
101
  'jest/valid-expect': 'error',
102
+ 'jest/valid-mock-module-path': 'error',
96
103
  'jest/valid-title': ['warn', {
97
104
  ignoreTypeOfDescribeName: true,
98
105
  ignoreTypeOfTestName: false,
@@ -1,5 +1,8 @@
1
1
  export const typescriptEslintJestRules = {
2
+ 'jest/no-error-equal': 'error',
3
+ 'jest/no-unnecessary-assertion': 'error',
2
4
  'jest/unbound-method': ['error', {
3
5
  ignoreStatic: false
4
- }]
6
+ }],
7
+ 'jest/valid-expect-with-promise': 'error'
5
8
  };
@@ -1,13 +1,9 @@
1
- import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
1
+ import { jsdoc } from 'eslint-plugin-jsdoc';
2
2
  import { javascriptFiles } from "../../linter/glob.js";
3
3
  import { javascriptLanguageOptions } from "../../linter/language-options.js";
4
4
  export function jsdocConfig() {
5
- return {
6
- plugins: {
7
- jsdoc: {
8
- rules: eslintPluginJsdoc.configs['flat/recommended'].plugins['jsdoc'].rules
9
- }
10
- },
5
+ return jsdoc({
6
+ config: 'flat/recommended',
11
7
  settings: {
12
8
  jsdoc: {
13
9
  tagNamePreference: {
@@ -30,7 +26,9 @@ export function jsdocConfig() {
30
26
  },
31
27
  rules: {
32
28
  'jsdoc/check-access': 'off',
33
- 'jsdoc/check-alignment': 'error',
29
+ 'jsdoc/check-alignment': ['error', {
30
+ innerIndent: 1
31
+ }],
34
32
  'jsdoc/check-examples': 'off',
35
33
  'jsdoc/check-indentation': 'off',
36
34
  'jsdoc/check-line-alignment': ['off', 'never'],
@@ -60,6 +58,11 @@ export function jsdocConfig() {
60
58
  'jsdoc/empty-tags': ['error', {
61
59
  tags: ['final', 'flags', 'sealed']
62
60
  }],
61
+ 'jsdoc/escape-inline-tags': ['error', {
62
+ allowedInlineTags: [],
63
+ enableFixer: false,
64
+ fixType: 'backticks'
65
+ }],
63
66
  'jsdoc/implements-on-classes': 'error',
64
67
  'jsdoc/imports-as-dependencies': 'error',
65
68
  'jsdoc/lines-before-block': 'off',
@@ -90,6 +93,9 @@ export function jsdocConfig() {
90
93
  'jsdoc/no-restricted-syntax': 'off',
91
94
  'jsdoc/no-types': 'error',
92
95
  'jsdoc/no-undefined-types': 'error',
96
+ 'jsdoc/prefer-import-tag': 'warn',
97
+ 'jsdoc/reject-any-type': 'error',
98
+ 'jsdoc/reject-function-type': 'error',
93
99
  'jsdoc/require-asterisk-prefix': ['error', 'always'],
94
100
  'jsdoc/require-description': ['error', {
95
101
  exemptedBy: ['inheritdoc', 'package', 'private', 'see', 'deprecated']
@@ -99,6 +105,8 @@ export function jsdocConfig() {
99
105
  'jsdoc/require-file-overview': 'off',
100
106
  'jsdoc/require-hyphen-before-param-description': ['warn', 'always'],
101
107
  'jsdoc/require-jsdoc': 'off',
108
+ 'jsdoc/require-next-description': 'error',
109
+ 'jsdoc/require-next-type': 'error',
102
110
  'jsdoc/require-param': 'off',
103
111
  'jsdoc/require-param-description': 'error',
104
112
  'jsdoc/require-param-name': 'error',
@@ -107,16 +115,24 @@ export function jsdocConfig() {
107
115
  'jsdoc/require-property-description': 'error',
108
116
  'jsdoc/require-property-name': 'error',
109
117
  'jsdoc/require-property-type': 'error',
118
+ 'jsdoc/require-rejects': 'error',
110
119
  'jsdoc/require-returns': 'off',
111
120
  'jsdoc/require-returns-check': 'error',
112
121
  'jsdoc/require-returns-description': 'error',
113
122
  'jsdoc/require-returns-type': 'off',
123
+ 'jsdoc/require-tags': 'off',
114
124
  'jsdoc/require-template': ['off', {
125
+ exemptedBy: [],
115
126
  requireSeparateTemplates: false
116
127
  }],
128
+ 'jsdoc/require-template-description': 'off',
117
129
  'jsdoc/require-throws': 'error',
130
+ 'jsdoc/require-throws-description': 'error',
131
+ 'jsdoc/require-throws-type': 'error',
118
132
  'jsdoc/require-yields': 'error',
119
133
  'jsdoc/require-yields-check': 'error',
134
+ 'jsdoc/require-yields-description': 'error',
135
+ 'jsdoc/require-yields-type': 'error',
120
136
  'jsdoc/sort-tags': ['warn', {
121
137
  tagSequence: [{
122
138
  tags: ['summary', 'typeSummary']
@@ -157,11 +173,46 @@ export function jsdocConfig() {
157
173
  startLines: 1,
158
174
  endLines: 0,
159
175
  applyToEndTag: false,
176
+ maxBlockLines: null,
160
177
  tags: {}
161
178
  }],
179
+ 'jsdoc/ts-method-signature-style': 'warn',
180
+ 'jsdoc/ts-no-empty-object-type': 'error',
181
+ 'jsdoc/ts-no-unnecessary-template-expression': 'warn',
182
+ 'jsdoc/ts-prefer-function-type': 'warn',
183
+ 'jsdoc/type-formatting': ['warn', {
184
+ arrayBrackets: 'square',
185
+ arrowFunctionPostReturnMarkerSpacing: '',
186
+ arrowFunctionPreReturnMarkerSpacing: '',
187
+ enableFixer: true,
188
+ functionOrClassParameterSpacing: '',
189
+ functionOrClassPostGenericSpacing: '',
190
+ functionOrClassPostReturnMarkerSpacing: '',
191
+ functionOrClassPreReturnMarkerSpacing: '',
192
+ functionOrClassTypeParameterSpacing: '',
193
+ genericAndTupleElementSpacing: '',
194
+ genericDot: false,
195
+ keyValuePostColonSpacing: '',
196
+ keyValuePostKeySpacing: '',
197
+ keyValuePostOptionalSpacing: '',
198
+ keyValuePostVariadicSpacing: '',
199
+ methodQuotes: 'double',
200
+ objectFieldIndent: '',
201
+ objectFieldQuote: null,
202
+ objectFieldSeparator: 'comma',
203
+ objectFieldSeparatorOptionalLinebreak: true,
204
+ objectFieldSeparatorTrailingPunctuation: false,
205
+ parameterDefaultValueSpacing: ' ',
206
+ postMethodNameSpacing: '',
207
+ postNewSpacing: ' ',
208
+ separatorForSingleObjectField: false,
209
+ stringQuotes: 'double',
210
+ typeBracketSpacing: '',
211
+ unionSpacing: ' '
212
+ }],
162
213
  'jsdoc/valid-types': 'error'
163
214
  }
164
- };
215
+ });
165
216
  }
166
217
  export function jsdocJavascriptConfig() {
167
218
  return {
@@ -31,6 +31,7 @@ export function nodeConfig() {
31
31
  'n/no-sync': ['error', {
32
32
  allowAtRootLevel: false
33
33
  }],
34
+ 'n/no-top-level-await': 'error',
34
35
  'n/no-unpublished-bin': 'error',
35
36
  'n/no-unpublished-import': ['error', {
36
37
  ignorePrivate: false
@@ -12,10 +12,7 @@ import { preferArrowConfig } from "./prefer-arrow/prefer-arrow-config.js";
12
12
  import { promiseConfig } from "./promise/promise-config.js";
13
13
  import { securityConfig } from "./security/security-config.js";
14
14
  import { simpleImportSortConfig } from "./simple-import-sort/simple-import-sort-config.js";
15
- import { stylisticJsConfig } from "./stylistic/js/stylistic-js-config.js";
16
- import { stylisticJsxConfig } from "./stylistic/jsx/stylistic-jsx-config.js";
17
- import { stylisticPlusConfig } from "./stylistic/plus/stylistic-plus-config.js";
18
- import { stylisticTsConfig } from "./stylistic/ts/stylistic-ts-config.js";
15
+ import { stylisticConfig } from "./stylistic/stylistic-config.js";
19
16
  import { typescriptEslintConfig } from "./typescript-eslint/typescript-eslint-config.js";
20
17
  import { unicornConfig } from "./unicorn/unicorn-config.js";
21
18
  export function perfectiveEslintConfig(configs = []) {
@@ -23,7 +20,7 @@ export function perfectiveEslintConfig(configs = []) {
23
20
  languageOptions: languageOptions()
24
21
  }, {
25
22
  ignores: ['**/dist', typescriptDeclarationFiles]
26
- }, eslintConfig(), typescriptEslintConfig(), arrayFuncConfig(), eslintCommentsConfig(), importConfig(), importJavascriptConfig(), importTypescriptConfig(), jsdocConfig(), jsdocJavascriptConfig(), nodeConfig(), preferArrowConfig(), promiseConfig(), securityConfig(), simpleImportSortConfig(), stylisticJsConfig(), stylisticJsxConfig(), stylisticPlusConfig(), stylisticTsConfig(), unicornConfig(), configurationFilesConfig()].concat(configs.map(linterConfig));
23
+ }, eslintConfig(), typescriptEslintConfig(), arrayFuncConfig(), eslintCommentsConfig(), importConfig(), importJavascriptConfig(), importTypescriptConfig(), jsdocConfig(), jsdocJavascriptConfig(), nodeConfig(), preferArrowConfig(), promiseConfig(), securityConfig(), simpleImportSortConfig(), stylisticConfig(), unicornConfig(), configurationFilesConfig()].concat(configs.map(linterConfig));
27
24
  }
28
25
  function configurationFilesConfig() {
29
26
  return {
@@ -48,12 +48,14 @@ export function rxjsConfig(files = typescriptFiles) {
48
48
  'rxjs-x/no-nested-subscribe': 'error',
49
49
  'rxjs-x/no-redundant-notify': 'error',
50
50
  'rxjs-x/no-sharereplay': 'off',
51
+ 'rxjs-x/no-sharereplay-before-takeuntil': 'error',
51
52
  'rxjs-x/no-subclass': 'error',
52
53
  'rxjs-x/no-subject-unsubscribe': 'error',
53
54
  'rxjs-x/no-subject-value': 'error',
54
55
  'rxjs-x/no-subscribe-handlers': 'off',
55
56
  'rxjs-x/no-topromise': 'error',
56
57
  'rxjs-x/no-unbound-methods': 'error',
58
+ 'rxjs-x/no-unnecessary-collection': 'error',
57
59
  'rxjs-x/no-unsafe-catch': 'error',
58
60
  'rxjs-x/no-unsafe-first': 'error',
59
61
  'rxjs-x/no-unsafe-subject-next': 'error',
@@ -0,0 +1,2 @@
1
+ import { Linter } from 'eslint';
2
+ export declare function stylisticConfig(): Linter.Config;
@@ -0,0 +1,300 @@
1
+ import eslintPluginStylistic from '@stylistic/eslint-plugin';
2
+ export function stylisticConfig() {
3
+ return {
4
+ plugins: {
5
+ '@stylistic': eslintPluginStylistic
6
+ },
7
+ rules: {
8
+ '@stylistic/array-bracket-newline': ['warn', 'consistent'],
9
+ '@stylistic/array-bracket-spacing': ['warn', 'never'],
10
+ '@stylistic/array-element-newline': ['warn', 'consistent'],
11
+ '@stylistic/arrow-parens': ['warn', 'as-needed'],
12
+ '@stylistic/arrow-spacing': ['warn', {
13
+ before: true,
14
+ after: true
15
+ }],
16
+ '@stylistic/block-spacing': ['warn', 'always'],
17
+ '@stylistic/brace-style': ['warn', 'stroustrup', {
18
+ allowSingleLine: false
19
+ }],
20
+ '@stylistic/comma-dangle': ['warn', {
21
+ arrays: 'always-multiline',
22
+ enums: 'always-multiline',
23
+ exports: 'always-multiline',
24
+ functions: 'always-multiline',
25
+ generics: 'always-multiline',
26
+ imports: 'always-multiline',
27
+ objects: 'always-multiline',
28
+ tuples: 'always-multiline'
29
+ }],
30
+ '@stylistic/comma-spacing': ['warn', {
31
+ before: false,
32
+ after: true
33
+ }],
34
+ '@stylistic/comma-style': ['warn', 'last'],
35
+ '@stylistic/computed-property-spacing': ['warn', 'never'],
36
+ '@stylistic/curly-newline': ['warn', {
37
+ minElements: 1
38
+ }],
39
+ '@stylistic/dot-location': ['warn', 'property'],
40
+ '@stylistic/eol-last': ['warn', 'always'],
41
+ '@stylistic/function-call-argument-newline': ['warn', 'consistent'],
42
+ '@stylistic/function-call-spacing': ['warn', 'never'],
43
+ '@stylistic/function-paren-newline': ['warn', 'consistent'],
44
+ '@stylistic/generator-star-spacing': ['warn', {
45
+ before: true,
46
+ after: false
47
+ }],
48
+ '@stylistic/implicit-arrow-linebreak': ['warn', 'beside'],
49
+ '@stylistic/indent': ['warn', 4, {
50
+ SwitchCase: 1,
51
+ ignoredNodes: ['TSTypeParameterInstantiation']
52
+ }],
53
+ '@stylistic/indent-binary-ops': ['warn', 4],
54
+ '@stylistic/jsx-child-element-spacing': 'error',
55
+ '@stylistic/jsx-closing-bracket-location': ['warn', {
56
+ selfClosing: 'after-props',
57
+ nonEmpty: 'after-props'
58
+ }],
59
+ '@stylistic/jsx-closing-tag-location': ['warn', 'tag-aligned'],
60
+ '@stylistic/jsx-curly-brace-presence': ['warn', {
61
+ props: 'never',
62
+ children: 'always',
63
+ propElementValues: 'always'
64
+ }],
65
+ '@stylistic/jsx-curly-newline': ['warn', 'never'],
66
+ '@stylistic/jsx-curly-spacing': ['warn', {
67
+ when: 'never',
68
+ attributes: {
69
+ allowMultiline: false
70
+ },
71
+ children: {
72
+ allowMultiline: false
73
+ }
74
+ }],
75
+ '@stylistic/jsx-equals-spacing': ['warn', 'never'],
76
+ '@stylistic/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
77
+ '@stylistic/jsx-function-call-newline': ['warn', 'multiline'],
78
+ '@stylistic/jsx-indent': 'off',
79
+ '@stylistic/jsx-indent-props': ['warn', {
80
+ indentMode: 1,
81
+ ignoreTernaryOperator: false
82
+ }],
83
+ '@stylistic/jsx-max-props-per-line': ['warn', {
84
+ maximum: 1,
85
+ when: 'always'
86
+ }],
87
+ '@stylistic/jsx-newline': 'off',
88
+ '@stylistic/jsx-one-expression-per-line': ['warn', {
89
+ allow: 'single-child'
90
+ }],
91
+ '@stylistic/jsx-pascal-case': ['error', {
92
+ allowAllCaps: false,
93
+ allowLeadingUnderscore: false,
94
+ allowNamespace: false,
95
+ ignore: []
96
+ }],
97
+ '@stylistic/jsx-props-no-multi-spaces': 'off',
98
+ '@stylistic/jsx-quotes': ['warn', 'prefer-double'],
99
+ '@stylistic/jsx-self-closing-comp': ['warn', {
100
+ component: true,
101
+ html: true
102
+ }],
103
+ '@stylistic/jsx-sort-props': ['warn', {
104
+ ignoreCase: false,
105
+ callbacksLast: true,
106
+ shorthandFirst: true,
107
+ shorthandLast: false,
108
+ multiline: 'ignore',
109
+ noSortAlphabetically: false,
110
+ reservedFirst: true,
111
+ locale: 'auto'
112
+ }],
113
+ '@stylistic/jsx-tag-spacing': ['warn', {
114
+ closingSlash: 'never',
115
+ beforeSelfClosing: 'always',
116
+ afterOpening: 'never',
117
+ beforeClosing: 'never'
118
+ }],
119
+ '@stylistic/jsx-wrap-multilines': ['warn', {
120
+ declaration: 'parens-new-line',
121
+ assignment: 'parens-new-line',
122
+ return: 'parens-new-line',
123
+ arrow: 'parens-new-line',
124
+ condition: 'parens-new-line',
125
+ logical: 'parens-new-line',
126
+ prop: 'parens-new-line'
127
+ }],
128
+ '@stylistic/key-spacing': ['warn', {
129
+ beforeColon: false,
130
+ afterColon: true,
131
+ mode: 'strict'
132
+ }],
133
+ '@stylistic/keyword-spacing': ['warn', {
134
+ before: true,
135
+ after: true
136
+ }],
137
+ '@stylistic/line-comment-position': ['error', {
138
+ position: 'above',
139
+ ignorePattern: '^ == .+'
140
+ }],
141
+ '@stylistic/linebreak-style': ['warn', 'unix'],
142
+ '@stylistic/lines-around-comment': ['warn', {
143
+ beforeBlockComment: true,
144
+ afterBlockComment: false,
145
+ beforeLineComment: false,
146
+ afterLineComment: false,
147
+ allowBlockStart: false,
148
+ allowBlockEnd: false,
149
+ allowObjectStart: false,
150
+ allowObjectEnd: false,
151
+ allowArrayStart: false,
152
+ allowArrayEnd: false,
153
+ allowClassStart: true,
154
+ allowClassEnd: false,
155
+ allowInterfaceStart: true,
156
+ allowInterfaceEnd: true,
157
+ allowTypeStart: true,
158
+ allowTypeEnd: true
159
+ }],
160
+ '@stylistic/lines-between-class-members': ['warn', 'always', {
161
+ exceptAfterSingleLine: true,
162
+ exceptAfterOverload: true
163
+ }],
164
+ '@stylistic/exp-list-style': 'off',
165
+ '@stylistic/max-len': ['error', {
166
+ code: 120,
167
+ tabWidth: 4,
168
+ ignoreRegExpLiterals: true,
169
+ ignoreUrls: true
170
+ }],
171
+ '@stylistic/max-statements-per-line': ['error', {
172
+ max: 1
173
+ }],
174
+ '@stylistic/member-delimiter-style': ['warn', {
175
+ multiline: {
176
+ delimiter: 'semi',
177
+ requireLast: true
178
+ },
179
+ singleline: {
180
+ delimiter: 'semi',
181
+ requireLast: true
182
+ },
183
+ multilineDetection: 'brackets'
184
+ }],
185
+ '@stylistic/multiline-comment-style': ['warn', 'separate-lines', {
186
+ checkJSDoc: false
187
+ }],
188
+ '@stylistic/multiline-ternary': ['warn', 'always-multiline'],
189
+ '@stylistic/new-parens': 'warn',
190
+ '@stylistic/newline-per-chained-call': ['off', {
191
+ ignoreChainWithDepth: 3
192
+ }],
193
+ '@stylistic/no-confusing-arrow': ['warn', {
194
+ allowParens: true,
195
+ onlyOneSimpleParam: false
196
+ }],
197
+ '@stylistic/no-extra-parens': ['warn', 'all', {
198
+ ignoreJSX: 'all',
199
+ nestedBinaryExpressions: false,
200
+ nestedConditionalExpressions: false,
201
+ ternaryOperandBinaryExpressions: false,
202
+ ignoredNodes: ['ArrowFunctionExpression[body.type=ConditionalExpression]']
203
+ }],
204
+ '@stylistic/no-extra-semi': 'warn',
205
+ '@stylistic/no-floating-decimal': 'warn',
206
+ '@stylistic/no-mixed-operators': ['error', {
207
+ groups: [['+', '-'], ['*', '/', '%', '**'], ['&', '|', '^', '~', '<<', '>>', '>>>'], ['==', '!=', '===', '!==', '>', '>=', '<', '<='], ['&&', '||', '?:', '??'], ['in', 'instanceof']],
208
+ allowSamePrecedence: true
209
+ }],
210
+ '@stylistic/no-mixed-spaces-and-tabs': 'error',
211
+ '@stylistic/no-multi-spaces': 'warn',
212
+ '@stylistic/no-multiple-empty-lines': ['warn', {
213
+ max: 1,
214
+ maxEOF: 0,
215
+ maxBOF: 0
216
+ }],
217
+ '@stylistic/no-tabs': 'error',
218
+ '@stylistic/no-trailing-spaces': 'warn',
219
+ '@stylistic/no-whitespace-before-property': 'warn',
220
+ '@stylistic/nonblock-statement-body-position': ['warn', 'below'],
221
+ '@stylistic/object-curly-newline': ['warn', {
222
+ ImportDeclaration: {
223
+ multiline: true
224
+ },
225
+ ExportDeclaration: {
226
+ multiline: true
227
+ }
228
+ }],
229
+ '@stylistic/object-curly-spacing': ['warn', 'always', {
230
+ arraysInObjects: true,
231
+ emptyObjects: 'never',
232
+ objectsInObjects: true
233
+ }],
234
+ '@stylistic/object-property-newline': ['warn', {
235
+ allowAllPropertiesOnSameLine: true
236
+ }],
237
+ '@stylistic/one-var-declaration-per-line': ['warn', 'always'],
238
+ '@stylistic/operator-linebreak': ['warn', 'before', {
239
+ overrides: {
240
+ '=': 'none',
241
+ '==': 'none',
242
+ '!=': 'none',
243
+ '>=': 'none',
244
+ '<=': 'none',
245
+ '===': 'none',
246
+ '+=': 'none'
247
+ }
248
+ }],
249
+ '@stylistic/padded-blocks': ['warn', 'never'],
250
+ '@stylistic/padding-line-between-statements': 'off',
251
+ '@stylistic/quote-props': ['warn', 'consistent-as-needed'],
252
+ '@stylistic/quotes': ['warn', 'single', {
253
+ avoidEscape: true,
254
+ allowTemplateLiterals: 'always',
255
+ ignoreStringLiterals: false
256
+ }],
257
+ '@stylistic/rest-spread-spacing': ['warn', 'never'],
258
+ '@stylistic/semi': ['warn', 'always'],
259
+ '@stylistic/semi-spacing': ['warn', {
260
+ before: false,
261
+ after: true
262
+ }],
263
+ '@stylistic/semi-style': ['warn', 'last'],
264
+ '@stylistic/space-before-blocks': ['warn', 'always'],
265
+ '@stylistic/space-before-function-paren': ['warn', {
266
+ anonymous: 'always',
267
+ named: 'never',
268
+ asyncArrow: 'always'
269
+ }],
270
+ '@stylistic/space-in-parens': ['warn', 'never'],
271
+ '@stylistic/space-infix-ops': ['warn', {
272
+ int32Hint: false
273
+ }],
274
+ '@stylistic/space-unary-ops': ['warn', {
275
+ words: true,
276
+ nonwords: false
277
+ }],
278
+ '@stylistic/spaced-comment': ['warn', 'always', {
279
+ line: {
280
+ markers: ['/ <reference']
281
+ }
282
+ }],
283
+ '@stylistic/switch-colon-spacing': ['warn', {
284
+ after: true,
285
+ before: false
286
+ }],
287
+ '@stylistic/template-curly-spacing': ['warn', 'never'],
288
+ '@stylistic/template-tag-spacing': ['warn', 'never'],
289
+ '@stylistic/type-annotation-spacing': 'warn',
290
+ '@stylistic/type-generic-spacing': 'warn',
291
+ '@stylistic/type-named-tuple-spacing': 'warn',
292
+ '@stylistic/wrap-iife': ['warn', 'outside'],
293
+ '@stylistic/wrap-regex': 'warn',
294
+ '@stylistic/yield-star-spacing': ['warn', {
295
+ before: true,
296
+ after: false
297
+ }]
298
+ }
299
+ };
300
+ }