eslint-config-complete 1.2.2 → 1.2.4

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.
Files changed (39) hide show
  1. package/dist/base/base-eslint.d.ts +12 -0
  2. package/dist/base/base-eslint.d.ts.map +1 -0
  3. package/dist/base/base-eslint.js +670 -0
  4. package/dist/base/base-import-x.d.ts +12 -0
  5. package/dist/base/base-import-x.d.ts.map +1 -0
  6. package/dist/base/base-import-x.js +262 -0
  7. package/dist/base/base-jsdoc.d.ts +6 -0
  8. package/dist/base/base-jsdoc.d.ts.map +1 -0
  9. package/dist/base/base-jsdoc.js +212 -0
  10. package/dist/base/base-n.d.ts +7 -0
  11. package/dist/base/base-n.d.ts.map +1 -0
  12. package/dist/base/base-n.js +108 -0
  13. package/dist/base/base-stylistic.d.ts +6 -0
  14. package/dist/base/base-stylistic.d.ts.map +1 -0
  15. package/dist/base/base-stylistic.js +35 -0
  16. package/dist/base/base-typescript-eslint.d.ts +6 -0
  17. package/dist/base/base-typescript-eslint.d.ts.map +1 -0
  18. package/dist/base/base-typescript-eslint.js +479 -0
  19. package/dist/base/base-unicorn.d.ts +10 -0
  20. package/dist/base/base-unicorn.d.ts.map +1 -0
  21. package/dist/base/base-unicorn.js +203 -0
  22. package/dist/base.d.ts +8 -0
  23. package/dist/base.d.ts.map +1 -0
  24. package/{src → dist}/base.js +17 -30
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/monorepo.d.ts +6 -0
  28. package/dist/monorepo.d.ts.map +1 -0
  29. package/dist/monorepo.js +16 -0
  30. package/package.json +5 -3
  31. package/src/base/base-eslint.js +0 -850
  32. package/src/base/base-import-x.js +0 -312
  33. package/src/base/base-jsdoc.js +0 -276
  34. package/src/base/base-n.js +0 -150
  35. package/src/base/base-stylistic.js +0 -38
  36. package/src/base/base-typescript-eslint.js +0 -554
  37. package/src/base/base-unicorn.js +0 -246
  38. package/src/monorepo.js +0 -18
  39. /package/{src → dist}/index.js +0 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This ESLint config only contains rules from `eslint-plugin-import-x`:
