@koffeine/eslint-config 44.2.0 → 44.3.1

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/README.md CHANGED
@@ -9,21 +9,21 @@ Koffeine's ESLint shareable config
9
9
 
10
10
  Use option `--save-exact` for npm install to make sure that ESLint and config rules match.
11
11
 
12
- __Install config__
12
+ __Config__
13
13
 
14
14
  ```sh
15
15
  npm install @koffeine/eslint-config --save-dev --save-exact
16
16
  ```
17
17
 
18
- __Install ESLint__
18
+ __ESLint__
19
19
 
20
- Install the correct version of ESLint, which is listed by the command:
20
+ Find out the matching version:
21
21
 
22
22
  ```sh
23
- npm info @koffeine/eslint-config peerDependencies
23
+ npm view @koffeine/eslint-config peerDependencies.eslint
24
24
  ```
25
25
 
26
- For example:
26
+ Install the matching version:
27
27
 
28
28
  ```sh
29
29
  npm install eslint@9.30.1 --save-dev --save-exact
@@ -31,7 +31,7 @@ npm install eslint@9.30.1 --save-dev --save-exact
31
31
 
32
32
  ## Usage
33
33
 
34
- Add the following to your eslint.config.js file:
34
+ Add the following to your `eslint.config.js` file:
35
35
 
36
36
  ```js
37
37
  import koffeine from '@koffeine/eslint-config';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koffeine/eslint-config",
3
- "version": "44.2.0",
3
+ "version": "44.3.1",
4
4
  "description": "Koffeine's ESLint shareable config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -17,21 +17,19 @@
17
17
  "url": "git+https://github.com/koffeine/eslint-config.git"
18
18
  },
19
19
  "files": [
20
- "index.js",
20
+ "src",
21
21
  "index.d.ts"
22
22
  ],
23
23
  "exports": {
24
24
  ".": {
25
25
  "types": "./index.d.ts",
26
- "default": "./index.js"
26
+ "default": "./src/index.js"
27
27
  }
28
28
  },
29
29
  "type": "module",
30
30
  "scripts": {
31
31
  "test": "eslint && tsc -p jsconfig.json && node test/index.js src/index.js",
32
- "build": "esbuild --minify --outfile=index.js src/index.js",
33
- "prepublishOnly": "npm test && npm run build",
34
- "postpublish": "rm index.js"
32
+ "prepublishOnly": "npm test"
35
33
  },
