eslint-config-complete 3.2.4 → 4.0.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.
@@ -5,16 +5,16 @@ import { defineConfig } from "eslint/config";
5
5
  * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#helpful-warnings
6
6
  */
7
7
  const HELPFUL_WARNINGS = {
8
- "import-x/export": "warn",
8
+ "import-x/export": "error",
9
9
  /**
10
10
  * Superseded by the `deprecation/deprecation` rule. (That rule is better because it catches
11
11
  * deprecated usage that does not come from import statements specifically.)
12
12
  */
13
13
  "import-x/no-deprecated": "off",
14
- "import-x/no-empty-named-blocks": "warn",
14
+ "import-x/no-empty-named-blocks": "error",
15
15
  /** We add common patterns to the "devDependencies" array. */
16
16
  "import-x/no-extraneous-dependencies": [
17
- "warn",
17
+ "error",
18
18
  {
19
19
  devDependencies: [
20
20
  // From:
@@ -41,8 +41,8 @@ const HELPFUL_WARNINGS = {
41
41
  optionalDependencies: false,
42
42
  },
43
43
  ],
44
- "import-x/no-mutable-exports": "warn",
45
- "import-x/no-named-as-default": "warn",
44
+ "import-x/no-mutable-exports": "error",
45
+ "import-x/no-named-as-default": "error",
46
46
  /**
47
47
  * Disabled because this is [already handled by the TypeScript
48
48
  * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
@@ -64,9 +64,9 @@ const HELPFUL_WARNINGS = {
64
64
  * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#module-systems
65
65
  */
66
66
  const MODULE_SYSTEMS = {
67
- "import-x/no-amd": "warn",
68
- "import-x/no-commonjs": "warn",
69
- "import-x/no-import-module-exports": "warn",
67
+ "import-x/no-amd": "error",
68
+ "import-x/no-commonjs": "error",
69
+ "import-x/no-import-module-exports": "error",
70
70
  /** Disabled because it is only used in specific environments (like the browser). */
71
71
  "import-x/no-nodejs-modules": "off",
72
72
  /** Disabled because this is already handled by the TypeScript compiler. */
@@ -92,47 +92,47 @@ const STATIC_ANALYSIS = {
92
92
  * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
93
93
  */
94
94
  "import-x/namespace": "off",
95
- "import-x/no-absolute-path": "warn",
96
- "import-x/no-cycle": "warn",
97
- "import-x/no-dynamic-require": "warn",
95
+ "import-x/no-absolute-path": "error",
96
+ "import-x/no-cycle": "error",
97
+ "import-x/no-dynamic-require": "error",
98
98
  /** Disabled since a prescribed import pattern is not generalizable enough across projects. */
99
99
  "import-x/no-internal-modules": "off",
100
- "import-x/no-relative-packages": "warn",
100
+ "import-x/no-relative-packages": "error",
101
101
  /**
102
102
  * Disabled since a forward import direction pattern is not generalizable enough across projects.
103
103
  */
104
104
  "import-x/no-relative-parent-imports": "off",
105
105
  /** Disabled since this rule should only contain a project-specific path restriction. */
106
106
  "import-x/no-restricted-paths": "off",
107
- "import-x/no-self-import": "warn",
107
+ "import-x/no-self-import": "error",
108
108
  /**
109
109
  * Disabled because this is [already handled by the TypeScript
110
110
  * compiler](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js).
111
111
  */
112
112
  "import-x/no-unresolved": "off",
113
- "import-x/no-useless-path-segments": "warn",
114
- "import-x/no-webpack-loader-syntax": "warn",
113
+ "import-x/no-useless-path-segments": "error",
114
+ "import-x/no-webpack-loader-syntax": "error",
115
115
  };
116
116
  /**
117
117
  * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
118
118
  * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#style-guide
119
119
  */
120
120
  const STYLE_GUIDE = {
121
- "import-x/consistent-type-specifier-style": "warn",
121
+ "import-x/consistent-type-specifier-style": "error",
122
122
  /** Disabled because it is only useful in environments that use webpack. */
123
123
  "import-x/dynamic-import-chunkname": "off",
124
124
  /** Disabled because this style is not generally used. */
125
125
  "import-x/exports-last": "off",
126
126
  /** Disabled because this is already handled by the TypeScript compiler. */
127
127
  "import-x/extensions": "off",
128
- "import-x/first": "warn",
128
+ "import-x/first": "error",
129
129
  /** Disabled because this style is not generally used. */
130
130
  "import-x/group-exports": "off",
131
131
  /** Disabled because this rule is deprecated. */
132
132
  "import-x/imports-first": "off",
133
133
  /** Disabled since it will trigger false positives in codebases that prefer smaller files. */
134
134
  "import-x/max-dependencies": "off",
135
- "import-x/newline-after-import": "warn",
135
+ "import-x/newline-after-import": "error",
136
136
  /**
137
137
  * Disabled since we disallow default exports elsewhere in this config (in favor of named
138
138
  * exports).
@@ -142,9 +142,9 @@ const STYLE_GUIDE = {
142
142
  * The case against default exports is [laid out by Basarat Ali
143
143
  * Syed](https://basarat.gitbook.io/typescript/main-1/defaultisbad).
144
144
  */
145
- "import-x/no-default-export": "warn",
146
- "import-x/no-duplicates": "warn",
147
- "import-x/no-named-default": "warn",
145
+ "import-x/no-default-export": "error",
146
+ "import-x/no-duplicates": "error",
147
+ "import-x/no-named-default": "error",
148
148
  /**
149
149
  * Disabled since we disallow default exports elsewhere in this config (in favor of named
150
150
  * exports).
@@ -154,7 +154,7 @@ const STYLE_GUIDE = {
154
154
  * Disabled since it is too prescriptive for a general audience. (Using `import * as` is common.)
155
155
  */
156
156
  "import-x/no-namespace": "off",
157
- "import-x/no-unassigned-import": "warn",
157
+ "import-x/no-unassigned-import": "error",
158
158
  /** Disabled because this is automatically handled by `prettier-plugin-organize-imports`. */
159
159
  "import-x/order": "off",
160
160
  /**
@@ -162,7 +162,7 @@ const STYLE_GUIDE = {
162
162
  * exports).
163
163
  */
164
164
  "import-x/prefer-default-export": "off",
165
- "import-x/prefer-namespace-import": "warn",
165
+ "import-x/prefer-namespace-import": "error",
166
166
  };
167
167
  /**
168
168
  * Omit `.d.ts` because:
@@ -250,7 +250,7 @@ export const baseImportX = defineConfig({
250
250
  // "complete-lint". Similarly, importing "completeConfigBase" from "eslint-config-complete"
251
251
  // fails, because "eslint-config-complete" is a transitive dependency in "complete-lint".
252
252
  "import-x/no-extraneous-dependencies": [
253
- "warn",
253
+ "error",
254
254
  {
255
255
  devDependencies: [
256
256
  "**/eslint.config.{js,cjs,mjs,ts,cts,mts}",
@@ -25,13 +25,13 @@ export const baseJSDoc = defineConfig({
25
25
  * plugin authors.
26
26
  */
27
27
  "jsdoc/check-line-alignment": "off",
28
- "jsdoc/check-param-names": "warn",
28
+ "jsdoc/check-param-names": "error",
29
29
  /** Disabled because it is not needed in TypeScript. */
30
30
  "jsdoc/check-property-names": "off",
31
31
  /** Disabled because it is not needed in TypeScript. */
32
32
  "jsdoc/check-syntax": "off",
33
33
  "jsdoc/check-tag-names": [
34
- "warn",
34
+ "error",
35
35
  {
36
36
  definedTags: [
37
37
  // Ignore tags used by the TypeScript compiler:
@@ -59,21 +59,21 @@ export const baseJSDoc = defineConfig({
59
59
  ],
60
60
  },
61
61
  ],
62
- "jsdoc/check-template-names": "warn",
62
+ "jsdoc/check-template-names": "error",
63
63
  /** Disabled because it is not needed in TypeScript. */
64
64
  "jsdoc/check-types": "off",
65
- "jsdoc/check-values": "warn",
65
+ "jsdoc/check-values": "error",
66
66
  /**
67
67
  * Disabled since it is idiomatic in the TypeScript ecosystem to use a mixture of both JSDoc
68
68
  * and non-JSDoc comments.
69
69
  */
70
70
  "jsdoc/convert-to-jsdoc-comments": "off",
71
- "jsdoc/empty-tags": "warn",
72
- "jsdoc/escape-inline-tags": "warn",
73
- "jsdoc/implements-on-classes": "warn",
71
+ "jsdoc/empty-tags": "error",
72
+ "jsdoc/escape-inline-tags": "error",
73
+ "jsdoc/implements-on-classes": "error",
74
74
  /** Disabled since you cannot configure it with a path to the correct "package.json" file. */
75
75
  "jsdoc/imports-as-dependencies": "off",
76
- "jsdoc/informative-docs": "warn",
76
+ "jsdoc/informative-docs": "error",
77
77
  /**
78
78
  * Disabled since it is [currently
79
79
  * bugged](https://github.com/gajus/eslint-plugin-jsdoc/issues/1296).
@@ -106,7 +106,7 @@ export const baseJSDoc = defineConfig({
106
106
  "jsdoc/no-restricted-syntax": "off",
107
107
  /** The `contexts` option is set to `any` to make the rule stricter. */
108
108
  "jsdoc/no-types": [
109
- "warn",
109
+ "error",
110
110
  {
111
111
  contexts: ["any"],
112
112
  },
@@ -118,9 +118,9 @@ export const baseJSDoc = defineConfig({
118
118
  * files like "prettier.config.mjs".
119
119
  */
120
120
  "jsdoc/prefer-import-tag": "off",
121
- "jsdoc/reject-any-type": "warn",
122
- "jsdoc/reject-function-type": "warn",
123
- "jsdoc/require-asterisk-prefix": "warn",
121
+ "jsdoc/reject-any-type": "error",
122
+ "jsdoc/reject-function-type": "error",
123
+ "jsdoc/require-asterisk-prefix": "error",
124
124
  /** Disabled because it is overboard for every function to have a description. */
125
125
  "jsdoc/require-description": "off",
126
126
  /** Superseded by the `complete/jsdoc-complete-sentences` rule. */
@@ -133,23 +133,23 @@ export const baseJSDoc = defineConfig({
133
133
  * The `never` option is provided to make the rule match the format of the official TypeScript
134
134
  * codebase.
135
135
  */
136
- "jsdoc/require-hyphen-before-param-description": ["warn", "never"],
136
+ "jsdoc/require-hyphen-before-param-description": ["error", "never"],
137
137
  /** Disabled since it is overboard for every function to have a JSDoc comment. */
138
138
  "jsdoc/require-jsdoc": "off",
139
- "jsdoc/require-next-description": "warn",
140
- "jsdoc/require-next-type": "warn",
141
- "jsdoc/require-template-description": "warn",
142
- "jsdoc/require-throws-description": "warn",
139
+ "jsdoc/require-next-description": "error",
140
+ "jsdoc/require-next-type": "error",
141
+ "jsdoc/require-template-description": "error",
142
+ "jsdoc/require-throws-description": "error",
143
143
  /**
144
144
  * Disabled since in most cases, the type of a thrown error will simply be `Error`, making the
145
145
  * annotation superfluous.
146
146
  */
147
147
  "jsdoc/require-throws-type": "off",
148
- "jsdoc/require-yields-description": "warn",
149
- "jsdoc/require-yields-type": "warn",
148
+ "jsdoc/require-yields-description": "error",
149
+ "jsdoc/require-yields-type": "error",
150
150
  /** Configured to only apply when there are one or more parameters. */
151
151
  "jsdoc/require-param": [
152
- "warn",
152
+ "error",
153
153
  {
154
154
  contexts: [
155
155
  {
@@ -161,14 +161,14 @@ export const baseJSDoc = defineConfig({
161
161
  ],
162
162
  /** The `contexts` option is set to `any` to make the rule stricter. */
163
163
  "jsdoc/require-param-description": [
164
- "warn",
164
+ "error",
165
165
  {
166
166
  contexts: ["any"],
167
167
  },
168
168
  ],
169
169
  /** The `contexts` option is set to `any` to make the rule stricter. */
170
170
  "jsdoc/require-param-name": [
171
- "warn",
171
+ "error",
172
172
  {
173
173
  contexts: ["any"],
174
174
  },
@@ -177,8 +177,8 @@ export const baseJSDoc = defineConfig({
177
177
  "jsdoc/require-param-type": "off",
178
178
  /** Disabled because it is not needed in TypeScript. */
179
179
  "jsdoc/require-property": "off",
180
- "jsdoc/require-property-description": "warn",
181
- "jsdoc/require-property-name": "warn",
180
+ "jsdoc/require-property-description": "error",
181
+ "jsdoc/require-property-name": "error",
182
182
  /** Disabled because it is not needed in TypeScript. */
183
183
  "jsdoc/require-property-type": "off",
184
184
  /** Disabled because it is overboard for every function to document every return value. */
@@ -187,7 +187,7 @@ export const baseJSDoc = defineConfig({
187
187
  "jsdoc/require-returns-check": "off",
188
188
  /** The `contexts` option is set to `any` to make the rule stricter. */
189
189
  "jsdoc/require-returns-description": [
190
- "warn",
190
+ "error",
191
191
  {
192
192
  contexts: ["any"],
193
193
  },
@@ -204,7 +204,7 @@ export const baseJSDoc = defineConfig({
204
204
  "jsdoc/require-yields": "off",
205
205
  /** Disabled because it is overboard to document every yield. */
206
206
  "jsdoc/require-yields-check": "off",
207
- "jsdoc/sort-tags": "warn",
207
+ "jsdoc/sort-tags": "error",
208
208
  /** Superseded by the `complete/format-jsdoc-comments` rule. */
209
209
  "jsdoc/tag-lines": "off",
210
210
  /**
@@ -212,11 +212,11 @@ export const baseJSDoc = defineConfig({
212
212
  * JSDoc comments to Markdown).
213
213
  */
214
214
  "jsdoc/text-escaping": "off",
215
- "jsdoc/ts-method-signature-style": "warn",
216
- "jsdoc/ts-no-empty-object-type": "warn",
217
- "jsdoc/ts-no-unnecessary-template-expression": "warn",
218
- "jsdoc/ts-prefer-function-type": "warn",
219
- "jsdoc/type-formatting": "warn",
215
+ "jsdoc/ts-method-signature-style": "error",
216
+ "jsdoc/ts-no-empty-object-type": "error",
217
+ "jsdoc/ts-no-unnecessary-template-expression": "error",
218
+ "jsdoc/ts-prefer-function-type": "error",
219
+ "jsdoc/type-formatting": "error",
220
220
  /** Disabled because it is not needed in TypeScript. */
221
221
  "jsdoc/valid-types": "off",
222
222
  },
@@ -18,18 +18,18 @@ export const baseN = defineConfig({
18
18
  * This rule is helpful to automatically fix file extensions in import statements throughout an
19
19
  * entire codebase.
20
20
  */
21
- "n/file-extension-in-import": ["warn", "always"],
21
+ "n/file-extension-in-import": ["error", "always"],
22
22
  /** Disabled since stylistic rules from this plugin are not used. */
23
23
  "n/global-require": "off",
24
- "n/handle-callback-err": "warn",
24
+ "n/handle-callback-err": "error",
25
25
  /**
26
26
  * Disabled since it does not work very well with TypeScript. (It needs project-specific
27
27
  * configuration depending on where the output directory is located.)
28
28
  */
29
29
  "n/hashbang": "off", // cspell:disable-line
30
- "n/no-callback-literal": "warn",
31
- "n/no-deprecated-api": "warn",
32
- "n/no-exports-assign": "warn",
30
+ "n/no-callback-literal": "error",
31
+ "n/no-deprecated-api": "error",
32
+ "n/no-exports-assign": "error",
33
33
  /** Disabled since it is handled by the TypeScript compiler. */
34
34
  "n/no-extraneous-import": "off",
35
35
  /** Disabled since require statements are not used in TypeScript code. */
@@ -42,8 +42,8 @@ export const baseN = defineConfig({
42
42
  "n/no-missing-require": "off",
43
43
  /** Disabled since stylistic rules from this plugin are not used. */
44
44
  "n/no-mixed-requires": "off",
45
- "n/no-new-require": "warn",
46
- "n/no-path-concat": "warn",
45
+ "n/no-new-require": "error",
46
+ "n/no-path-concat": "error",
47
47
  /** Disabled since stylistic rules from this plugin are not used. */
48
48
  "n/no-process-env": "off",
49
49
  /**
@@ -62,7 +62,7 @@ export const baseN = defineConfig({
62
62
  * worry about interop with `require`.
63
63
  */
64
64
  "n/no-top-level-await": "off",
65
- "n/no-unpublished-bin": "warn",
65
+ "n/no-unpublished-bin": "error",
66
66
  /** Superseded by the `import-x/no-extraneous-dependencies` rule. */
67
67
  "n/no-unpublished-import": "off",
68
68
  /** Disabled since it is assumed that source code will be written in ESM. */
@@ -96,7 +96,7 @@ export const baseN = defineConfig({
96
96
  "n/prefer-promises/dns": "off",
97
97
  /** Disabled since stylistic rules from this plugin are not used. */
98
98
  "n/prefer-promises/fs": "off",
99
- "n/process-exit-as-throw": "warn",
99
+ "n/process-exit-as-throw": "error",
100
100
  /** Superseded by the `n/hashbang` rule. */
101
101
  "n/shebang": "off",
102
102
  },
@@ -11,7 +11,7 @@ export const baseStylistic = defineConfig({
11
11
  rules: {
12
12
  /** This rule is not handled by Prettier, so we must use ESLint to enforce it. */
13
13
  "@stylistic/lines-between-class-members": [
14
- "warn",
14
+ "error",
15
15
  "always",
16
16
  {
17
17
  exceptAfterSingleLine: true,
@@ -23,7 +23,7 @@ export const baseStylistic = defineConfig({
23
23
  * documentation](https://github.com/prettier/eslint-config-prettier#enforce-backticks).
24
24
  */
25
25
  "@stylistic/quotes": [
26
- "warn",
26
+ "error",
27
27
  "double",
28
28
  {
29
29
  avoidEscape: true,
@@ -37,7 +37,7 @@ export const baseStylistic = defineConfig({
37
37
  * The `markers` option is provided to make this rule ignore lines that start with "///".
38
38
  */
39
39
  "@stylistic/spaced-comment": [
40
- "warn",
40
+ "error",
41
41
  "always",
42
42
  {
43
43
  markers: ["/"],
@@ -1 +1 @@
1
- {"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oEAmiBE"}
1
+ {"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oEAoiBE"}