3
+ * https://github.com/un-ts/eslint-plugin-import-x
4
+ *
5
+ * Rules are separated into categories:
6
+ * 1) Helpful warnings
7
+ * 2) Module systems
8
+ * 3) Static analysis
9
+ * 4) Style guide
10
+ */
11
+ export const baseImportX: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
12
+ //# sourceMappingURL=base-import-x.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../src/base/base-import-x.js"],"names":[],"mappings":"AAuOA;;;;;;;;;GASG;AACH,8FAsEE"}
@@ -0,0 +1,262 @@
1
+ import ESLintPluginImportX from "eslint-plugin-import-x";
2
+ import tseslint from "typescript-eslint";
3
+ /**
4
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#helpful-warnings
5
+ * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
6
+ */
7
+ const HELPFUL_WARNINGS = {
8
+ "import-x/export": "warn",
9
+ /**
10
+ * Superseded by the `deprecation/deprecation` rule. (That rule is better because it catches
11
+ * deprecated usage that does not come from import statements specifically.)
12
+ */
13
+ "import-x/no-deprecated": "off",
14
+ "import-x/no-empty-named-blocks": "warn",
15
+ /** We add common patterns to the "devDependencies" array. */
16
+ "import-x/no-extraneous-dependencies": [
17
+ "warn",
18
+ {
19
+ devDependencies: [
20
+ // From:
21
+ // https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js
22
+ "test/**", // tape, common npm pattern
23
+ "tests/**", // also common npm pattern
24
+ "spec/**", // mocha, rspec-like pattern
25
+ "**/__tests__/**", // jest pattern
26
+ "**/__mocks__/**", // jest pattern
27
+ "test.{js,jsx}", // repos with a single test file
28
+ "test-*.{js,jsx}", // repos with multiple top-level test files
29
+ "**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
30
+ "**/jest.config.{js,cjs,mjs,ts,cts,mts}", // jest config // Modified for extra file extensions.
31
+ "**/jest.setup.{js,cjs,mjs,ts,cts,mts}", // jest setup // Modified for extra file extensions.
32
+ "**/vue.config.js", // vue-cli config
33
+ "**/webpack.config.js", // webpack config
34
+ "**/webpack.config.*.js", // webpack config
35
+ "**/rollup.config.js", // rollup config
36
+ "**/rollup.config.*.js", // rollup config
37
+ "**/gulpfile.js", // gulp config
38
+ "**/gulpfile.*.js", // gulp config
39
+ "**/Gruntfile{,.js}", // grunt config
40
+ "**/protractor.conf.js", // protractor config
41
+ "**/protractor.conf.*.js", // protractor config
42
+ "**/karma.conf.js", // karma config
43
+ "**/.eslintrc.{js,cjs,mjs,ts,cts,mts}", // eslint config // Modified for extra file extensions.
44
+ "**/scripts/*.{js,cjs,mjs,ts,cts,mts}", // Files inside of a "scripts" directory.
45
+ "**/tests/*.{js,cjs,mjs,ts,cts,mts}", // Files inside of a "tests" directory.
46
+ "**/eslint.config.{js,cjs,mjs,ts,cts,mts}", // ESLint config
47
+ "**/prettier.config.{js,cjs,mjs,ts,cts,mts}", // Prettier config
48
+ "**/typedoc.config.{js,cjs,mjs,ts,cts,mts}", // TypeDoc config
49
+ "**/typedoc.config.*.{js,cjs,mjs,ts,cts,mts}", // TypeDoc config
50
+ ],
51
+ optionalDependencies: false,
52
+ },
53
+ ],
54
+ "import-x/no-mutable-exports": "warn",
55
+ "import-x/no-named-as-default": "warn",
56
+ /**
57
+ * Disabled because this is [already handled by the TypeScript
58
+ * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
59
+ */
60
+ "import-x/no-named-as-default-member": "off",
61
+ /**
62
+ * Temporarily disabled due to [false
63
+ * positives](https://github.com/un-ts/eslint-plugin-import-x/pull/157).
64
+ */
65
+ "import-x/no-rename-default": "off",
66
+ /**
67
+ * Disabled since this check is better performed by the [`knip`](https://github.com/webpro/knip)
68
+ * tool.
69
+ */
70
+ "import-x/no-unused-modules": "off",
71
+ };
72
+ /**
73
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#module-systems
74
+ * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
75
+ */
76
+ const MODULE_SYSTEMS = {
77
+ "import-x/no-amd": "warn",
78
+ "import-x/no-commonjs": "warn",
79
+ "import-x/no-import-module-exports": "warn",
80
+ /** Disabled because it is only used in specific environments (like the browser). */
81
+ "import-x/no-nodejs-modules": "off",
82
+ /** Disabled because this is already handled by the TypeScript compiler. */
83
+ "import-x/unambiguous": "off",
84
+ };
85
+ /**
86
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#static-analysis
87
+ * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
88
+ */
89
+ const STATIC_ANALYSIS = {
90
+ /**
91
+ * Disabled because this is [already handled by the TypeScript
92
+ * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
93
+ */
94
+ "import-x/default": "off",
95
+ /**
96
+ * Disabled because this is [already handled by the TypeScript
97
+ * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
98
+ */
99
+ "import-x/named": "off",
100
+ /**
101
+ * Disabled because this is [already handled by the TypeScript
102
+ * compiler](https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import).
103
+ */
104
+ "import-x/namespace": "off",
105
+ "import-x/no-absolute-path": "warn",
106
+ "import-x/no-cycle": "warn",
107
+ "import-x/no-dynamic-require": "warn",
108
+ /** Disabled since a prescribed import pattern is not generalizable enough across projects. */
109
+ "import-x/no-internal-modules": "off",
110
+ "import-x/no-relative-packages": "warn",
111
+ /**
112
+ * Disabled since a forward import direction pattern is not generalizable enough across projects.
113
+ */
114
+ "import-x/no-relative-parent-imports": "off",
115
+ /** Disabled since this rule should only contain a project-specific path restriction. */
116
+ "import-x/no-restricted-paths": "off",
117
+ "import-x/no-self-import": "warn",
118
+ /**
119
+ * Disabled because this is [already handled by the TypeScript
120
+ * compiler](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js).
121
+ */
122
+ "import-x/no-unresolved": "off",
123
+ "import-x/no-useless-path-segments": "warn",
124
+ "import-x/no-webpack-loader-syntax": "warn",
125
+ };
126
+ /**
127
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#style-guide
128
+ * @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
129
+ */
130
+ const STYLE_GUIDE = {
131
+ "import-x/consistent-type-specifier-style": "warn",
132
+ /** Disabled because it is only useful in environments that use webpack. */
133
+ "import-x/dynamic-import-chunkname": "off",
134
+ /** Disabled because this style is not generally used. */
135
+ "import-x/exports-last": "off",
136
+ /** Disabled because this is already handled by the TypeScript compiler. */
137
+ "import-x/extensions": "off",
138
+ "import-x/first": "warn",
139
+ /** Disabled because this style is not generally used. */
140
+ "import-x/group-exports": "off",
141
+ /** Disabled because this rule is deprecated. */
142
+ "import-x/imports-first": "off",
143
+ /** Disabled since it will trigger false positives in codebases that prefer smaller files. */
144
+ "import-x/max-dependencies": "off",
145
+ "import-x/newline-after-import": "warn",
146
+ /**
147
+ * Disabled since we disallow default exports elsewhere in this config (in favor of named
148
+ * exports).
149
+ */
150
+ "import-x/no-anonymous-default-export": "off",
151
+ /**
152
+ * The case against default exports is [laid out by Basarat Ali
153
+ * Syed](https://basarat.gitbook.io/typescript/main-1/defaultisbad).
154
+ */
155
+ "import-x/no-default-export": "warn",
156
+ "import-x/no-duplicates": "warn",
157
+ "import-x/no-named-default": "warn",
158
+ /**
159
+ * Disabled since we disallow default exports elsewhere in this config (in favor of named
160
+ * exports).
161
+ */
162
+ "import-x/no-named-export": "off",
163
+ /**
164
+ * Disabled since it is too prescriptive for a general audience. (Using `import * as` is common.)
165
+ */
166
+ "import-x/no-namespace": "off",
167
+ "import-x/no-unassigned-import": "warn",
168
+ /** Disabled because this is automatically handled by `prettier-plugin-organize-imports`. */
169
+ "import-x/order": "off",
170
+ /**
171
+ * Disabled because we disallow default exports elsewhere in this config (in favor of named
172
+ * exports).
173
+ */
174
+ "import-x/prefer-default-export": "off",
175
+ };
176
+ /**
177
+ * Omit `.d.ts` because:
178
+ * 1. TypeScript compilation already confirms that types are resolved.
179
+ * 2. It would mask an unresolved `.ts`/`.tsx`/`.js`/`.jsx` implementation.
180
+ */
181
+ const TYPESCRIPT_EXTENSIONS = [".ts", ".cts", ".mts", ".tsx"];
182
+ const ALL_EXTENSIONS = [
183
+ ...TYPESCRIPT_EXTENSIONS,
184
+ ".js",
185
+ ".cjs",
186
+ ".mjs",
187
+ ".jsx",
188
+ ];
189
+ /**
190
+ * This ESLint config only contains rules from `eslint-plugin-import-x`:
191
+ * https://github.com/un-ts/eslint-plugin-import-x
192
+ *
193
+ * Rules are separated into categories:
194
+ * 1) Helpful warnings
195
+ * 2) Module systems
196
+ * 3) Static analysis
197
+ * 4) Style guide
198
+ */
199
+ export const baseImportX = tseslint.config({
200
+ plugins: {
201
+ "import-x": ESLintPluginImportX,
202
+ },
203
+ // Beyond just specifying the plugin, additional configuration is necessary to make the plugin
204
+ // work properly with TypeScript:
205
+ // - First, the "eslint-import-resolver-typescript" package needs to be installed, or else an
206
+ // error will appear: "Resolve error: typescript with invalid interface loaded as resolver"
207
+ // - However, it is discussed in this issue to include that dep as part of
208
+ // "eslint-plugin-import-x" itself:
209
+ // https://github.com/un-ts/eslint-plugin-import-x/issues/150
210
+ // - Second, we extend the upstream TypeScript configuration:
211
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/src/config/typescript.ts
212
+ settings: {
213
+ "import-x/extensions": ALL_EXTENSIONS,
214
+ "import-x/external-module-folders": [
215
+ "node_modules",
216
+ "node_modules/@types",
217
+ ],
218
+ "import-x/parsers": {
219
+ "@typescript-eslint/parser": TYPESCRIPT_EXTENSIONS,
220
+ },
221
+ "import-x/resolver": {
222
+ typescript: true,
223
+ },
224
+ },
225
+ rules: {
226
+ ...HELPFUL_WARNINGS,
227
+ ...MODULE_SYSTEMS,
228
+ ...STATIC_ANALYSIS,
229
+ ...STYLE_GUIDE,
230
+ },
231
+ },
232
+ // Disable some TypeScript-specific rules in JavaScript files.
233
+ {
234
+ files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.jsx"],
235
+ rules: {
236
+ "import-x/no-commonjs": "off",
237
+ },
238
+ },
239
+ // Some configuration files must export a default object as a design limitation.
240
+ {
241
+ files: [
242
+ ".remarkrc.js",
243
+ ".remarkrc.mjs",
244
+ "eslint.config.js",
245
+ "eslint.config.mjs",
246
+ "jest.config.js",
247
+ "jest.config.mjs",
248
+ "knip.js",
249
+ "knip.ts",
250
+ "knip.config.js",
251
+ "knip.config.ts",
252
+ "prettier.config.js",
253
+ "prettier.config.mjs",
254
+ "typedoc.config.js",
255
+ "typedoc.config.mjs",
256
+ "vite.config.js",
257
+ "vite.config.mjs",
258
+ ],
259
+ rules: {
260
+ "import-x/no-default-export": "off",
261
+ },
262
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This ESLint config only contains rules from `eslint-plugin-jsdoc`:
3
+ * https://github.com/gajus/eslint-plugin-jsdoc
4
+ */
5
+ export const baseJSDoc: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
6
+ //# sourceMappingURL=base-jsdoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-jsdoc.d.ts","sourceRoot":"","sources":["../../src/base/base-jsdoc.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,4FA4QE"}
@@ -0,0 +1,212 @@
1
+ import ESLintPluginJSDoc from "eslint-plugin-jsdoc";
2
+ import tseslint from "typescript-eslint";
3
+ /**
4
+ * This ESLint config only contains rules from `eslint-plugin-jsdoc`:
5
+ * https://github.com/gajus/eslint-plugin-jsdoc
6
+ */
7
+ export const baseJSDoc = tseslint.config({
8
+ plugins: {
9
+ jsdoc: ESLintPluginJSDoc,
10
+ },
11
+ rules: {
12
+ /** Disabled because it is not needed in TypeScript. */
13
+ "jsdoc/check-access": "off",
14
+ /** Superseded by the `complete/limit-jsdoc-comments` rule. */
15
+ "jsdoc/check-alignment": "off",
16
+ /**
17
+ * Disabled since it [does not work with ESLint
18
+ * 8](https://github.com/eslint/eslint/issues/14745).
19
+ */
20
+ "jsdoc/check-examples": "off",
21
+ /** Superseded by the `complete/limit-jsdoc-comments` rule. */
22
+ "jsdoc/check-indentation": "off",
23
+ /**
24
+ * Disabled since this is not a common formatting scheme. It is also not recommended by the
25
+ * plugin authors.
26
+ */
27
+ "jsdoc/check-line-alignment": "off",
28
+ "jsdoc/check-param-names": "warn",
29
+ /** Disabled because it is not needed in TypeScript. */
30
+ "jsdoc/check-property-names": "off",
31
+ /** Disabled because it is not needed in TypeScript. */
32
+ "jsdoc/check-syntax": "off",
33
+ "jsdoc/check-tag-names": [
34
+ "warn",
35
+ {
36
+ definedTags: [
37
+ // Ignore tags used by the TypeScript compiler:
38
+ // https://www.typescriptlang.org/tsconfig#stripInternal
39
+ "internal", // Used by TypeScript
40
+ // Ignore tags used in TypeDoc:
41
+ // https://typedoc.org/guides/doccomments/
42
+ "category",
43
+ "hidden",
44
+ "notExported", // From: typedoc-plugin-not-exported
45
+ "rename", // From: typedoc-plugin-rename
46
+ // Ignore tags used in TypeScriptToLua:
47
+ // https://typescripttolua.github.io/docs/advanced/compiler-annotations
48
+ "customName",
49
+ "noResolution",
50
+ "noSelf",
51
+ "noSelfInFile",
52
+ // Ignore tags used in `ts-json-schema-generator`:
53
+ // https://github.com/vega/ts-json-schema-generator
54
+ "minimum",
55
+ "maximum",
56
+ // Ignore tags used in `eslint-plugin-complete`:
57
+ // https://github.com/complete-ts/complete/blob/main/packages/eslint-plugin-complete/docs/rules/require-variadic-function-argument.md
58
+ "allowEmptyVariadic",
59
+ ],
60
+ },
61
+ ],
62
+ "jsdoc/check-template-names": "warn",
63
+ /** Disabled because it is not needed in TypeScript. */
64
+ "jsdoc/check-types": "off",
65
+ "jsdoc/check-values": "warn",
66
+ /**
67
+ * Disabled since it is idiomatic in the TypeScript ecosystem to use a mixture of both JSDoc
68
+ * and non-JSDoc comments.
69
+ */
70
+ "jsdoc/convert-to-jsdoc-comments": "off",
71
+ "jsdoc/empty-tags": "warn",
72
+ "jsdoc/implements-on-classes": "warn",
73
+ /** Disabled since you cannot configure it with a path to the correct "package.json" file. */
74
+ "jsdoc/imports-as-dependencies": "off",
75
+ "jsdoc/informative-docs": "warn",
76
+ /**
77
+ * Disabled since it is [currently
78
+ * bugged](https://github.com/gajus/eslint-plugin-jsdoc/issues/1296).
79
+ */
80
+ "jsdoc/lines-before-block": "off",
81
+ /** Superseded by the `complete/jsdoc-full-sentences` rule. */
82
+ "jsdoc/match-description": "off",
83
+ /** Disabled because it is only needed for projects with specific JSDoc requirements. */
84
+ "jsdoc/match-name": "off",
85
+ /** Superseded by the `complete/limit-jsdoc-comments` rule. */
86
+ "jsdoc/multiline-blocks": "off",
87
+ /** Superseded by the `complete/limit-jsdoc-comments` rule. */
88
+ "jsdoc/newline-after-description": "off",
89
+ /**
90
+ * Disabled because it provides little value; it only detects JSDoc comments with tags in
91
+ * them.
92
+ */
93
+ "jsdoc/no-bad-blocks": "off",
94
+ /** Superseded by the `complete/format-jsdoc-comments` rule. */
95
+ "jsdoc/no-blank-block-descriptions": "off",
96
+ /** Superseded by the `complete/no-empty-jsdoc` rule. */
97
+ "jsdoc/no-blank-blocks": "off",
98
+ /** Disabled because it provides little value; the `@default` tag is rare. */
99
+ "jsdoc/no-defaults": "off",
100
+ /** Disabled because it is too project-specific. */
101
+ "jsdoc/no-missing-syntax": "off",
102
+ /** Superseded by the `complete/limit-jsdoc-comments` rule. */
103
+ "jsdoc/no-multi-asterisks": "off",
104
+ /**
105
+ * Disabled because it is intended for disabling of specific language features per-project.
106
+ */
107
+ "jsdoc/no-restricted-syntax": "off",
108
+ /** The `contexts` option is set to `any` to make the rule stricter. */
109
+ "jsdoc/no-types": [
110
+ "warn",
111
+ {
112
+ contexts: ["any"],
113
+ },
114
+ ],
115
+ /** Disabled because it is not needed in TypeScript. */
116
+ "jsdoc/no-undefined-types": "off",
117
+ "jsdoc/require-asterisk-prefix": "warn",
118
+ /** Superseded by the `complete/jsdoc-complete-sentences` rule. */
119
+ "jsdoc/require-description-complete-sentence": "off",
120
+ /** Disabled because it is overboard for every function to have a description. */
121
+ "jsdoc/require-description": "off",
122
+ /** Disabled because it is overboard for every function to require an example. */
123
+ "jsdoc/require-example": "off",
124
+ /** Disabled because it is overboard for every file to require an overview. */
125
+ "jsdoc/require-file-overview": "off",
126
+ /**
127
+ * The `never` option is provided to make the rule match the format of the official TypeScript
128
+ * codebase.
129
+ */
130
+ "jsdoc/require-hyphen-before-param-description": ["warn", "never"],
131
+ /** Disabled since it is overboard for every function to have a JSDoc comment. */
132
+ "jsdoc/require-jsdoc": "off",
133
+ /** The `contexts` option is set to `any` to make the rule stricter. */
134
+ "jsdoc/require-param-description": [
135
+ "warn",
136
+ {
137
+ contexts: ["any"],
138
+ },
139
+ ],
140
+ /** The `contexts` option is set to `any` to make the rule stricter. */
141
+ "jsdoc/require-param-name": [
142
+ "warn",
143
+ {
144
+ contexts: ["any"],
145
+ },
146
+ ],
147
+ /** Disabled because it is not needed in TypeScript. */
148
+ "jsdoc/require-param-type": "off",
149
+ /** Configured to only apply when there are one or more parameters. */
150
+ "jsdoc/require-param": [
151
+ "warn",
152
+ {
153
+ contexts: [
154
+ {
155
+ context: "FunctionDeclaration",
156
+ comment: 'JsdocBlock:has(JsdocTag[tag="param"])',
157
+ },
158
+ ],
159
+ },
160
+ ],
161
+ /** Disabled because it is not needed in TypeScript. */
162
+ "jsdoc/require-property": "off",
163
+ "jsdoc/require-property-description": "warn",
164
+ "jsdoc/require-property-name": "warn",
165
+ /** Disabled because it is not needed in TypeScript. */
166
+ "jsdoc/require-property-type": "off",
167
+ /** Disabled because it is overboard for every function to document every return value. */
168
+ "jsdoc/require-returns-check": "off",
169
+ /** The `contexts` option is set to `any` to make the rule stricter. */
170
+ "jsdoc/require-returns-description": [
171
+ "warn",
172
+ {
173
+ contexts: ["any"],
174
+ },
175
+ ],
176
+ /** Disabled because it is not needed in TypeScript. */
177
+ "jsdoc/require-returns-type": "off",
178
+ /** Disabled because it is overboard for every function to document every return value. */
179
+ "jsdoc/require-returns": "off",
180
+ /** Disabled because it is overboard to document every generic type variable. */
181
+ "jsdoc/require-template": "off",
182
+ /** Disabled because it is overboard to document every throw statement. */
183
+ "jsdoc/require-throws": "off",
184
+ /** Disabled because it is overboard to document every yield. */
185
+ "jsdoc/require-yields": "off",
186
+ /** Disabled because it is overboard to document every yield. */
187
+ "jsdoc/require-yields-check": "off",
188
+ /**
189
+ * Disabled because it is not very useful. In most cases, a function will only have `@param`
190
+ * and `@return` tags, making sorting unnecessary.
191
+ */
192
+ "jsdoc/sort-tags": "off",
193
+ /** Superseded by the `complete/format-jsdoc-comments` rule. */
194
+ "jsdoc/tag-lines": "off",
195
+ /**
196
+ * Disabled since it is only useful in certain environments (e.g. when your project converts
197
+ * JSDoc comments to Markdown).
198
+ */
199
+ "jsdoc/text-escaping": "off",
200
+ /** Disabled because it is not needed in TypeScript. */
201
+ "jsdoc/valid-types": "off",
202
+ },
203
+ },
204
+ // Disable some TypeScript-specific rules in JavaScript files.
205
+ {
206
+ files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.jsx"],
207
+ rules: {
208
+ "jsdoc/no-types": "off",
209
+ "jsdoc/require-param-description": "off",
210
+ "jsdoc/require-returns-description": "off",
211
+ },
212
+ });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This ESLint config only contains rules from `eslint-plugin-n`:
3
+ * https://github.com/eslint-community/eslint-plugin-n
4
+ * (This is a forked version of `eslint-plugin-node`.)
5
+ */
6
+ export const baseN: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
7
+ //# sourceMappingURL=base-n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-n.d.ts","sourceRoot":"","sources":["../../src/base/base-n.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wFA6IE"}
@@ -0,0 +1,108 @@
1
+ import ESLintPluginN from "eslint-plugin-n";
2
+ import tseslint from "typescript-eslint";
3
+ /**
4
+ * This ESLint config only contains rules from `eslint-plugin-n`:
5
+ * https://github.com/eslint-community/eslint-plugin-n
6
+ * (This is a forked version of `eslint-plugin-node`.)
7
+ */
8
+ export const baseN = tseslint.config({
9
+ plugins: {
10
+ n: ESLintPluginN,
11
+ },
12
+ rules: {
13
+ /** Disabled since stylistic rules from this plugin are not used. */
14
+ "n/callback-return": "off",
15
+ /**
16
+ * This rule is helpful to automatically fix file extensions in import statements throughout
17
+ * an entire codebase.
18
+ */
19
+ "n/file-extension-in-import": ["warn", "always"],
20
+ /** Disabled since stylistic rules from this plugin are not used. */
21
+ "n/exports-style": "off",
22
+ /** Disabled since stylistic rules from this plugin are not used. */
23
+ "n/global-require": "off",
24
+ "n/handle-callback-err": "warn",
25
+ /**
26
+ * Disabled since it does not work very well with TypeScript. (It needs project-specific
27
+ * configuration depending on where the output directory is located.)
28
+ */
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",
33
+ /** Disabled since it is handled by the TypeScript compiler. */
34
+ "n/no-extraneous-import": "off",
35
+ /** Disabled since require statements are not used in TypeScript code. */
36
+ "n/no-extraneous-require": "off",
37
+ /** Disabled because this rule is deprecated. */
38
+ "n/no-hide-core-modules": "off",
39
+ /** Disabled since it is handled by the TypeScript compiler. */
40
+ "n/no-missing-import": "off",
41
+ "n/no-missing-require": "warn",
42
+ /** Disabled since stylistic rules from this plugin are not used. */
43
+ "n/no-mixed-requires": "off",
44
+ "n/no-new-require": "warn",
45
+ "n/no-path-concat": "warn",
46
+ /** Disabled since stylistic rules from this plugin are not used. */
47
+ "n/no-process-env": "off",
48
+ /**
49
+ * Disabled because using `process.exit` is common to exit command-line applications without
50
+ * verbose output.
51
+ */
52
+ "n/no-process-exit": "off",
53
+ /** Disabled since stylistic rules from this plugin are not used. */
54
+ "n/no-restricted-import": "off",
55
+ /** Disabled since stylistic rules from this plugin are not used. */
56
+ "n/no-restricted-require": "off",
57
+ /** Disabled since stylistic rules from this plugin are not used. */
58
+ "n/no-sync": "off",
59
+ "n/no-unpublished-bin": "warn",
60
+ /**
61
+ * An exception is made for files in a "scripts" directory, since those should be allowed to
62
+ * import from "devDependencies".
63
+ */
64
+ "n/no-unpublished-import": "warn",
65
+ "n/no-unpublished-require": "warn",
66
+ /** Disabled because this rule is deprecated. */
67
+ "n/no-unsupported-features": "off",
68
+ /** Disabled because it is assumed that we are running on modern versions of Node.js. */
69
+ "n/no-unsupported-features/es-builtins": "off",
70
+ /**
71
+ * Disabled because it is assumed that our transpiler or runtime has support for the latest
72
+ * version of ESM.
73
+ */
74
+ "n/no-unsupported-features/es-syntax": "off",
75
+ /** Disabled since it is handled by the TypeScript compiler. */
76
+ "n/no-unsupported-features/node-builtins": "off",
77
+ /** Disabled since stylistic rules from this plugin are not used. */
78
+ "n/prefer-global/buffer": "off",
79
+ /** Disabled since stylistic rules from this plugin are not used. */
80
+ "n/prefer-global/console": "off",
81
+ /** Disabled since stylistic rules from this plugin are not used. */
82
+ "n/prefer-global/process": "off",
83
+ /** Disabled since stylistic rules from this plugin are not used. */
84
+ "n/prefer-global/text-decoder": "off",
85
+ /** Disabled since stylistic rules from this plugin are not used. */
86
+ "n/prefer-global/text-encoder": "off",
87
+ /** Disabled since stylistic rules from this plugin are not used. */
88
+ "n/prefer-global/url": "off",
89
+ /** Disabled since stylistic rules from this plugin are not used. */
90
+ "n/prefer-global/url-search-params": "off",
91
+ /** Superseded by the `unicorn/prefer-node-protocol` rule. */
92
+ "n/prefer-node-protocol": "off",
93
+ /** Disabled since stylistic rules from this plugin are not used. */
94
+ "n/prefer-promises/dns": "off",
95
+ /** Disabled since stylistic rules from this plugin are not used. */
96
+ "n/prefer-promises/fs": "off",
97
+ "n/process-exit-as-throw": "warn",
98
+ /** Superseded by the `n/hashbang` rule. */
99
+ "n/shebang": "off",
100
+ },
101
+ },
102
+ // Imports in a "scripts" directory can use "devDependencies".
103
+ {
104
+ files: ["**/scripts/*.{js,cjs,mjs,ts,cts,mts}"],
105
+ rules: {
106
+ "n/no-unpublished-import": "off",
107
+ },
108
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This ESLint config only contains rules from `@stylistic/eslint-plugin`:
3
+ * https://eslint.style/
4
+ */
5
+ export const baseStylistic: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
6
+ //# sourceMappingURL=base-stylistic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-stylistic.d.ts","sourceRoot":"","sources":["../../src/base/base-stylistic.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,gGA8BG"}