36
34
  "dependencies": {
37
35
  "@stylistic/eslint-plugin": "5.1.0"
@@ -40,7 +38,6 @@
40
38
  "@types/node": "^22",
41
39
  "@types/punycode": "^2",
42
40
  "@typescript-eslint/parser": "^8",
43
- "esbuild": "^0",
44
41
  "eslint": "9.30.1",
45
42
  "globals": "^16",
46
43
  "typescript": "^5"
package/src/eslint.js ADDED
@@ -0,0 +1,228 @@
1
+ /** @type {import('eslint').Linter.Config} */
2
+ export default {
3
+ name: 'koffeine/eslint',
4
+ linterOptions: {
5
+ reportUnusedDisableDirectives: 'error',
6
+ reportUnusedInlineConfigs: 'error'
7
+ },
8
+ rules: {
9
+ // POSSIBLE PROBLEMS
10
+
11
+ 'array-callback-return': [ 'error', { allowImplicit: false, checkForEach: false, allowVoid: false } ],
12
+ 'constructor-super': 'error',
13
+ 'for-direction': 'error',
14
+ 'getter-return': [ 'error', { allowImplicit: false } ],
15
+ 'no-async-promise-executor': 'error',
16
+ 'no-await-in-loop': 'error',
17
+ 'no-class-assign': 'error',
18
+ 'no-compare-neg-zero': 'error',
19
+ 'no-cond-assign': [ 'error', 'except-parens' ],
20
+ 'no-const-assign': 'error',
21
+ 'no-constant-binary-expression': 'error',
22
+ 'no-constant-condition': [ 'error', { checkLoops: false } ],
23
+ 'no-constructor-return': 'error',
24
+ 'no-control-regex': 'error',
25
+ 'no-debugger': 'warn',
26
+ 'no-dupe-args': 'error',
27
+ 'no-dupe-class-members': 'error',
28
+ 'no-dupe-else-if': 'error',
29
+ 'no-dupe-keys': 'error',
30
+ 'no-duplicate-case': 'error',
31
+ 'no-duplicate-imports': [ 'error', { includeExports: true, allowSeparateTypeImports: false } ],
32
+ 'no-empty-character-class': 'error',
33
+ 'no-empty-pattern': 'error',
34
+ 'no-ex-assign': 'error',
35
+ 'no-fallthrough': [ 'error', { commentPattern: 'break[\\s\\w]*omitted', allowEmptyCase: true, reportUnusedFallthroughComment: true } ],
36
+ 'no-func-assign': 'error',
37
+ 'no-import-assign': 'error',
38
+ 'no-inner-declarations': [ 'error', 'both' ],
39
+ 'no-invalid-regexp': 'error',
40
+ 'no-irregular-whitespace': [ 'error', { skipStrings: false, skipComments: false, skipRegExps: false, skipTemplates: false, skipJSXText: false } ],
41
+ 'no-loss-of-precision': 'error',
42
+ 'no-misleading-character-class': [ 'error', { allowEscape: true } ],
43
+ 'no-new-native-nonconstructor': 'error',
44
+ 'no-obj-calls': 'error',
45
+ 'no-promise-executor-return': [ 'error', { allowVoid: false } ],
46
+ 'no-prototype-builtins': 'error',
47
+ 'no-self-assign': [ 'error', { props: true } ],
48
+ 'no-self-compare': 'error',
49
+ 'no-setter-return': 'error',
50
+ 'no-sparse-arrays': 'error',
51
+ 'no-template-curly-in-string': 'error',
52
+ 'no-this-before-super': 'error',
53
+ 'no-unassigned-vars': 'error',
54
+ 'no-undef': [ 'error', { typeof: true } ],
55
+ 'no-unexpected-multiline': 'error',
56
+ 'no-unmodified-loop-condition': 'error',
57
+ 'no-unreachable': 'error',
58
+ 'no-unreachable-loop': 'error',
59
+ 'no-unsafe-finally': 'error',
60
+ 'no-unsafe-negation': [ 'error', { enforceForOrderingRelations: true } ],
61
+ 'no-unsafe-optional-chaining': [ 'error', { disallowArithmeticOperators: true } ],
62
+ 'no-unused-private-class-members': 'error',
63
+ 'no-unused-vars': [ 'error', { vars: 'all', args: 'after-used', ignoreRestSiblings: false, caughtErrors: 'all', ignoreClassWithStaticInitBlock: false, reportUsedIgnorePattern: false } ],
64
+ 'no-use-before-define': [ 'error', { functions: true, classes: true, variables: true, allowNamedExports: false } ],
65
+ 'no-useless-assignment': 'error',
66
+ 'no-useless-backreference': 'error',
67
+ 'require-atomic-updates': 'off',
68
+ 'use-isnan': [ 'error', { enforceForSwitchCase: true, enforceForIndexOf: true } ],
69
+ 'valid-typeof': [ 'error', { requireStringLiterals: true } ],
70
+
71
+ // SUGGESTIONS
72
+
73
+ 'accessor-pairs': 'off',
74
+ 'arrow-body-style': [ 'error', 'as-needed', { requireReturnForObjectLiteral: false } ],
75
+ 'block-scoped-var': 'error',
76
+ 'camelcase': [ 'error', { properties: 'always', ignoreDestructuring: false, ignoreImports: false, ignoreGlobals: false } ],
77
+ 'capitalized-comments': 'off',
78
+ 'class-methods-use-this': 'off',
79
+ 'complexity': 'off',
80
+ 'consistent-return': [ 'error', { treatUndefinedAsUnspecified: true } ],
81
+ 'consistent-this': [ 'error', 'self' ],
82
+ 'curly': [ 'error', 'all' ],
83
+ 'default-case': 'error',
84
+ 'default-case-last': 'error',
85
+ 'default-param-last': 'error',
86
+ 'dot-notation': [ 'error', { allowKeywords: true } ],
87
+ 'eqeqeq': [ 'error', 'smart' ],
88
+ 'func-name-matching': [ 'error', 'always', { considerPropertyDescriptor: true, includeCommonJSModuleExports: false } ],
89
+ 'func-names': 'off',
90
+ 'func-style': [ 'error', 'expression', { allowArrowFunctions: true } ],
91
+ 'grouped-accessor-pairs': [ 'error', 'anyOrder' ],
92
+ 'guard-for-in': 'off',
93
+ 'id-denylist': 'off',
94
+ 'id-length': 'off',
95
+ 'id-match': 'off',
96
+ 'init-declarations': 'off',
97
+ 'logical-assignment-operators': [ 'error', 'always', { enforceForIfStatements: true } ],
98
+ 'max-classes-per-file': 'off',
99
+ 'max-depth': 'off',
100
+ 'max-lines': 'off',
101
+ 'max-lines-per-function': 'off',
102
+ 'max-nested-callbacks': 'off',
103
+ 'max-params': 'off',
104
+ 'max-statements': 'off',
105
+ 'new-cap': [ 'error', { newIsCap: true, capIsNew: true, properties: true } ],
106
+ 'no-alert': 'warn',
107
+ 'no-array-constructor': 'error',
108
+ 'no-bitwise': [ 'error', { int32Hint: false } ],
109
+ 'no-caller': 'error',
110
+ 'no-case-declarations': 'error',
111
+ 'no-console': 'warn',
112
+ 'no-continue': 'off',
113
+ 'no-delete-var': 'error',
114
+ 'no-div-regex': 'off',
115
+ 'no-else-return': 'off',
116
+ 'no-empty': [ 'error', { allowEmptyCatch: false } ],
117
+ 'no-empty-function': 'error',
118
+ 'no-empty-static-block': 'error',
119
+ 'no-eq-null': 'error',
120
+ 'no-eval': [ 'error', { allowIndirect: false } ],
121
+ 'no-extend-native': 'error',
122
+ 'no-extra-bind': 'error',
123
+ 'no-extra-boolean-cast': [ 'error', { enforceForInnerExpressions: true } ],
124
+ 'no-extra-label': 'error',
125
+ 'no-global-assign': 'error',
126
+ 'no-implicit-coercion': [ 'error', { boolean: true, number: true, string: true, disallowTemplateShorthand: true } ],
127
+ 'no-implicit-globals': 'off',
128
+ 'no-implied-eval': 'error',
129
+ 'no-inline-comments': 'off',
130
+ 'no-invalid-this': [ 'error', { capIsConstructor: true } ],
131
+ 'no-iterator': 'error',
132
+ 'no-label-var': 'error',
133
+ 'no-labels': [ 'error', { allowLoop: false, allowSwitch: false } ],
134
+ 'no-lone-blocks': 'error',
135
+ 'no-lonely-if': 'error',
136
+ 'no-loop-func': 'error',
137
+ 'no-magic-numbers': 'off',
138
+ 'no-multi-assign': 'off',
139
+ 'no-multi-str': 'error',
140
+ 'no-negated-condition': 'error',
141
+ 'no-nested-ternary': 'error',
142
+ 'no-new': 'error',
143
+ 'no-new-func': 'error',
144
+ 'no-new-wrappers': 'error',
145
+ 'no-nonoctal-decimal-escape': 'error',
146
+ 'no-object-constructor': 'error',
147
+ 'no-octal': 'error',
148
+ 'no-octal-escape': 'error',
149
+ 'no-param-reassign': 'off',
150
+ 'no-plusplus': 'off',
151
+ 'no-proto': 'error',
152
+ 'no-redeclare': [ 'error', { builtinGlobals: true } ],
153
+ 'no-regex-spaces': 'error',
154
+ 'no-restricted-exports': 'off',
155
+ 'no-restricted-globals': 'off',
156
+ 'no-restricted-imports': 'off',
157
+ 'no-restricted-properties': 'off',
158
+ 'no-restricted-syntax': 'off',
159
+ 'no-return-assign': 'off',
160
+ 'no-script-url': 'error',
161
+ 'no-sequences': [ 'error', { allowInParentheses: false } ],
162
+ 'no-shadow': [ 'error', { builtinGlobals: false, hoist: 'all', ignoreOnInitialization: false } ],
163
+ 'no-shadow-restricted-names': [ 'error', { reportGlobalThis: true } ],
164
+ 'no-ternary': 'off',
165
+ 'no-throw-literal': 'error',
166
+ 'no-undef-init': 'error',
167
+ 'no-undefined': 'error',
168
+ 'no-underscore-dangle': [
169
+ 'error',
170
+ {
171
+ allowAfterThis: false,
172
+ allowAfterSuper: false,
173
+ allowAfterThisConstructor: false,
174
+ enforceInMethodNames: true,
175
+ enforceInClassFields: true,
176
+ allowInArrayDestructuring: false,
177
+ allowInObjectDestructuring: false,
178
+ allowFunctionParams: false
179
+ }
180
+ ],
181
+ 'no-unneeded-ternary': [ 'error', { defaultAssignment: true } ],
182
+ 'no-unused-expressions': [ 'error', { allowShortCircuit: false, allowTernary: false, allowTaggedTemplates: false, enforceForJSX: false, ignoreDirectives: false } ],
183
+ 'no-unused-labels': 'error',
184
+ 'no-useless-call': 'error',
185
+ 'no-useless-catch': 'error',
186
+ 'no-useless-computed-key': [ 'error', { enforceForClassMembers: true } ],
187
+ 'no-useless-concat': 'error',
188
+ 'no-useless-constructor': 'error',
189
+ 'no-useless-escape': 'error',
190
+ 'no-useless-rename': [ 'error', { ignoreImport: false, ignoreExport: false, ignoreDestructuring: false } ],
191
+ 'no-useless-return': 'error',
192
+ 'no-var': 'error',
193
+ 'no-void': [ 'error', { allowAsStatement: false } ],
194
+ 'no-warning-comments': [ 'warn', { terms: [ 'todo', 'fixme', 'xxx' ], location: 'start' } ],
195
+ 'no-with': 'error',
196
+ 'object-shorthand': [ 'error', 'always', { avoidQuotes: false, ignoreConstructors: false, avoidExplicitReturnArrows: true } ],
197
+ 'one-var': 'off',
198
+ 'operator-assignment': [ 'error', 'always' ],
199
+ 'prefer-arrow-callback': [ 'error', { allowNamedFunctions: false, allowUnboundThis: false } ],
200
+ 'prefer-const': [ 'error', { destructuring: 'all', ignoreReadBeforeAssign: false } ],
201
+ 'prefer-destructuring': 'off',
202
+ 'prefer-exponentiation-operator': 'error',
203
+ 'prefer-named-capture-group': 'off',
204
+ 'prefer-numeric-literals': 'off',
205
+ 'prefer-object-has-own': 'error',
206
+ 'prefer-object-spread': 'error',
207
+ 'prefer-promise-reject-errors': 'off',
208
+ 'prefer-regex-literals': 'error',
209
+ 'prefer-rest-params': 'error',
210
+ 'prefer-spread': 'error',
211
+ 'prefer-template': 'error',
212
+ 'radix': [ 'error', 'as-needed' ],
213
+ 'require-await': 'error',
214
+ 'require-unicode-regexp': [ 'error', { requireFlag: 'v' } ],
215
+ 'require-yield': 'error',
216
+ 'sort-imports': 'off',
217
+ 'sort-keys': 'off',
218
+ 'sort-vars': 'off',
219
+ 'strict': [ 'error', 'global' ],
220
+ 'symbol-description': 'off',
221
+ 'vars-on-top': 'off',
222
+ 'yoda': [ 'error', 'never', { exceptRange: false, onlyEquality: false } ],
223
+
224
+ // LAYOUT & FORMATTING
225
+
226
+ 'unicode-bom': [ 'error', 'never' ]
227
+ }
228
+ };
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import eslint from './eslint.js';
2
+ import stylistic from './stylistic.js';
3
+
4
+ export default [ eslint, stylistic ];
@@ -0,0 +1,198 @@
1
+ import stylisticPlugin from '@stylistic/eslint-plugin';
2
+
3
+ /** @type {import('eslint').Linter.Config} */
4
+ export default {
5
+ name: 'koffeine/@stylistic',
6
+ plugins: {
7
+ '@stylistic': stylisticPlugin
8
+ },
9
+ rules: {
10
+ '@stylistic/array-bracket-newline': [ 'error', 'consistent' ],
11
+ '@stylistic/array-bracket-spacing': [ 'error', 'always', { singleValue: true, objectsInArrays: true, arraysInArrays: true } ],
12
+ '@stylistic/array-element-newline': [ 'error', 'consistent' ],
13
+ '@stylistic/arrow-parens': [ 'error', 'always' ],
14
+ '@stylistic/arrow-spacing': [ 'error', { before: true, after: true } ],
15
+ '@stylistic/block-spacing': [ 'error', 'always' ],
16
+ '@stylistic/brace-style': [ 'error', '1tbs', { allowSingleLine: false } ],
17
+ '@stylistic/comma-dangle': [ 'error', 'only-multiline' ],
18
+ '@stylistic/comma-spacing': [ 'error', { before: false, after: true } ],
19
+ '@stylistic/comma-style': [ 'error', 'last' ],
20
+ '@stylistic/computed-property-spacing': [ 'error', 'never', { enforceForClassMembers: true } ],
21
+ '@stylistic/curly-newline': 'off',
22
+ '@stylistic/dot-location': [ 'error', 'property' ],
23
+ '@stylistic/eol-last': [ 'error', 'always' ],
24
+ '@stylistic/function-call-argument-newline': [ 'error', 'consistent' ],
25
+ '@stylistic/function-call-spacing': [ 'error', 'never' ],
26
+ '@stylistic/function-paren-newline': [ 'error', 'consistent' ],
27
+ '@stylistic/generator-star-spacing': [ 'error', { before: true, after: false } ],
28
+ '@stylistic/implicit-arrow-linebreak': 'off',
29
+ '@stylistic/indent': [
30
+ 'error',
31
+ 'tab',
32
+ {
33
+ SwitchCase: 1,
34
+ VariableDeclarator: 1,
35
+ outerIIFEBody: 1,
36
+ MemberExpression: 1,
37
+ FunctionDeclaration: { parameters: 1, body: 1 },
38
+ FunctionExpression: { parameters: 1, body: 1 },
39
+ CallExpression: { arguments: 1 },
40
+ ArrayExpression: 1,
41
+ ObjectExpression: 1,
42
+ ImportDeclaration: 1,
43
+ flatTernaryExpressions: false,
44
+ offsetTernaryExpressions: false,
45
+ ignoreComments: false,
46
+ tabLength: 4
47
+ }
48
+ ],
49
+ '@stylistic/indent-binary-ops': 'off',
50
+ '@stylistic/jsx-child-element-spacing': 'off',
51
+ '@stylistic/jsx-closing-bracket-location': 'off',
52
+ '@stylistic/jsx-closing-tag-location': 'off',
53
+ '@stylistic/jsx-curly-brace-presence': 'off',
54
+ '@stylistic/jsx-curly-newline': 'off',
55
+ '@stylistic/jsx-curly-spacing': 'off',
56
+ '@stylistic/jsx-equals-spacing': 'off',
57
+ '@stylistic/jsx-first-prop-new-line': 'off',
58
+ '@stylistic/jsx-function-call-newline': 'off',
59
+ '@stylistic/jsx-indent-props': 'off',
60
+ '@stylistic/jsx-max-props-per-line': 'off',
61
+ '@stylistic/jsx-newline': 'off',
62
+ '@stylistic/jsx-one-expression-per-line': 'off',
63
+ '@stylistic/jsx-pascal-case': 'off',
64
+ '@stylistic/jsx-props-no-multi-spaces': 'off',
65
+ '@stylistic/jsx-quotes': [ 'error', 'prefer-double' ],
66
+ '@stylistic/jsx-self-closing-comp': 'off',
67
+ '@stylistic/jsx-sort-props': 'off',
68
+ '@stylistic/jsx-tag-spacing': 'off',
69
+ '@stylistic/jsx-wrap-multilines': 'off',
70
+ '@stylistic/key-spacing': [ 'error', { beforeColon: false, afterColon: true, mode: 'minimum' } ],
71
+ '@stylistic/keyword-spacing': [ 'error', { before: true, after: true } ],
72
+ '@stylistic/line-comment-position': 'off',
73
+ '@stylistic/linebreak-style': [ 'error', 'unix' ],
74
+ '@stylistic/lines-around-comment': 'off',
75
+ '@stylistic/lines-between-class-members': [ 'error', 'always', { exceptAfterSingleLine: false } ],
76
+ '@stylistic/max-len': 'off',
77
+ '@stylistic/max-statements-per-line': 'off',
78
+ '@stylistic/member-delimiter-style': 'off',
79
+ '@stylistic/multiline-comment-style': 'off',
80
+ '@stylistic/multiline-ternary': 'off',
81
+ '@stylistic/new-parens': [ 'error', 'always' ],
82
+ '@stylistic/newline-per-chained-call': 'off',
83
+ '@stylistic/no-confusing-arrow': 'off',
84
+ '@stylistic/no-extra-parens': [
85
+ 'error',
86
+ 'all',
87
+ {
88
+ conditionalAssign: false,
89
+ returnAssign: true,
90
+ nestedBinaryExpressions: false,
91
+ ternaryOperandBinaryExpressions: true,
92
+ ignoreJSX: 'none',
93
+ enforceForArrowConditionals: true,
94
+ enforceForSequenceExpressions: true,
95
+ enforceForNewInMemberExpressions: false,
96
+ enforceForFunctionPrototypeMethods: false,
97
+ nestedConditionalExpressions: false
98
+ }
99
+ ],
100
+ '@stylistic/no-extra-semi': 'error',
101
+ '@stylistic/no-floating-decimal': 'error',
102
+ '@stylistic/no-mixed-operators': [
103
+ 'error',
104
+ {
105
+ groups: [
106
+ [ '+', '-', '*', '/', '%', '**' ],
107
+ [ '&', '|', '^', '~', '<<', '>>', '>>>' ],
108
+ [ '==', '!=', '===', '!==', '>', '>=', '<', '<=' ],
109
+ [ '&&', '||' ],
110
+ [ 'in', 'instanceof' ]
111
+ ],
112
+ allowSamePrecedence: true
113
+ }
114
+ ],
115
+ '@stylistic/no-mixed-spaces-and-tabs': 'error',
116
+ '@stylistic/no-multi-spaces': [ 'error', { ignoreEOLComments: false, exceptions: { Property: true, BinaryExpression: false, VariableDeclarator: true, ImportDeclaration: false }, includeTabs: true } ],
117
+ '@stylistic/no-multiple-empty-lines': [ 'error', { max: 2, maxEOF: 1, maxBOF: 0 } ],
118
+ '@stylistic/no-tabs': 'off',
119
+ '@stylistic/no-trailing-spaces': [ 'error', { skipBlankLines: false, ignoreComments: false } ],
120
+ '@stylistic/no-whitespace-before-property': 'error',
121
+ '@stylistic/nonblock-statement-body-position': 'off',
122
+ '@stylistic/object-curly-newline': [ 'error', { consistent: true } ],
123
+ '@stylistic/object-curly-spacing': [ 'error', 'always', { arraysInObjects: true, objectsInObjects: true } ],
124
+ '@stylistic/object-property-newline': 'off',
125
+ '@stylistic/one-var-declaration-per-line': 'off',
126
+ '@stylistic/operator-linebreak': [ 'error', 'before' ],
127
+ '@stylistic/padded-blocks': 'off',
128
+ '@stylistic/padding-line-between-statements': [
129
+ 'error',
130
+
131
+ { prev: '*', next: 'block', blankLine: 'always' },
132
+ { prev: 'block', next: '*', blankLine: 'always' },
133
+
134
+ { prev: '*', next: 'block-like', blankLine: 'always' },
135
+ { prev: 'block-like', next: '*', blankLine: 'always' },
136
+
137
+ { prev: '*', next: 'class', blankLine: 'always' },
138
+ { prev: 'class', next: '*', blankLine: 'always' },
139
+
140
+ { prev: '*', next: 'do', blankLine: 'always' },
141
+ { prev: 'do', next: '*', blankLine: 'always' },
142
+
143
+ { prev: '*', next: 'for', blankLine: 'always' },
144
+ { prev: 'for', next: '*', blankLine: 'always' },
145
+
146
+ { prev: '*', next: 'function', blankLine: 'always' },
147
+ { prev: 'function', next: '*', blankLine: 'always' },
148
+
149
+ { prev: '*', next: 'if', blankLine: 'always' },
150
+ { prev: 'if', next: '*', blankLine: 'always' },
151
+
152
+ { prev: '*', next: 'multiline-block-like', blankLine: 'always' },
153
+ { prev: 'multiline-block-like', next: '*', blankLine: 'always' },
154
+
155
+ { prev: '*', next: 'multiline-const', blankLine: 'always' },
156
+ { prev: 'multiline-const', next: '*', blankLine: 'always' },
157
+
158
+ { prev: '*', next: 'multiline-let', blankLine: 'always' },
159
+ { prev: 'multiline-let', next: '*', blankLine: 'always' },
160
+
161
+ { prev: '*', next: 'multiline-var', blankLine: 'always' },
162
+ { prev: 'multiline-var', next: '*', blankLine: 'always' },
163
+
164
+ { prev: '*', next: 'switch', blankLine: 'always' },
165
+ { prev: 'switch', next: '*', blankLine: 'always' },
166
+
167
+ { prev: '*', next: 'try', blankLine: 'always' },
168
+ { prev: 'try', next: '*', blankLine: 'always' },
169
+
170
+ { prev: '*', next: 'while', blankLine: 'always' },
171
+ { prev: 'while', next: '*', blankLine: 'always' },
172
+
173
+ { prev: '*', next: 'multiline-export', blankLine: 'always' },
174
+ { prev: 'multiline-export', next: '*', blankLine: 'always' }
175
+ ],
176
+ '@stylistic/quote-props': [ 'error', 'as-needed', { keywords: false, unnecessary: true, numbers: false } ],
177
+ '@stylistic/quotes': [ 'error', 'single', { avoidEscape: true, allowTemplateLiterals: false, ignoreStringLiterals: false } ],
178
+ '@stylistic/rest-spread-spacing': [ 'error', 'never' ],
179
+ '@stylistic/semi': [ 'error', 'always', { omitLastInOneLineBlock: false, omitLastInOneLineClassBody: false } ],
180
+ '@stylistic/semi-spacing': [ 'error', { before: false, after: true } ],
181
+ '@stylistic/semi-style': [ 'error', 'last' ],
182
+ '@stylistic/space-before-blocks': [ 'error', 'always' ],
183
+ '@stylistic/space-before-function-paren': [ 'error', { anonymous: 'never', named: 'never', asyncArrow: 'always' } ],
184
+ '@stylistic/space-in-parens': [ 'error', 'never' ],
185
+ '@stylistic/space-infix-ops': [ 'error', { int32Hint: false } ],
186
+ '@stylistic/space-unary-ops': [ 'error', { words: true, nonwords: false } ],
187
+ '@stylistic/spaced-comment': [ 'error', 'always' ],
188
+ '@stylistic/switch-colon-spacing': [ 'error', { before: false, after: true } ],
189
+ '@stylistic/template-curly-spacing': [ 'error', 'never' ],
190
+ '@stylistic/template-tag-spacing': 'off',
191
+ '@stylistic/type-annotation-spacing': 'off',
192
+ '@stylistic/type-generic-spacing': 'off',
193
+ '@stylistic/type-named-tuple-spacing': 'off',
194
+ '@stylistic/wrap-iife': [ 'error', 'outside', { functionPrototypeMethods: false } ],
195
+ '@stylistic/wrap-regex': 'off',
196
+ '@stylistic/yield-star-spacing': [ 'error', 'before' ]
197
+ }
198
+ };
package/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";import e from"@stylistic/eslint-plugin";export default[{name:"koffeine/eslint",linterOptions:{reportUnusedDisableDirectives:"error",reportUnusedInlineConfigs:"error"},rules:{"array-callback-return":["error",{allowImplicit:!1,checkForEach:!1,allowVoid:!1}],"constructor-super":"error","for-direction":"error","getter-return":["error",{allowImplicit:!1}],"no-async-promise-executor":"error","no-await-in-loop":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","except-parens"],"no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":["error",{checkLoops:!1}],"no-constructor-return":"error","no-control-regex":"error","no-debugger":"warn","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":["error",{includeExports:!0,allowSeparateTypeImports:!1}],"no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-fallthrough":["error",{commentPattern:"break[\\s\\w]*omitted",allowEmptyCase:!0,reportUnusedFallthroughComment:!0}],"no-func-assign":"error","no-import-assign":"error","no-inner-declarations":["error","both"],"no-invalid-regexp":"error","no-irregular-whitespace":["error",{skipStrings:!1,skipComments:!1,skipRegExps:!1,skipTemplates:!1,skipJSXText:!1}],"no-loss-of-precision":"error","no-misleading-character-class":["error",{allowEscape:!0}],"no-new-native-nonconstructor":"error","no-obj-calls":"error","no-promise-executor-return":["error",{allowVoid:!1}],"no-prototype-builtins":"error","no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-unassigned-vars":"error","no-undef":["error",{typeof:!0}],"no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":["error",{enforceForOrderingRelations:!0}],"no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-unused-private-class-members":"error","no-unused-vars":["error",{vars:"all",args:"after-used",ignoreRestSiblings:!1,caughtErrors:"all",ignoreClassWithStaticInitBlock:!1,reportUsedIgnorePattern:!1}],"no-use-before-define":["error",{functions:!0,classes:!0,variables:!0,allowNamedExports:!1}],"no-useless-assignment":"error","no-useless-backreference":"error","require-atomic-updates":"off","use-isnan":["error",{enforceForSwitchCase:!0,enforceForIndexOf:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"accessor-pairs":"off","arrow-body-style":["error","as-needed",{requireReturnForObjectLiteral:!1}],"block-scoped-var":"error",camelcase:["error",{properties:"always",ignoreDestructuring:!1,ignoreImports:!1,ignoreGlobals:!1}],"capitalized-comments":"off","class-methods-use-this":"off",complexity:"off","consistent-return":["error",{treatUndefinedAsUnspecified:!0}],"consistent-this":["error","self"],curly:["error","all"],"default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","smart"],"func-name-matching":["error","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":"off","func-style":["error","expression",{allowArrowFunctions:!0}],"grouped-accessor-pairs":["error","anyOrder"],"guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","logical-assignment-operators":["error","always",{enforceForIfStatements:!0}],"max-classes-per-file":"off","max-depth":"off","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"off","max-params":"off","max-statements":"off","new-cap":["error",{newIsCap:!0,capIsNew:!0,properties:!0}],"no-alert":"warn","no-array-constructor":"error","no-bitwise":["error",{int32Hint:!1}],"no-caller":"error","no-case-declarations":"error","no-console":"warn","no-continue":"off","no-delete-var":"error","no-div-regex":"off","no-else-return":"off","no-empty":["error",{allowEmptyCatch:!1}],"no-empty-function":"error","no-empty-static-block":"error","no-eq-null":"error","no-eval":["error",{allowIndirect:!1}],"no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":["error",{enforceForInnerExpressions:!0}],"no-extra-label":"error","no-global-assign":"error","no-implicit-coercion":["error",{boolean:!0,number:!0,string:!0,disallowTemplateShorthand:!0}],"no-implicit-globals":"off","no-implied-eval":"error","no-inline-comments":"off","no-invalid-this":["error",{capIsConstructor:!0}],"no-iterator":"error","no-label-var":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-magic-numbers":"off","no-multi-assign":"off","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"off","no-plusplus":"off","no-proto":"error","no-redeclare":["error",{builtinGlobals:!0}],"no-regex-spaces":"error","no-restricted-exports":"off","no-restricted-globals":"off","no-restricted-imports":"off","no-restricted-properties":"off","no-restricted-syntax":"off","no-return-assign":"off","no-script-url":"error","no-sequences":["error",{allowInParentheses:!1}],"no-shadow":["error",{builtinGlobals:!1,hoist:"all",ignoreOnInitialization:!1}],"no-shadow-restricted-names":["error",{reportGlobalThis:!0}],"no-ternary":"off","no-throw-literal":"error","no-undef-init":"error","no-undefined":"error","no-underscore-dangle":["error",{allowAfterThis:!1,allowAfterSuper:!1,allowAfterThisConstructor:!1,enforceInMethodNames:!0,enforceInClassFields:!0,allowInArrayDestructuring:!1,allowInObjectDestructuring:!1,allowFunctionParams:!1}],"no-unneeded-ternary":["error",{defaultAssignment:!0}],"no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1,enforceForJSX:!1,ignoreDirectives:!1}],"no-unused-labels":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":["error",{enforceForClassMembers:!0}],"no-useless-concat":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":["error",{ignoreImport:!1,ignoreExport:!1,ignoreDestructuring:!1}],"no-useless-return":"error","no-var":"error","no-void":["error",{allowAsStatement:!1}],"no-warning-comments":["warn",{terms:["todo","fixme","xxx"],location:"start"}],"no-with":"error","object-shorthand":["error","always",{avoidQuotes:!1,ignoreConstructors:!1,avoidExplicitReturnArrows:!0}],"one-var":"off","operator-assignment":["error","always"],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!1}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!1}],"prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-named-capture-group":"off","prefer-numeric-literals":"off","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"off","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:["error","as-needed"],"require-await":"error","require-unicode-regexp":["error",{requireFlag:"v"}],"require-yield":"error","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:["error","global"],"symbol-description":"off","vars-on-top":"off",yoda:["error","never",{exceptRange:!1,onlyEquality:!1}],"unicode-bom":["error","never"]}},{name:"koffeine/@stylistic",plugins:{"@stylistic":e},rules:{"@stylistic/array-bracket-newline":["error","consistent"],"@stylistic/array-bracket-spacing":["error","always",{singleValue:!0,objectsInArrays:!0,arraysInArrays:!0}],"@stylistic/array-element-newline":["error","consistent"],"@stylistic/arrow-parens":["error","always"],"@stylistic/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/block-spacing":["error","always"],"@stylistic/brace-style":["error","1tbs",{allowSingleLine:!1}],"@stylistic/comma-dangle":["error","only-multiline"],"@stylistic/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/comma-style":["error","last"],"@stylistic/computed-property-spacing":["error","never",{enforceForClassMembers:!0}],"@stylistic/curly-newline":"off","@stylistic/dot-location":["error","property"],"@stylistic/eol-last":["error","always"],"@stylistic/function-call-argument-newline":["error","consistent"],"@stylistic/function-call-spacing":["error","never"],"@stylistic/function-paren-newline":["error","consistent"],"@stylistic/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/implicit-arrow-linebreak":"off","@stylistic/indent":["error","tab",{SwitchCase:1,VariableDeclarator:1,outerIIFEBody:1,MemberExpression:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},CallExpression:{arguments:1},ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,offsetTernaryExpressions:!1,ignoreComments:!1,tabLength:4}],"@stylistic/indent-binary-ops":"off","@stylistic/jsx-child-element-spacing":"off","@stylistic/jsx-closing-bracket-location":"off","@stylistic/jsx-closing-tag-location":"off","@stylistic/jsx-curly-brace-presence":"off","@stylistic/jsx-curly-newline":"off","@stylistic/jsx-curly-spacing":"off","@stylistic/jsx-equals-spacing":"off","@stylistic/jsx-first-prop-new-line":"off","@stylistic/jsx-function-call-newline":"off","@stylistic/jsx-indent-props":"off","@stylistic/jsx-max-props-per-line":"off","@stylistic/jsx-newline":"off","@stylistic/jsx-one-expression-per-line":"off","@stylistic/jsx-pascal-case":"off","@stylistic/jsx-props-no-multi-spaces":"off","@stylistic/jsx-quotes":["error","prefer-double"],"@stylistic/jsx-self-closing-comp":"off","@stylistic/jsx-sort-props":"off","@stylistic/jsx-tag-spacing":"off","@stylistic/jsx-wrap-multilines":"off","@stylistic/key-spacing":["error",{beforeColon:!1,afterColon:!0,mode:"minimum"}],"@stylistic/keyword-spacing":["error",{before:!0,after:!0}],"@stylistic/line-comment-position":"off","@stylistic/linebreak-style":["error","unix"],"@stylistic/lines-around-comment":["error",{beforeBlockComment:!0,afterBlockComment:!1,beforeLineComment:!1,afterLineComment:!1,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,applyDefaultIgnorePatterns:!0,afterHashbangComment:!1}],"@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!1}],"@stylistic/max-len":"off","@stylistic/max-statements-per-line":"off","@stylistic/member-delimiter-style":"off","@stylistic/multiline-comment-style":"off","@stylistic/multiline-ternary":"off","@stylistic/new-parens":["error","always"],"@stylistic/newline-per-chained-call":"off","@stylistic/no-confusing-arrow":"off","@stylistic/no-extra-parens":["error","all",{conditionalAssign:!1,returnAssign:!0,nestedBinaryExpressions:!1,ternaryOperandBinaryExpressions:!0,ignoreJSX:"none",enforceForArrowConditionals:!0,enforceForSequenceExpressions:!0,enforceForNewInMemberExpressions:!1,enforceForFunctionPrototypeMethods:!1,nestedConditionalExpressions:!1}],"@stylistic/no-extra-semi":"error","@stylistic/no-floating-decimal":"error","@stylistic/no-mixed-operators":["error",{groups:[["+","-","*","/","%","**"],["&","|","^","~","<<",">>",">>>"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/no-mixed-spaces-and-tabs":"error","@stylistic/no-multi-spaces":["error",{ignoreEOLComments:!1,exceptions:{Property:!0,BinaryExpression:!1,VariableDeclarator:!0,ImportDeclaration:!1},includeTabs:!0}],"@stylistic/no-multiple-empty-lines":["error",{max:2,maxEOF:1,maxBOF:0}],"@stylistic/no-tabs":"off","@stylistic/no-trailing-spaces":["error",{skipBlankLines:!1,ignoreComments:!1}],"@stylistic/no-whitespace-before-property":"error","@stylistic/nonblock-statement-body-position":"off","@stylistic/object-curly-newline":["error",{consistent:!0}],"@stylistic/object-curly-spacing":["error","always",{arraysInObjects:!0,objectsInObjects:!0}],"@stylistic/object-property-newline":"off","@stylistic/one-var-declaration-per-line":"off","@stylistic/operator-linebreak":["error","before"],"@stylistic/padded-blocks":"off","@stylistic/padding-line-between-statements":["error",{prev:"*",next:"block",blankLine:"always"},{prev:"block",next:"*",blankLine:"always"},{prev:"*",next:"block-like",blankLine:"always"},{prev:"block-like",next:"*",blankLine:"always"},{prev:"*",next:"class",blankLine:"always"},{prev:"class",next:"*",blankLine:"always"},{prev:"*",next:"do",blankLine:"always"},{prev:"do",next:"*",blankLine:"always"},{prev:"*",next:"for",blankLine:"always"},{prev:"for",next:"*",blankLine:"always"},{prev:"*",next:"function",blankLine:"always"},{prev:"function",next:"*",blankLine:"always"},{prev:"*",next:"if",blankLine:"always"},{prev:"if",next:"*",blankLine:"always"},{prev:"*",next:"multiline-block-like",blankLine:"always"},{prev:"multiline-block-like",next:"*",blankLine:"always"},{prev:"*",next:"multiline-const",blankLine:"always"},{prev:"multiline-const",next:"*",blankLine:"always"},{prev:"*",next:"multiline-let",blankLine:"always"},{prev:"multiline-let",next:"*",blankLine:"always"},{prev:"*",next:"multiline-var",blankLine:"always"},{prev:"multiline-var",next:"*",blankLine:"always"},{prev:"*",next:"switch",blankLine:"always"},{prev:"switch",next:"*",blankLine:"always"},{prev:"*",next:"try",blankLine:"always"},{prev:"try",next:"*",blankLine:"always"},{prev:"*",next:"while",blankLine:"always"},{prev:"while",next:"*",blankLine:"always"},{prev:"*",next:"multiline-export",blankLine:"always"},{prev:"multiline-export",next:"*",blankLine:"always"}],"@stylistic/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/quotes":["error","single",{avoidEscape:!0,allowTemplateLiterals:!1,ignoreStringLiterals:!1}],"@stylistic/rest-spread-spacing":["error","never"],"@stylistic/semi":["error","always",{omitLastInOneLineBlock:!1,omitLastInOneLineClassBody:!1}],"@stylistic/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/semi-style":["error","last"],"@stylistic/space-before-blocks":["error","always"],"@stylistic/space-before-function-paren":["error",{anonymous:"never",named:"never",asyncArrow:"always"}],"@stylistic/space-in-parens":["error","never"],"@stylistic/space-infix-ops":["error",{int32Hint:!1}],"@stylistic/space-unary-ops":["error",{words:!0,nonwords:!1}],"@stylistic/spaced-comment":["error","always"],"@stylistic/switch-colon-spacing":["error",{before:!1,after:!0}],"@stylistic/template-curly-spacing":["error","never"],"@stylistic/template-tag-spacing":"off","@stylistic/type-annotation-spacing":"off","@stylistic/type-generic-spacing":"off","@stylistic/type-named-tuple-spacing":"off","@stylistic/wrap-iife":["error","outside",{functionPrototypeMethods:!1}],"@stylistic/wrap-regex":"off","@stylistic/yield-star-spacing":["error","before"]}}];