@qlik/eslint-config 1.4.27 → 2.0.0-next.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.
@@ -1,48 +1,9 @@
1
1
  // @ts-check
2
+ import eslintReact from "@eslint-react/eslint-plugin";
2
3
  import prettier from "eslint-config-prettier";
3
- import jsxA11y from "eslint-plugin-jsx-a11y";
4
- import eslintPluginReact from "eslint-plugin-react";
5
- import reactHooks from "eslint-plugin-react-hooks";
6
4
  import { mergeConfigs } from "../utils/config.js";
7
- import reactA11yRules from "./rules/react-a11y.js";
8
- import reactHooksRules from "./rules/react-hooks.js";
9
- import reactRules from "./rules/react.js";
10
5
  import { baseConfigJS, baseConfigTS } from "./shared/base.js";
11
- import { baseCjsJS, baseCjsTS } from "./shared/node.js";
12
-
13
- /**
14
- * @type {import("../types/index.js").ESLintFlatConfig}
15
- */
16
- const reactBaseConfig = mergeConfigs(
17
- // base it on the recommended react plugins config
18
- eslintPluginReact.configs.flat.recommended,
19
- jsxA11y.flatConfigs.recommended,
20
- reactHooks.configs.flat["recommended-latest"],
21
-
22
- // add qlik's recommended react config
23
- {
24
- languageOptions: {
25
- parserOptions: {
26
- ecmaFeatures: {
27
- jsx: true,
28
- },
29
- jsxPragma: null, // for @typescript/eslint-parser
30
- },
31
- },
32
-
33
- settings: {
34
- react: {
35
- version: "detect",
36
- },
37
- },
38
-
39
- rules: {
40
- ...reactRules,
41
- ...reactA11yRules,
42
- ...reactHooksRules,
43
- },
44
- },
45
- );
6
+ import reactRules from "./shared/default-rules/react.js";
46
7
 
47
8
  /**
48
9
  * @type {import("../types/index.js").ESLintFlatConfig}
@@ -50,15 +11,15 @@ const reactBaseConfig = mergeConfigs(
50
11
  const reactJS = mergeConfigs(
51
12
  // base it on the recommended javascript config
52
13
  baseConfigJS,
53
- // add the base react config
54
- reactBaseConfig,
14
+ // add the react config
15
+ eslintReact.configs.strict,
55
16
  // add qlik's recommended react config for javascript
56
17
  {
57
18
  name: "react-js",
58
19
  files: ["**/*.js", "**/*.jsx"],
59
20
  rules: {
60
21
  // turn on/off or modify js rules necessary for react
61
- "react/jsx-filename-extension": [2, { extensions: [".js", ".jsx"] }],
22
+ ...reactRules,
62
23
  },
63
24
  },
64
25
  prettier,
@@ -70,48 +31,19 @@ const reactJS = mergeConfigs(
70
31
  const reactTS = mergeConfigs(
71
32
  // base it on the recommended typescript config
72
33
  baseConfigTS,
73
- // add the base react config
74
- reactBaseConfig,
34
+ // add the react config
35
+ eslintReact.configs["strict-typescript"],
75
36
  // add qlik's recommended react config for typescript
76
37
  {
77
38
  name: "react-ts",
78
39
  files: ["**/*.ts", "**/*.tsx"],
79
40
  rules: {
80
41
  // turn on/off or modify js/ts rules necessary for react
81
- "react/jsx-filename-extension": [2, { extensions: [".js", ".jsx", ".ts", ".tsx"] }],
82
- // avoid double linting of class-methods-use-this in typescript
83
- "class-methods-use-this": "off",
84
- "@typescript-eslint/class-methods-use-this": reactBaseConfig.rules?.["class-methods-use-this"] || "off",
42
+ ...reactRules,
85
43
  },
86
44
  },
87
45
  prettier,
88
46
  );
89
47
 
90
- /**
91
- * Adding commonjs config for .cjs files
92
- * @type {import("../types/index.js").ESLintFlatConfig}
93
- */
94
- const reactCJS = mergeConfigs(
95
- baseCjsJS,
96
- {
97
- name: "react-cjs",
98
- files: ["**/*.cjs"],
99
- },
100
- prettier,
101
- );
102
-
103
- /**
104
- * Adding commonjs config for .cts files
105
- * @type {import("../types/index.js").ESLintFlatConfig}
106
- */
107
- const reactCTS = mergeConfigs(
108
- baseCjsTS,
109
- {
110
- name: "react-cts",
111
- files: ["**/*.cts"],
112
- },
113
- prettier,
114
- );
115
-
116
- export default [reactJS, reactTS, reactCJS, reactCTS];
48
+ export default [reactJS, reactTS];
117
49
  export { reactJS, reactTS };
@@ -1,21 +1,25 @@
1
1
  import js from "@eslint/js";
2
- import tsParser from "@typescript-eslint/parser";
3
- import eslintPluginImportX from "eslint-plugin-import-x";
2
+ import { importX } from "eslint-plugin-import-x";
4
3
  import globals from "globals";
5
4
  import tsconfig from "typescript-eslint";
6
5
  import { mergeConfigs } from "../../utils/config.js";
7
- import eslintCoreRules from "../rules/eslint-core.js";
8
- import importXRules from "../rules/import-x.js";
9
- import typescriptRules from "../rules/typescript.js";
6
+ import eslintCoreRules from "./default-rules/eslint-core.js";
7
+ import typescriptRules from "./default-rules/typescript.js";
8
+ import importXRules from "./default-rules/import-x.js";
10
9
 
11
10
  /**
11
+ * This is the base config that all other configs in this package extend from.
12
+ * It includes the recommended eslint rules and some basic settings for parsing
13
+ * modern javascript and typescript, as well as some of qlik's custom rules that
14
+ * are not specific to any framework or environment. This config is meant to be
15
+ * extended by other configs and not used directly.
12
16
  * @type {import("../../types/index.js").ESLintFlatConfig}
13
17
  */
14
18
  const baseConfig = mergeConfigs(
15
19
  // basic js config
16
20
  js.configs.recommended,
17
- // import-x plugin config
18
- eslintPluginImportX.flatConfigs.recommended,
21
+ // import-x recommended config
22
+ importX.flatConfigs.recommended,
19
23
  {
20
24
  languageOptions: {
21
25
  globals: globals.browser,
@@ -26,7 +30,7 @@ const baseConfig = mergeConfigs(
26
30
  sourceType: "module",
27
31
  },
28
32
  rules: {
29
- // add our recommended rules
33
+ // add or modify recommended default rules
30
34
  ...eslintCoreRules,
31
35
  ...importXRules,
32
36
  },
@@ -34,6 +38,11 @@ const baseConfig = mergeConfigs(
34
38
  );
35
39
 
36
40
  /**
41
+ * This config is meant to be extended by javascript specific configs, it is not meant to be used directly.
42
+ * Note that we are using the typescript parser to parse javascript files as well,
43
+ * this is because it can handle all modern javascript syntax and features, and it
44
+ * allows us to have a single parser for both javascript and typescript configs.
45
+ * We can turn off typescript specific rules in the javascript configs if needed.
37
46
  * @type {import("../../types/index.js").ESLintFlatConfig}
38
47
  */
39
48
  const baseConfigJS = mergeConfigs(
@@ -44,24 +53,27 @@ const baseConfigJS = mergeConfigs(
44
53
  );
45
54
 
46
55
  /**
56
+ * This config is meant to be extended by typescript specific configs,
57
+ * it is not meant to be used directly.
47
58
  * @type {import("../../types/index.js").ESLintFlatConfig}
48
59
  */
49
60
  const baseConfigTS = mergeConfigs(
50
61
  // base it on base config
51
62
  baseConfig,
63
+ // typescript settings for import-x
64
+ importX.flatConfigs.typescript,
52
65
  // add recommended typescript config
53
- ...tsconfig.configs.recommended,
54
- // add import-x recommended typescript config
55
- eslintPluginImportX.flatConfigs.typescript,
56
- // add qlik's recommended typescript config
66
+ ...tsconfig.configs.recommendedTypeChecked,
57
67
  {
58
68
  languageOptions: {
59
69
  parserOptions: {
60
- parser: tsParser,
61
70
  projectService: true,
62
71
  },
63
72
  },
64
- rules: typescriptRules,
73
+ rules: {
74
+ ...typescriptRules,
75
+ // add qlik's recommended typescript config for typescript here if needed
76
+ },
65
77
  },
66
78
  );
67
79
 
@@ -0,0 +1,441 @@
1
+ // @ts-check
2
+ import confusingBrowserGlobals from "confusing-browser-globals";
3
+
4
+ /**
5
+ * @satisfies {import("../../../types/index.js").ESLintFlatConfig["rules"]}
6
+ *
7
+ * eslint core recommended config https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js
8
+ */
9
+ const rules = {
10
+ // modify/add rules from eslint core package here additionally to the recommended rules
11
+
12
+ // require return statements to either always or never specify values
13
+ // https://eslint.org/docs/rules/consistent-return
14
+ "consistent-return": "error",
15
+
16
+ // require default case in switch statements
17
+ // https://eslint.org/docs/rules/default-case
18
+ "default-case": ["error", { commentPattern: "^no default$" }],
19
+
20
+ // Enforce default clauses in switch statements to be last
21
+ // https://eslint.org/docs/rules/default-case-last
22
+ "default-case-last": "error",
23
+
24
+ // Enforce default parameters to be last
25
+ // https://eslint.org/docs/rules/default-param-last
26
+ "default-param-last": "error",
27
+
28
+ // require the use of === and !==
29
+ // https://eslint.org/docs/rules/eqeqeq
30
+ eqeqeq: ["error", "always", { null: "ignore" }],
31
+
32
+ // disallow the use of alert, confirm, and prompt
33
+ // https://eslint.org/docs/rules/no-alert
34
+ "no-alert": "error",
35
+
36
+ // Disallow returning value in constructor
37
+ // https://eslint.org/docs/rules/no-constructor-return
38
+ "no-constructor-return": "error",
39
+
40
+ // disallow use of eval()
41
+ // https://eslint.org/docs/rules/no-eval
42
+ "no-eval": "error",
43
+
44
+ // disallow adding to native types
45
+ // https://eslint.org/docs/rules/no-extend-native
46
+ "no-extend-native": "error",
47
+
48
+ // disallow unnecessary function binding
49
+ // https://eslint.org/docs/rules/no-extra-bind
50
+ "no-extra-bind": "error",
51
+
52
+ // disallow use of eval()-like methods
53
+ // https://eslint.org/docs/rules/no-implied-eval
54
+ "no-implied-eval": "error",
55
+
56
+ // disallow unnecessary nested blocks
57
+ // https://eslint.org/docs/rules/no-lone-blocks
58
+ "no-lone-blocks": "error",
59
+
60
+ // disallow creation of functions within loops
61
+ // https://eslint.org/docs/rules/no-loop-func
62
+ "no-loop-func": "error",
63
+
64
+ // disallow use of new operator for Function object
65
+ // https://eslint.org/docs/rules/no-new-func
66
+ "no-new-func": "error",
67
+
68
+ // Disallow calls to the Object constructor without an argument
69
+ // https://eslint.org/docs/latest/rules/no-object-constructor
70
+ "no-object-constructor": "error",
71
+
72
+ // disallow use of octal escape sequences in string literals, such as
73
+ // var foo = 'Copyright \251';
74
+ // https://eslint.org/docs/rules/no-octal-escape
75
+ "no-octal-escape": "error",
76
+
77
+ // disallow reassignment of function parameters
78
+ // disallow parameter object manipulation except for specific exclusions
79
+ // rule: https://eslint.org/docs/rules/no-param-reassign.html
80
+ "no-param-reassign": [
81
+ "error",
82
+ {
83
+ props: true,
84
+ ignorePropertyModificationsFor: [
85
+ "prev", // for reduce accumulators
86
+ "acc", // for reduce accumulators
87
+ "accumulator", // for reduce accumulators
88
+ "e", // for e.returnvalue
89
+ "ctx", // for Koa routing
90
+ "context", // for Koa routing
91
+ "req", // for Express requests
92
+ "request", // for Express requests
93
+ "res", // for Express responses
94
+ "response", // for Express responses
95
+ "$scope", // for Angular 1 scopes
96
+ "staticContext", // for ReactRouter context
97
+ "sharedState", // for shared state in reducers
98
+ "state", // for shared state in reducers
99
+ ],
100
+ },
101
+ ],
102
+
103
+ // disallow usage of __proto__ property
104
+ // https://eslint.org/docs/rules/no-proto
105
+ "no-proto": "error",
106
+
107
+ // disallow certain object properties
108
+ // https://eslint.org/docs/rules/no-restricted-properties
109
+ "no-restricted-properties": [
110
+ "error",
111
+ {
112
+ object: "arguments",
113
+ property: "callee",
114
+ message: "arguments.callee is deprecated",
115
+ },
116
+ {
117
+ object: "global",
118
+ property: "isFinite",
119
+ message: "Please use Number.isFinite instead",
120
+ },
121
+ {
122
+ object: "self",
123
+ property: "isFinite",
124
+ message: "Please use Number.isFinite instead",
125
+ },
126
+ {
127
+ object: "window",
128
+ property: "isFinite",
129
+ message: "Please use Number.isFinite instead",
130
+ },
131
+ {
132
+ object: "global",
133
+ property: "isNaN",
134
+ message: "Please use Number.isNaN instead",
135
+ },
136
+ {
137
+ object: "self",
138
+ property: "isNaN",
139
+ message: "Please use Number.isNaN instead",
140
+ },
141
+ {
142
+ object: "window",
143
+ property: "isNaN",
144
+ message: "Please use Number.isNaN instead",
145
+ },
146
+ {
147
+ property: "__defineGetter__",
148
+ message: "Please use Object.defineProperty instead.",
149
+ },
150
+ {
151
+ property: "__defineSetter__",
152
+ message: "Please use Object.defineProperty instead.",
153
+ },
154
+ ],
155
+
156
+ // disallow use of assignment in return statement
157
+ // https://eslint.org/docs/rules/no-return-assign
158
+ "no-return-assign": ["error", "always"],
159
+
160
+ // disallow use of `javascript:` urls.
161
+ // https://eslint.org/docs/rules/no-script-url
162
+ "no-script-url": "error",
163
+
164
+ // disallow comparisons where both sides are exactly the same
165
+ // https://eslint.org/docs/rules/no-self-compare
166
+ "no-self-compare": "error",
167
+
168
+ // disallow use of comma operator
169
+ // https://eslint.org/docs/rules/no-sequences
170
+ "no-sequences": "error",
171
+
172
+ // restrict what can be thrown as an exception
173
+ // https://eslint.org/docs/rules/no-throw-literal
174
+ "no-throw-literal": "error",
175
+
176
+ // disallow unmodified conditions of loops
177
+ // https://eslint.org/docs/rules/no-unmodified-loop-condition
178
+ "no-unmodified-loop-condition": "error",
179
+
180
+ // disallow usage of expressions in statement position
181
+ // https://eslint.org/docs/rules/no-unused-expressions
182
+ "no-unused-expressions": [
183
+ "error",
184
+ {
185
+ allowShortCircuit: false,
186
+ allowTernary: false,
187
+ allowTaggedTemplates: false,
188
+ },
189
+ ],
190
+
191
+ // disallow unnecessary .call() and .apply()
192
+ // https://eslint.org/docs/rules/no-useless-call
193
+ "no-useless-call": "error",
194
+
195
+ // disallow useless string concatenation
196
+ // https://eslint.org/docs/rules/no-useless-concat
197
+ "no-useless-concat": "error",
198
+
199
+ // disallow redundant return; keywords
200
+ // https://eslint.org/docs/rules/no-useless-return
201
+ "no-useless-return": "error",
202
+
203
+ // require using Error objects as Promise rejection reasons
204
+ // https://eslint.org/docs/rules/prefer-promise-reject-errors
205
+ "prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
206
+
207
+ // Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()
208
+ // https://eslint.org/docs/rules/prefer-object-has-own
209
+ "prefer-object-has-own": "error",
210
+
211
+ // https://eslint.org/docs/rules/prefer-regex-literals
212
+ "prefer-regex-literals": [
213
+ "error",
214
+ {
215
+ disallowRedundantWrapping: true,
216
+ },
217
+ ],
218
+
219
+ // require use of the second argument for parseInt()
220
+ // https://eslint.org/docs/rules/radix
221
+ radix: "error",
222
+
223
+ // require or disallow Yoda conditions
224
+ // https://eslint.org/docs/rules/yoda
225
+ yoda: "error",
226
+
227
+ // Disallow await inside of loops
228
+ // https://eslint.org/docs/rules/no-await-in-loop
229
+ "no-await-in-loop": "error",
230
+
231
+ // disallow use of console
232
+ "no-console": "warn",
233
+
234
+ // disallow function or variable declarations in nested blocks
235
+ "no-inner-declarations": "error",
236
+
237
+ // Disallow returning values from Promise executor functions
238
+ // https://eslint.org/docs/rules/no-promise-executor-return
239
+ "no-promise-executor-return": "error",
240
+
241
+ // Disallow template literal placeholder syntax in regular strings
242
+ // https://eslint.org/docs/rules/no-template-curly-in-string
243
+ "no-template-curly-in-string": "error",
244
+
245
+ // Disallow loops with a body that allows only one iteration
246
+ // https://eslint.org/docs/rules/no-unreachable-loop
247
+ "no-unreachable-loop": [
248
+ "error",
249
+ {
250
+ ignore: [], // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
251
+ },
252
+ ],
253
+
254
+ // disallow use of optional chaining in contexts where the undefined value is not allowed
255
+ // https://eslint.org/docs/rules/no-unsafe-optional-chaining
256
+ "no-unsafe-optional-chaining": ["error", { disallowArithmeticOperators: true }],
257
+
258
+ // ensure that the results of typeof are compared against a valid string
259
+ // https://eslint.org/docs/rules/valid-typeof
260
+ "valid-typeof": ["error", { requireStringLiterals: true }],
261
+
262
+ // Disallow specified names in exports
263
+ // https://eslint.org/docs/rules/no-restricted-exports
264
+ "no-restricted-exports": [
265
+ "error",
266
+ {
267
+ restrictedNamedExports: [
268
+ "default", // use `export default` to provide a default export
269
+ "then", // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
270
+ ],
271
+ },
272
+ ],
273
+
274
+ // disallow useless computed property keys
275
+ // https://eslint.org/docs/rules/no-useless-computed-key
276
+ "no-useless-computed-key": "error",
277
+
278
+ // disallow unnecessary constructor
279
+ // https://eslint.org/docs/rules/no-useless-constructor
280
+ "no-useless-constructor": "error",
281
+
282
+ // disallow renaming import, export, and destructured assignments to the same name
283
+ // https://eslint.org/docs/rules/no-useless-rename
284
+ "no-useless-rename": [
285
+ "error",
286
+ {
287
+ ignoreDestructuring: false,
288
+ ignoreImport: false,
289
+ ignoreExport: false,
290
+ },
291
+ ],
292
+
293
+ // require let or const instead of var
294
+ "no-var": "error",
295
+
296
+ // require method and property shorthand syntax for object literals
297
+ // https://eslint.org/docs/rules/object-shorthand
298
+ "object-shorthand": [
299
+ "error",
300
+ "always",
301
+ {
302
+ ignoreConstructors: false,
303
+ avoidQuotes: true,
304
+ },
305
+ ],
306
+
307
+ // suggest using of const declaration for variables that are never modified after declared
308
+ "prefer-const": [
309
+ "error",
310
+ {
311
+ destructuring: "any",
312
+ ignoreReadBeforeAssign: true,
313
+ },
314
+ ],
315
+
316
+ // disallow parseInt() in favor of binary, octal, and hexadecimal literals
317
+ // https://eslint.org/docs/rules/prefer-numeric-literals
318
+ "prefer-numeric-literals": "error",
319
+
320
+ // use rest parameters instead of arguments
321
+ // https://eslint.org/docs/rules/prefer-rest-params
322
+ "prefer-rest-params": "error",
323
+
324
+ // suggest using the spread syntax instead of .apply()
325
+ // https://eslint.org/docs/rules/prefer-spread
326
+ "prefer-spread": "error",
327
+
328
+ // suggest using template literals instead of string concatenation
329
+ // https://eslint.org/docs/rules/prefer-template
330
+ "prefer-template": "error",
331
+
332
+ // require a Symbol description
333
+ // https://eslint.org/docs/rules/symbol-description
334
+ "symbol-description": "error",
335
+
336
+ // disallow specific globals
337
+ // https://eslint.org/docs/latest/rules/no-restricted-globals
338
+ "no-restricted-globals": [
339
+ "error",
340
+ {
341
+ name: "isFinite",
342
+ message: "Use Number.isFinite instead",
343
+ },
344
+ {
345
+ name: "isNaN",
346
+ message: "Use Number.isNaN instead",
347
+ },
348
+ ...confusingBrowserGlobals.map((g) => ({
349
+ name: g,
350
+ message: `Use window.${g} instead`,
351
+ })),
352
+ ],
353
+
354
+ // disallow declaration of variables already declared in the outer scope
355
+ // https://eslint.org/docs/latest/rules/no-shadow
356
+ "no-shadow": "error",
357
+
358
+ // disallow use of undefined when initializing variables
359
+ // https://eslint.org/docs/latest/rules/no-undef-init
360
+ "no-undef-init": "error",
361
+
362
+ // require camel case names
363
+ // https://eslint.org/docs/latest/rules/camelcase
364
+ camelcase: ["error", { properties: "never", ignoreDestructuring: false }],
365
+
366
+ // require function expressions to have a name
367
+ // https://eslint.org/docs/rules/func-names
368
+ "func-names": "warn",
369
+
370
+ // require a capital letter for constructors
371
+ // https://eslint.org/docs/rules/new-cap
372
+ "new-cap": [
373
+ "error",
374
+ {
375
+ newIsCap: true,
376
+ newIsCapExceptions: [],
377
+ capIsNew: false,
378
+ capIsNewExceptions: ["Immutable.Map", "Immutable.Set", "Immutable.List"],
379
+ },
380
+ ],
381
+
382
+ // disallow use of the Array constructor
383
+ "no-array-constructor": "error",
384
+
385
+ // disallow if as the only statement in an else block
386
+ // https://eslint.org/docs/rules/no-lonely-if
387
+ "no-lonely-if": "error",
388
+
389
+ // disallow use of chained assignment expressions
390
+ // https://eslint.org/docs/rules/no-multi-assign
391
+ "no-multi-assign": ["error"],
392
+
393
+ // disallow nested ternary expressions
394
+ "no-nested-ternary": "error",
395
+
396
+ // disallow certain syntax forms
397
+ // https://eslint.org/docs/rules/no-restricted-syntax
398
+ "no-restricted-syntax": [
399
+ "error",
400
+ // {
401
+ // selector: "ForInStatement",
402
+ // message:
403
+ // "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use for..of or Object.{keys,values,entries}, and iterate over the resulting array.",
404
+ // },
405
+ {
406
+ selector: "LabeledStatement",
407
+ message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
408
+ },
409
+ {
410
+ selector: "WithStatement",
411
+ message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
412
+ },
413
+ ],
414
+
415
+ // disallow the use of Boolean literals in conditional expressions
416
+ // also, prefer `a || b` over `a ? a : b`
417
+ // https://eslint.org/docs/rules/no-unneeded-ternary
418
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
419
+
420
+ // allow just one var statement per function
421
+ // https://eslint.org/docs/rules/one-var
422
+ "one-var": ["error", "never"],
423
+
424
+ // require assignment operator shorthand where possible or prohibit it entirely
425
+ // https://eslint.org/docs/rules/operator-assignment
426
+ "operator-assignment": ["error", "always"],
427
+
428
+ // Disallow the use of Math.pow in favor of the ** operator
429
+ // https://eslint.org/docs/rules/prefer-exponentiation-operator
430
+ "prefer-exponentiation-operator": "error",
431
+
432
+ // Prefer use of an object spread over Object.assign
433
+ // https://eslint.org/docs/rules/prefer-object-spread
434
+ "prefer-object-spread": "error",
435
+
436
+ // require or disallow the Unicode Byte Order Mark
437
+ // https://eslint.org/docs/rules/unicode-bom
438
+ "unicode-bom": ["error", "never"],
439
+ };
440
+
441
+ export default rules;