@aryaemami59/eslint-config 0.0.7 → 0.0.8

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/dist/index.cjs CHANGED
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
4
  //#region \0rolldown/runtime.js
3
5
  var __create = Object.create;
@@ -36,13 +38,6 @@ let eslint_config = require("eslint/config");
36
38
  let typescript_eslint = require("typescript-eslint");
37
39
 
38
40
  //#region src/disabledRules.ts
39
- /**
40
- * An object comprised of ESLint rules to disable.
41
- * These rules are disabled in {@linkcode flatESLintConfig}.
42
- *
43
- * @since 0.0.3
44
- * @public
45
- */
46
41
  const disabledRules = {
47
42
  "@typescript-eslint/ban-ts-comment": [0, {
48
43
  minimumDescriptionLength: 3,
@@ -51,7 +46,6 @@ const disabledRules = {
51
46
  "ts-ignore": true,
52
47
  "ts-nocheck": true
53
48
  }],
54
- "@typescript-eslint/consistent-generic-constructors": [0],
55
49
  "@typescript-eslint/no-unused-vars": [0, {
56
50
  args: "after-used",
57
51
  argsIgnorePattern: "^_",
@@ -69,7 +63,7 @@ const disabledRules = {
69
63
 
70
64
  //#endregion
71
65
  //#region src/external.ts
72
- const { browser, node, nodeBuiltin, vitest } = globals.default;
66
+ const { browser: browserGlobals, node: nodeGlobals, nodeBuiltin: nodeBuiltinGlobals, vitest: vitestTestGlobals } = globals.default;
73
67
 
74
68
  //#endregion
75
69
  //#region package.json
@@ -77,14 +71,6 @@ var name = "@aryaemami59/eslint-config";
77
71
 
78
72
  //#endregion
79
73
  //#region src/globalIgnores.ts
80
- /**
81
- * An object representing
82
- * {@link https://eslint.org/docs/latest/use/configure/ignore#ignoring-files | **global ignore patterns**}
83
- * for ESLint configuration.
84
- *
85
- * @since 0.0.3
86
- * @public
87
- */
88
74
  const globalIgnores = {
89
75
  ignores: [
90
76
  "**/__snapshots__/",
@@ -109,17 +95,11 @@ const globalIgnores = {
109
95
 
110
96
  //#endregion
111
97
  //#region src/globals.ts
112
- /**
113
- * An object representing the
114
- * {@link https://vitest.dev/config/#globals | globals} provided by
115
- * {@link https://vitest.dev | **Vitest**} for use in testing.
116
- *
117
- * @since 0.0.3
118
- * @public
119
- */
120
98
  const vitestGlobals = {
121
99
  afterAll: "writable",
122
100
  afterEach: "writable",
101
+ aroundAll: "writable",
102
+ aroundEach: "writable",
123
103
  assert: "writable",
124
104
  assertType: "writable",
125
105
  beforeAll: "writable",
@@ -136,75 +116,29 @@ const vitestGlobals = {
136
116
  vi: "writable",
137
117
  vitest: "writable"
138
118
  };
139
- /**
140
- * An object that specifies which global
141
- * variables are available during linting.
142
- *
143
- * @since 0.0.3
144
- * @public
145
- */
146
- const globals$1 = /* @__PURE__ */ Object.assign({
147
- ...browser,
148
- ...node,
149
- ...nodeBuiltin
119
+ const sharedEnvironmentGlobals = /* @__PURE__ */ Object.assign({
120
+ ...browserGlobals,
121
+ ...nodeGlobals,
122
+ ...nodeBuiltinGlobals
150
123
  }, {
151
- ...vitest,
124
+ ...vitestTestGlobals,
152
125
  ...vitestGlobals
153
126
  });
154
127
 
155
128
  //#endregion
156
129
  //#region src/shareableConfigs.ts
157
- /**
158
- * Flat ESLint configuration tailored for projects using TypeScript.
159
- *
160
- * @example
161
- * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>
162
- *
163
- * ```ts
164
- * import { flatESLintConfig } from '@aryaemami59/eslint-config'
165
- *
166
- * export default flatESLintConfig
167
- * ```
168
- *
169
- * @example
170
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>
171
- *
172
- * ```ts
173
- * const { flatESLintConfig } = require('@aryaemami59/eslint-config')
174
- *
175
- * module.exports = flatESLintConfig
176
- * ```
177
- *
178
- * @example
179
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cjs` or `eslint.config.cts` (using dynamic import)__</caption>
180
- *
181
- * ```ts
182
- * module.exports = (async () =>
183
- * (await import('@aryaemami59/eslint-config')).flatESLintConfig)()
184
- * ```
185
- *
186
- * @example
187
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>
188
- *
189
- * ```ts
190
- * import eslintConfigModule = require('@aryaemami59/eslint-config')
191
- * import flatESLintConfig = eslintConfigModule.flatESLintConfig
192
- *
193
- * export = flatESLintConfig
194
- * ```
195
- *
196
- * @since 0.0.3
197
- * @public
198
- */
199
130
  const flatESLintConfig = [
200
131
  globalIgnores,
201
132
  {
202
133
  name: `${_eslint_js.default.meta.name}/recommended`,
203
134
  ..._eslint_js.default.configs.recommended
204
135
  },
136
+ ...typescript_eslint.configs.recommended,
137
+ ...typescript_eslint.configs.stylistic,
205
138
  {
206
139
  languageOptions: {
207
- globals: globals$1,
140
+ globals: sharedEnvironmentGlobals,
141
+ parser: typescript_eslint.parser,
208
142
  parserOptions: {
209
143
  ecmaVersion: "latest",
210
144
  projectService: true
@@ -215,7 +149,86 @@ const flatESLintConfig = [
215
149
  reportUnusedInlineConfigs: 2
216
150
  },
217
151
  name: `${name}/defaults/overrides`,
152
+ plugins: { "@typescript-eslint": typescript_eslint.plugin },
218
153
  rules: {
154
+ "@typescript-eslint/consistent-type-definitions": [2, "type"],
155
+ "@typescript-eslint/consistent-type-exports": [2, { fixMixedExportsWithInlineTypeSpecifier: false }],
156
+ "@typescript-eslint/consistent-type-imports": [2, {
157
+ disallowTypeAnnotations: true,
158
+ fixStyle: "separate-type-imports",
159
+ prefer: "type-imports"
160
+ }],
161
+ "@typescript-eslint/no-confusing-void-expression": [2, {
162
+ ignoreArrowShorthand: false,
163
+ ignoreVoidOperator: false,
164
+ ignoreVoidReturningFunctions: false
165
+ }],
166
+ "@typescript-eslint/no-duplicate-type-constituents": [2, {
167
+ ignoreIntersections: false,
168
+ ignoreUnions: false
169
+ }],
170
+ "@typescript-eslint/no-empty-object-type": [2, {
171
+ allowInterfaces: "never",
172
+ allowObjectTypes: "never"
173
+ }],
174
+ "@typescript-eslint/no-explicit-any": [2, {
175
+ fixToUnknown: false,
176
+ ignoreRestArgs: false
177
+ }],
178
+ "@typescript-eslint/no-inferrable-types": [2, {
179
+ ignoreParameters: false,
180
+ ignoreProperties: false
181
+ }],
182
+ "@typescript-eslint/no-invalid-void-type": [2, {
183
+ allowAsThisParameter: false,
184
+ allowInGenericTypeArguments: true
185
+ }],
186
+ "@typescript-eslint/no-namespace": [2, {
187
+ allowDeclarations: false,
188
+ allowDefinitionFiles: true
189
+ }],
190
+ "@typescript-eslint/no-redundant-type-constituents": [2],
191
+ "@typescript-eslint/no-require-imports": [2, {
192
+ allow: [],
193
+ allowAsImport: true
194
+ }],
195
+ "@typescript-eslint/no-restricted-types": [2, { types: { "{}": {
196
+ message: `
197
+ - If you want to represent an empty object, use \`type EmptyObject = Record<string, never>\`.
198
+ - If you want to represent an object literal, use either \`type AnyObject = Record<string, any>\` or \`object\`.
199
+ - If you want to represent any non-nullish value, use \`type AnyNonNullishValue = NonNullable<unknown>\`.`,
200
+ suggest: [
201
+ "AnyNonNullishValue",
202
+ "EmptyObject",
203
+ "AnyObject",
204
+ "object",
205
+ "Record<string, never>",
206
+ "Record<string, any>",
207
+ "NonNullable<unknown>"
208
+ ]
209
+ } } }],
210
+ "@typescript-eslint/no-unnecessary-type-arguments": [2],
211
+ "@typescript-eslint/no-unnecessary-type-assertion": [2, { typesToIgnore: [] }],
212
+ "@typescript-eslint/no-unnecessary-type-parameters": [2],
213
+ "@typescript-eslint/prefer-nullish-coalescing": [2, {
214
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
215
+ ignoreBooleanCoercion: false,
216
+ ignoreConditionalTests: true,
217
+ ignoreIfStatements: false,
218
+ ignoreMixedLogicalExpressions: false,
219
+ ignorePrimitives: {
220
+ bigint: false,
221
+ boolean: false,
222
+ number: false,
223
+ string: false
224
+ },
225
+ ignoreTernaryTests: false
226
+ }],
227
+ "@typescript-eslint/require-await": [2],
228
+ "@typescript-eslint/unified-signatures": [2, {
229
+ ignoreDifferentlyNamedParameters: false,
230
+ ignoreOverloadsWithDifferentJSDoc: false
231
+ }],
219
232
  "object-shorthand": [
220
233
  2,
221
234
  "always",
@@ -255,129 +268,20 @@ const flatESLintConfig = [
255
268
 
256
269
  //#endregion
257
270
  //#region src/utils.ts
258
- /**
259
- * A function that returns {@linkcode flatESLintConfig}
260
- * along with optional additional overrides.
261
- * It's made mainly to provide intellisense and eliminate
262
- * the need for manual type annotations using JSDoc comments.
263
- *
264
- * @param [additionalOverrides=[]] - **Optional** additional overrides to apply to the configuration.
265
- * @returns An augmented version of the default {@linkcode flatESLintConfig}, incorporating any provided overrides.
266
- *
267
- * @example
268
- * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>
269
- *
270
- * ```ts
271
- * import { createESLintConfig } from '@aryaemami59/eslint-config'
272
- *
273
- * export default createESLintConfig([
274
- * {
275
- * rules: {
276
- * 'no-console': [0],
277
- * },
278
- * },
279
- * {
280
- * // ...Other additional overrides
281
- * },
282
- * ])
283
- * ```
284
- *
285
- * @example
286
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>
287
- *
288
- * ```ts
289
- * const { createESLintConfig } = require('@aryaemami59/eslint-config')
290
- *
291
- * module.exports = createESLintConfig([
292
- * {
293
- * rules: {
294
- * 'no-console': [0],
295
- * },
296
- * },
297
- * {
298
- * // ...Other additional overrides
299
- * },
300
- * ])
301
- * ```
302
- *
303
- * @example
304
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using dynamic import)__</caption>
305
- *
306
- * ```ts
307
- * module.exports = (async () =>
308
- * (await import('@aryaemami59/eslint-config')).createESLintConfig([
309
- * {
310
- * rules: {
311
- * 'no-console': [0],
312
- * },
313
- * },
314
- * {
315
- * // ...Other additional overrides
316
- * },
317
- * ]))()
318
- * ```
319
- *
320
- * @example
321
- * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>
322
- *
323
- * ```ts
324
- * import eslintConfigModule = require('@aryaemami59/eslint-config')
325
- * import createESLintConfig = eslintConfigModule.createESLintConfig
326
- *
327
- * export = createESLintConfig([
328
- * {
329
- * rules: {
330
- * 'no-console': [0],
331
- * },
332
- * },
333
- * {
334
- * // ...Other additional overrides
335
- * },
336
- * ])
337
- * ```
338
- *
339
- * @since 0.0.3
340
- * @public
341
- */
342
271
  const createESLintConfig = (additionalOverrides = []) => /* @__PURE__ */ (0, eslint_config.defineConfig)(...flatESLintConfig, ...additionalOverrides);
343
272
 
344
273
  //#endregion
345
- Object.defineProperty(exports, 'config', {
346
- enumerable: true,
347
- get: function () {
348
- return typescript_eslint.config;
349
- }
350
- });
351
- Object.defineProperty(exports, 'configs', {
352
- enumerable: true,
353
- get: function () {
354
- return typescript_eslint.configs;
355
- }
356
- });
357
274
  exports.createESLintConfig = createESLintConfig;
358
- Object.defineProperty(exports, 'defineConfig', {
359
- enumerable: true,
360
- get: function () {
361
- return eslint_config.defineConfig;
362
- }
363
- });
275
+ exports.defineConfig = eslint_config.defineConfig;
364
276
  exports.disabledRules = disabledRules;
365
277
  exports.flatESLintConfig = flatESLintConfig;
366
278
  exports.globalIgnores = globalIgnores;
367
- exports.globals = globals$1;
368
279
  exports.js = _eslint_js.default;
369
- Object.defineProperty(exports, 'parser', {
370
- enumerable: true,
371
- get: function () {
372
- return typescript_eslint.parser;
373
- }
374
- });
375
- Object.defineProperty(exports, 'plugin', {
376
- enumerable: true,
377
- get: function () {
378
- return typescript_eslint.plugin;
379
- }
380
- });
381
280
  exports.prettierConfig = eslint_config_prettier_flat.default;
281
+ exports.sharedEnvironmentGlobals = sharedEnvironmentGlobals;
282
+ exports.tseslintConfig = typescript_eslint.config;
283
+ exports.tseslintConfigs = typescript_eslint.configs;
284
+ exports.tseslintParser = typescript_eslint.parser;
285
+ exports.tseslintPlugin = typescript_eslint.plugin;
382
286
  exports.vitestGlobals = vitestGlobals;
383
287
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["globalIdentifiers","packageJson.name","globals","js","packageJson.name","prettierConfig"],"sources":["../src/disabledRules.ts","../src/external.ts","../package.json","../src/globalIgnores.ts","../src/globals.ts","../src/shareableConfigs.ts","../src/utils.ts"],"sourcesContent":["import type { Linter } from './external.js'\n\n/**\n * An object comprised of ESLint rules to disable.\n * These rules are disabled in {@linkcode flatESLintConfig}.\n *\n * @since 0.0.3\n * @public\n */\nexport const disabledRules = {\n '@typescript-eslint/ban-ts-comment': [\n 0,\n {\n minimumDescriptionLength: 3,\n 'ts-check': false,\n 'ts-expect-error': 'allow-with-description',\n 'ts-ignore': true,\n 'ts-nocheck': true,\n },\n ],\n\n // TODO: Remove this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n '@typescript-eslint/consistent-generic-constructors': [0],\n\n '@typescript-eslint/no-unused-vars': [\n 0,\n {\n args: 'after-used',\n // Not included in default options\n argsIgnorePattern: '^_',\n caughtErrors: 'all',\n // Not included in default options\n caughtErrorsIgnorePattern: '^_',\n // Not included in default options\n destructuredArrayIgnorePattern: '^_',\n ignoreClassWithStaticInitBlock: false,\n ignoreRestSiblings: false,\n reportUsedIgnorePattern: false,\n vars: 'all',\n // Not included in default options\n varsIgnorePattern: '^_',\n },\n ],\n 'no-undef': [\n 0,\n {\n typeof: false,\n },\n ],\n} as const satisfies Linter.RulesRecord satisfies Record<\n keyof Linter.RulesRecord,\n [\n ruleSeverity: Extract<Linter.Severity, 0>,\n ...ruleOptions: readonly unknown[],\n ]\n>\n","import js from '@eslint/js'\nimport prettierConfig from 'eslint-config-prettier/flat'\nimport globalIdentifiers from 'globals'\nexport type { Linter } from 'eslint'\nexport { defineConfig } from 'eslint/config'\nexport type { Config } from 'eslint/config'\nexport { config, configs, parser, plugin } from 'typescript-eslint'\nexport type {\n ConfigArray,\n ConfigWithExtends,\n FlatConfig,\n InfiniteDepthConfigWithExtends,\n Config as TSESlintConfig,\n} from 'typescript-eslint'\nexport { js, prettierConfig }\nexport const { browser, node, nodeBuiltin, vitest } = globalIdentifiers\n","","import packageJson from '../package.json' with { type: 'json' }\nimport type { Config } from './external.js'\n\n/**\n * An object representing\n * {@link https://eslint.org/docs/latest/use/configure/ignore#ignoring-files | **global ignore patterns**}\n * for ESLint configuration.\n *\n * @since 0.0.3\n * @public\n */\nexport const globalIgnores = {\n ignores: [\n '**/__snapshots__/',\n '**/.docusaurus/',\n '**/.expo/',\n '**/.next/',\n '**/.playwright/',\n '**/.temp/',\n '**/.tmp/',\n '**/.turbo/',\n '**/.wrangler/',\n '**/.yalc/',\n '**/.yarn/',\n '**/*.snap',\n '**/build/',\n '**/coverage/',\n '**/dist/',\n '**/temp/',\n ],\n name: `${packageJson.name}/global-ignores`,\n} as const satisfies Config\n","import type { Linter } from './external.js'\nimport { browser, node, nodeBuiltin, vitest } from './external.js'\n\n/**\n * An object representing the\n * {@link https://vitest.dev/config/#globals | globals} provided by\n * {@link https://vitest.dev | **Vitest**} for use in testing.\n *\n * @since 0.0.3\n * @public\n */\nexport const vitestGlobals = {\n afterAll: 'writable',\n afterEach: 'writable',\n assert: 'writable',\n assertType: 'writable',\n beforeAll: 'writable',\n beforeEach: 'writable',\n chai: 'writable',\n describe: 'writable',\n expect: 'writable',\n expectTypeOf: 'writable',\n it: 'writable',\n onTestFailed: 'writable',\n onTestFinished: 'writable',\n suite: 'writable',\n test: 'writable',\n vi: 'writable',\n vitest: 'writable',\n} as const satisfies Linter.Globals satisfies Record<\n keyof typeof vitest,\n Extract<Linter.GlobalConf, 'writable'>\n>\n\n/**\n * An object that specifies which global\n * variables are available during linting.\n *\n * @since 0.0.3\n * @public\n */\nexport const globals =\n /* @__PURE__ */\n Object.assign(\n {\n ...browser,\n ...node,\n ...nodeBuiltin,\n } as const satisfies Linter.Globals,\n\n {\n ...vitest,\n ...vitestGlobals,\n } as const satisfies Linter.Globals,\n ) satisfies Linter.Globals\n","import packageJson from '../package.json' with { type: 'json' }\nimport { disabledRules } from './disabledRules.js'\nimport type { Config, FlatConfig, Linter } from './external.js'\nimport { js, prettierConfig } from './external.js'\nimport { globalIgnores } from './globalIgnores.js'\nimport { globals } from './globals.js'\n\n/**\n * Flat ESLint configuration tailored for projects using TypeScript.\n *\n * @example\n * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>\n *\n * ```ts\n * import { flatESLintConfig } from '@aryaemami59/eslint-config'\n *\n * export default flatESLintConfig\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>\n *\n * ```ts\n * const { flatESLintConfig } = require('@aryaemami59/eslint-config')\n *\n * module.exports = flatESLintConfig\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cjs` or `eslint.config.cts` (using dynamic import)__</caption>\n *\n * ```ts\n * module.exports = (async () =>\n * (await import('@aryaemami59/eslint-config')).flatESLintConfig)()\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>\n *\n * ```ts\n * import eslintConfigModule = require('@aryaemami59/eslint-config')\n * import flatESLintConfig = eslintConfigModule.flatESLintConfig\n *\n * export = flatESLintConfig\n * ```\n *\n * @since 0.0.3\n * @public\n */\nexport const flatESLintConfig = [\n // `ignores` must be first.\n // config with just `ignores` is the replacement for `.eslintignore`\n globalIgnores,\n\n {\n name: `${js.meta.name}/recommended`,\n ...js.configs.recommended,\n } as const satisfies FlatConfig.Config satisfies Config,\n\n // TODO: You can remove the type assertion in the next major version of `typescript-eslint`.\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n // ...(configs.recommended satisfies Config[] as Config<any>[]),\n // TODO: You can remove the type assertion in the next major version of `typescript-eslint`.\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n // ...(configs.stylistic satisfies Config[] as Config<any>[]),\n\n {\n languageOptions: {\n globals,\n parserOptions: {\n ecmaVersion: 'latest',\n projectService: true,\n } as const satisfies FlatConfig.ParserOptions satisfies Linter.ParserOptions,\n },\n linterOptions: {\n reportUnusedDisableDirectives: 2,\n reportUnusedInlineConfigs: 2,\n },\n name: `${packageJson.name}/defaults/overrides`,\n\n rules: {\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n // '@typescript-eslint/consistent-type-definitions': [2, 'type'],\n // '@typescript-eslint/consistent-type-exports': [\n // 2,\n // { fixMixedExportsWithInlineTypeSpecifier: false },\n // ],\n // '@typescript-eslint/consistent-type-imports': [\n // 2,\n // {\n // disallowTypeAnnotations: true,\n // fixStyle: 'separate-type-imports',\n // prefer: 'type-imports',\n // },\n // ],\n // '@typescript-eslint/no-confusing-void-expression': [\n // 2,\n // {\n // ignoreArrowShorthand: false,\n // ignoreVoidOperator: false,\n // ignoreVoidReturningFunctions: false,\n // },\n // ],\n // '@typescript-eslint/no-duplicate-type-constituents': [\n // 2,\n // {\n // ignoreIntersections: false,\n // ignoreUnions: false,\n // },\n // ],\n // '@typescript-eslint/no-empty-object-type': [\n // 2,\n // {\n // allowInterfaces: 'never',\n // allowObjectTypes: 'never',\n // },\n // ],\n // '@typescript-eslint/no-explicit-any': [\n // 2,\n // {\n // fixToUnknown: false,\n // ignoreRestArgs: false,\n // },\n // ],\n // '@typescript-eslint/no-inferrable-types': [\n // 2,\n // {\n // ignoreParameters: false,\n // ignoreProperties: false,\n // },\n // ],\n // '@typescript-eslint/no-invalid-void-type': [\n // 2,\n // {\n // allowAsThisParameter: false,\n // allowInGenericTypeArguments: true,\n // },\n // ],\n // '@typescript-eslint/no-namespace': [\n // 2,\n // {\n // allowDeclarations: false,\n // allowDefinitionFiles: true,\n // },\n // ],\n // '@typescript-eslint/no-redundant-type-constituents': [2],\n // '@typescript-eslint/no-require-imports': [\n // 2,\n // {\n // allow: [],\n // allowAsImport: true,\n // },\n // ],\n // '@typescript-eslint/no-restricted-types': [\n // 2,\n // {\n // types: {\n // '{}': {\n // message: `\n // - If you want to represent an empty object, use \\`type EmptyObject = Record<string, never>\\`.\n // - If you want to represent an object literal, use either \\`type AnyObject = Record<string, any>\\` or \\`object\\`.\n // - If you want to represent any non-nullish value, use \\`type AnyNonNullishValue = NonNullable<unknown>\\`.`,\n // suggest: [\n // 'AnyNonNullishValue',\n // 'EmptyObject',\n // 'AnyObject',\n // 'object',\n // 'Record<string, never>',\n // 'Record<string, any>',\n // 'NonNullable<unknown>',\n // ],\n // },\n // },\n // },\n // ],\n // '@typescript-eslint/no-unnecessary-type-arguments': [2],\n // '@typescript-eslint/no-unnecessary-type-assertion': [\n // 2,\n // { typesToIgnore: [] },\n // ],\n // '@typescript-eslint/no-unnecessary-type-parameters': [2],\n // '@typescript-eslint/prefer-nullish-coalescing': [\n // 2,\n // {\n // allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,\n // ignoreBooleanCoercion: false,\n // ignoreConditionalTests: true,\n // ignoreIfStatements: false,\n // ignoreMixedLogicalExpressions: false,\n // ignorePrimitives: {\n // bigint: false,\n // boolean: false,\n // number: false,\n // string: false,\n // },\n // ignoreTernaryTests: false,\n // },\n // ],\n // '@typescript-eslint/require-await': [2],\n // '@typescript-eslint/unified-signatures': [\n // 2,\n // {\n // ignoreDifferentlyNamedParameters: false,\n // ignoreOverloadsWithDifferentJSDoc: false,\n // },\n // ],\n 'object-shorthand': [\n 2,\n 'always',\n {\n avoidExplicitReturnArrows: true,\n avoidQuotes: true,\n ignoreConstructors: true,\n methodsIgnorePattern: '',\n },\n ],\n 'sort-imports': [\n 2,\n {\n allowSeparatedGroups: true,\n ignoreCase: false,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n\n ...disabledRules,\n },\n } as const satisfies Config,\n\n {\n files: ['**/*.cjs'],\n languageOptions: {\n sourceType: 'commonjs',\n } as const satisfies FlatConfig.LanguageOptions satisfies Linter.LanguageOptions,\n name: `${packageJson.name}/commonjs-files`,\n rules: {\n '@typescript-eslint/no-require-imports': [\n 0,\n {\n allow: [],\n allowAsImport: false,\n },\n ],\n },\n } as const satisfies Config,\n\n prettierConfig,\n] as const satisfies Config[]\n","import type { Config } from './external.js'\nimport { defineConfig } from './external.js'\nimport { flatESLintConfig } from './shareableConfigs.js'\n\n/**\n * A function that returns {@linkcode flatESLintConfig}\n * along with optional additional overrides.\n * It's made mainly to provide intellisense and eliminate\n * the need for manual type annotations using JSDoc comments.\n *\n * @param [additionalOverrides=[]] - **Optional** additional overrides to apply to the configuration.\n * @returns An augmented version of the default {@linkcode flatESLintConfig}, incorporating any provided overrides.\n *\n * @example\n * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>\n *\n * ```ts\n * import { createESLintConfig } from '@aryaemami59/eslint-config'\n *\n * export default createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>\n *\n * ```ts\n * const { createESLintConfig } = require('@aryaemami59/eslint-config')\n *\n * module.exports = createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using dynamic import)__</caption>\n *\n * ```ts\n * module.exports = (async () =>\n * (await import('@aryaemami59/eslint-config')).createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ]))()\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>\n *\n * ```ts\n * import eslintConfigModule = require('@aryaemami59/eslint-config')\n * import createESLintConfig = eslintConfigModule.createESLintConfig\n *\n * export = createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @since 0.0.3\n * @public\n */\nexport const createESLintConfig = (\n additionalOverrides: Parameters<typeof defineConfig> = [],\n): Config[] =>\n /* @__PURE__ */ defineConfig(...flatESLintConfig, ...additionalOverrides)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,gBAAgB;CAC3B,qCAAqC,CACnC,GACA;EACE,0BAA0B;EAC1B,YAAY;EACZ,mBAAmB;EACnB,aAAa;EACb,cAAc;EACf,CACF;CAGD,sDAAsD,CAAC,EAAE;CAEzD,qCAAqC,CACnC,GACA;EACE,MAAM;EAEN,mBAAmB;EACnB,cAAc;EAEd,2BAA2B;EAE3B,gCAAgC;EAChC,gCAAgC;EAChC,oBAAoB;EACpB,yBAAyB;EACzB,MAAM;EAEN,mBAAmB;EACpB,CACF;CACD,YAAY,CACV,GACA,EACE,QAAQ,OACT,CACF;CACF;;;;AClCD,MAAa,EAAE,SAAS,MAAM,aAAa,WAAWA;;;;;;;;;;;;;;;;AEJtD,MAAa,gBAAgB;CAC3B,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,MAAM,GAAGC,KAAiB;CAC3B;;;;;;;;;;;;ACpBD,MAAa,gBAAgB;CAC3B,UAAU;CACV,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,UAAU;CACV,QAAQ;CACR,cAAc;CACd,IAAI;CACJ,cAAc;CACd,gBAAgB;CAChB,OAAO;CACP,MAAM;CACN,IAAI;CACJ,QAAQ;CACT;;;;;;;;AAYD,MAAaC,YAEX,uBAAO,OACL;CACE,GAAG;CACH,GAAG;CACH,GAAG;CACJ,EAED;CACE,GAAG;CACH,GAAG;CACJ,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLH,MAAa,mBAAmB;CAG9B;CAEA;EACE,MAAM,GAAGC,mBAAG,KAAK,KAAK;EACtB,GAAGA,mBAAG,QAAQ;EACf;CASD;EACE,iBAAiB;GACf;GACA,eAAe;IACb,aAAa;IACb,gBAAgB;IACjB;GACF;EACD,eAAe;GACb,+BAA+B;GAC/B,2BAA2B;GAC5B;EACD,MAAM,GAAGC,KAAiB;EAE1B,OAAO;GA8HL,oBAAoB;IAClB;IACA;IACA;KACE,2BAA2B;KAC3B,aAAa;KACb,oBAAoB;KACpB,sBAAsB;KACvB;IACF;GACD,gBAAgB,CACd,GACA;IACE,sBAAsB;IACtB,YAAY;IACZ,uBAAuB;IACvB,kBAAkB;IAClB,uBAAuB;KAAC;KAAQ;KAAO;KAAY;KAAS;IAC7D,CACF;GAED,GAAG;GACJ;EACF;CAED;EACE,OAAO,CAAC,WAAW;EACnB,iBAAiB,EACf,YAAY,YACb;EACD,MAAM,GAAGA,KAAiB;EAC1B,OAAO,EACL,yCAAyC,CACvC,GACA;GACE,OAAO,EAAE;GACT,eAAe;GAChB,CACF,EACF;EACF;CAEDC;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjKD,MAAa,sBACX,sBAAuD,EAAE,KAEzC,gDAAa,GAAG,kBAAkB,GAAG,oBAAoB"}
1
+ {"version":3,"file":"index.cjs","names":["packageJson.name","js","tseslintConfigs","tseslintParser","packageJson.name","tseslintPlugin","prettierConfig"],"sources":["../src/disabledRules.ts","../src/external.ts","../package.json","../src/globalIgnores.ts","../src/globals.ts","../src/shareableConfigs.ts","../src/utils.ts"],"sourcesContent":["import type { Linter } from './external.js'\n\n/**\n * An object comprised of ESLint rules to disable.\n * These rules are disabled in {@linkcode flatESLintConfig}.\n *\n * @since 0.0.3\n * @public\n */\nexport const disabledRules = {\n '@typescript-eslint/ban-ts-comment': [\n 0,\n {\n minimumDescriptionLength: 3,\n 'ts-check': false,\n 'ts-expect-error': 'allow-with-description',\n 'ts-ignore': true,\n 'ts-nocheck': true,\n },\n ],\n\n // TODO: Remove this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n // '@typescript-eslint/consistent-generic-constructors': [0],\n\n '@typescript-eslint/no-unused-vars': [\n 0,\n {\n args: 'after-used',\n // Not included in default options\n argsIgnorePattern: '^_',\n caughtErrors: 'all',\n // Not included in default options\n caughtErrorsIgnorePattern: '^_',\n // Not included in default options\n destructuredArrayIgnorePattern: '^_',\n ignoreClassWithStaticInitBlock: false,\n ignoreRestSiblings: false,\n reportUsedIgnorePattern: false,\n vars: 'all',\n // Not included in default options\n varsIgnorePattern: '^_',\n },\n ],\n 'no-undef': [\n 0,\n {\n typeof: false,\n },\n ],\n} as const satisfies Linter.RulesRecord satisfies Record<\n keyof Linter.RulesRecord,\n [\n ruleSeverity: Extract<Linter.Severity, 0>,\n ...ruleOptions: readonly unknown[],\n ]\n>\n","import js from '@eslint/js'\nimport prettierConfig from 'eslint-config-prettier/flat'\nimport globals from 'globals'\nexport type { ESLint, Linter } from 'eslint'\nexport { defineConfig } from 'eslint/config'\nexport type { Config } from 'eslint/config'\nexport {\n config as tseslintConfig,\n configs as tseslintConfigs,\n parser as tseslintParser,\n plugin as tseslintPlugin,\n} from 'typescript-eslint'\nexport type {\n Config as TSESLintConfig,\n ConfigArray as TSESLintConfigArray,\n ConfigWithExtends as TSESLintConfigWithExtends,\n FlatConfig as TSESLintFlatConfig,\n InfiniteDepthConfigWithExtends as TSESLintInfiniteDepthConfigWithExtends,\n} from 'typescript-eslint'\nexport { js, prettierConfig }\nexport const {\n browser: browserGlobals,\n node: nodeGlobals,\n nodeBuiltin: nodeBuiltinGlobals,\n vitest: vitestTestGlobals,\n} = globals\nexport type GlobalsBrowser = typeof browserGlobals\nexport type GlobalsNode = typeof nodeGlobals\nexport type GlobalsNodeBuiltin = typeof nodeBuiltinGlobals\nexport type GlobalsVitest = typeof vitestTestGlobals\n","","import packageJson from '@aryaemami59/eslint-config/package.json' with { type: 'json' }\nimport type { Config } from './external.js'\n\n/**\n * An object representing\n * {@link https://eslint.org/docs/latest/use/configure/ignore#ignoring-files | **global ignore patterns**}\n * for ESLint configuration.\n *\n * @since 0.0.3\n * @public\n */\nexport const globalIgnores = {\n ignores: [\n '**/__snapshots__/',\n '**/.docusaurus/',\n '**/.expo/',\n '**/.next/',\n '**/.playwright/',\n '**/.temp/',\n '**/.tmp/',\n '**/.turbo/',\n '**/.wrangler/',\n '**/.yalc/',\n '**/.yarn/',\n '**/*.snap',\n '**/build/',\n '**/coverage/',\n '**/dist/',\n '**/temp/',\n ],\n name: `${packageJson.name}/global-ignores`,\n} as const satisfies Config\n","import type { GlobalsVitest, Linter } from './external.js'\nimport {\n browserGlobals,\n nodeBuiltinGlobals,\n nodeGlobals,\n vitestTestGlobals,\n} from './external.js'\n\n/**\n * An object representing the\n * {@link https://vitest.dev/config/#globals | globals} provided by\n * {@link https://vitest.dev | **Vitest**} for use in testing.\n *\n * @since 0.0.3\n * @public\n */\nexport const vitestGlobals = {\n afterAll: 'writable',\n afterEach: 'writable',\n aroundAll: 'writable',\n aroundEach: 'writable',\n assert: 'writable',\n assertType: 'writable',\n beforeAll: 'writable',\n beforeEach: 'writable',\n chai: 'writable',\n describe: 'writable',\n expect: 'writable',\n expectTypeOf: 'writable',\n it: 'writable',\n onTestFailed: 'writable',\n onTestFinished: 'writable',\n suite: 'writable',\n test: 'writable',\n vi: 'writable',\n vitest: 'writable',\n} as const satisfies Linter.Globals satisfies Record<\n 'aroundAll' | 'aroundEach' | keyof GlobalsVitest,\n Extract<Linter.GlobalConf, 'writable'>\n>\n\n/**\n * An object that specifies which global\n * variables are available during linting.\n *\n * @since 0.0.3\n * @public\n */\nexport const sharedEnvironmentGlobals =\n /* @__PURE__ */\n Object.assign(\n {\n ...browserGlobals,\n ...nodeGlobals,\n ...nodeBuiltinGlobals,\n } as const satisfies Linter.Globals,\n\n {\n ...vitestTestGlobals,\n ...vitestGlobals,\n } as const satisfies Linter.Globals,\n ) satisfies Linter.Globals\n","import packageJson from '@aryaemami59/eslint-config/package.json' with { type: 'json' }\nimport { disabledRules } from './disabledRules.js'\nimport type { Config, ESLint, Linter, TSESLintFlatConfig } from './external.js'\nimport {\n js,\n prettierConfig,\n tseslintConfigs,\n tseslintParser,\n tseslintPlugin,\n} from './external.js'\nimport { globalIgnores } from './globalIgnores.js'\nimport { sharedEnvironmentGlobals } from './globals.js'\n\n/**\n * Flat ESLint configuration tailored for projects using TypeScript.\n *\n * @example\n * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>\n *\n * ```ts\n * import { flatESLintConfig } from '@aryaemami59/eslint-config'\n *\n * export default flatESLintConfig\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>\n *\n * ```ts\n * const { flatESLintConfig } = require('@aryaemami59/eslint-config')\n *\n * module.exports = flatESLintConfig\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cjs` or `eslint.config.cts` (using dynamic import)__</caption>\n *\n * ```ts\n * module.exports = (async () =>\n * (await import('@aryaemami59/eslint-config')).flatESLintConfig)()\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>\n *\n * ```ts\n * import eslintConfigModule = require('@aryaemami59/eslint-config')\n * import flatESLintConfig = eslintConfigModule.flatESLintConfig\n *\n * export = flatESLintConfig\n * ```\n *\n * @since 0.0.3\n * @public\n */\nexport const flatESLintConfig = [\n // `ignores` must be first.\n // config with just `ignores` is the replacement for `.eslintignore`\n globalIgnores,\n\n {\n name: `${js.meta.name}/recommended`,\n ...js.configs.recommended,\n } as const satisfies TSESLintFlatConfig.Config satisfies Config,\n\n // TODO: You can remove the type assertion in the next major version of `typescript-eslint`.\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n ...(tseslintConfigs.recommended satisfies TSESLintFlatConfig.Config[] satisfies Config[] as Config[]),\n // TODO: You can remove the type assertion in the next major version of `typescript-eslint`.\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n ...(tseslintConfigs.stylistic satisfies TSESLintFlatConfig.Config[] satisfies Config[] as Config[]),\n\n {\n languageOptions: {\n globals: sharedEnvironmentGlobals,\n parser:\n tseslintParser satisfies TSESLintFlatConfig.Parser satisfies Linter.Parser as Linter.Parser,\n parserOptions: {\n ecmaVersion: 'latest',\n projectService: true,\n } as const satisfies TSESLintFlatConfig.ParserOptions satisfies Linter.ParserOptions,\n } as const satisfies TSESLintFlatConfig.LanguageOptions satisfies Linter.LanguageOptions,\n linterOptions: {\n reportUnusedDisableDirectives: 2,\n reportUnusedInlineConfigs: 2,\n },\n name: `${packageJson.name}/defaults/overrides`,\n plugins: {\n '@typescript-eslint':\n tseslintPlugin satisfies TSESLintFlatConfig.Plugin satisfies ESLint.Plugin as ESLint.Plugin,\n },\n\n rules: {\n // TODO: Uncomment this once https://github.com/typescript-eslint/typescript-eslint/issues/11952 is resolved.\n '@typescript-eslint/consistent-type-definitions': [2, 'type'],\n '@typescript-eslint/consistent-type-exports': [\n 2,\n { fixMixedExportsWithInlineTypeSpecifier: false },\n ],\n '@typescript-eslint/consistent-type-imports': [\n 2,\n {\n disallowTypeAnnotations: true,\n fixStyle: 'separate-type-imports',\n prefer: 'type-imports',\n },\n ],\n '@typescript-eslint/no-confusing-void-expression': [\n 2,\n {\n ignoreArrowShorthand: false,\n ignoreVoidOperator: false,\n ignoreVoidReturningFunctions: false,\n },\n ],\n '@typescript-eslint/no-duplicate-type-constituents': [\n 2,\n {\n ignoreIntersections: false,\n ignoreUnions: false,\n },\n ],\n '@typescript-eslint/no-empty-object-type': [\n 2,\n {\n allowInterfaces: 'never',\n allowObjectTypes: 'never',\n },\n ],\n '@typescript-eslint/no-explicit-any': [\n 2,\n {\n fixToUnknown: false,\n ignoreRestArgs: false,\n },\n ],\n '@typescript-eslint/no-inferrable-types': [\n 2,\n {\n ignoreParameters: false,\n ignoreProperties: false,\n },\n ],\n '@typescript-eslint/no-invalid-void-type': [\n 2,\n {\n allowAsThisParameter: false,\n allowInGenericTypeArguments: true,\n },\n ],\n '@typescript-eslint/no-namespace': [\n 2,\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n '@typescript-eslint/no-redundant-type-constituents': [2],\n '@typescript-eslint/no-require-imports': [\n 2,\n {\n allow: [],\n allowAsImport: true,\n },\n ],\n '@typescript-eslint/no-restricted-types': [\n 2,\n {\n types: {\n '{}': {\n message: `\n - If you want to represent an empty object, use \\`type EmptyObject = Record<string, never>\\`.\n - If you want to represent an object literal, use either \\`type AnyObject = Record<string, any>\\` or \\`object\\`.\n - If you want to represent any non-nullish value, use \\`type AnyNonNullishValue = NonNullable<unknown>\\`.`,\n suggest: [\n 'AnyNonNullishValue',\n 'EmptyObject',\n 'AnyObject',\n 'object',\n 'Record<string, never>',\n 'Record<string, any>',\n 'NonNullable<unknown>',\n ],\n },\n },\n },\n ],\n '@typescript-eslint/no-unnecessary-type-arguments': [2],\n '@typescript-eslint/no-unnecessary-type-assertion': [\n 2,\n { typesToIgnore: [] },\n ],\n '@typescript-eslint/no-unnecessary-type-parameters': [2],\n '@typescript-eslint/prefer-nullish-coalescing': [\n 2,\n {\n allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: true,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n '@typescript-eslint/require-await': [2],\n '@typescript-eslint/unified-signatures': [\n 2,\n {\n ignoreDifferentlyNamedParameters: false,\n ignoreOverloadsWithDifferentJSDoc: false,\n },\n ],\n 'object-shorthand': [\n 2,\n 'always',\n {\n avoidExplicitReturnArrows: true,\n avoidQuotes: true,\n ignoreConstructors: true,\n methodsIgnorePattern: '',\n },\n ],\n 'sort-imports': [\n 2,\n {\n allowSeparatedGroups: true,\n ignoreCase: false,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n\n ...disabledRules,\n },\n } as const satisfies Config,\n\n {\n files: ['**/*.cjs'],\n languageOptions: {\n sourceType: 'commonjs',\n } as const satisfies TSESLintFlatConfig.LanguageOptions satisfies Linter.LanguageOptions,\n name: `${packageJson.name}/commonjs-files`,\n rules: {\n '@typescript-eslint/no-require-imports': [\n 0,\n {\n allow: [],\n allowAsImport: false,\n },\n ],\n },\n } as const satisfies Config,\n\n prettierConfig,\n] as const satisfies Config[]\n","import type { Config } from './external.js'\nimport { defineConfig } from './external.js'\nimport { flatESLintConfig } from './shareableConfigs.js'\n\n/**\n * A function that returns {@linkcode flatESLintConfig}\n * along with optional additional overrides.\n * It's made mainly to provide intellisense and eliminate\n * the need for manual type annotations using JSDoc comments.\n *\n * @param [additionalOverrides=[]] - **Optional** additional overrides to apply to the configuration.\n * @returns An augmented version of the default {@linkcode flatESLintConfig}, incorporating any provided overrides.\n *\n * @example\n * <caption>#### __ECMAScript Modules (ESM) usage inside a file like `eslint.config.mts` or `eslint.config.mjs`__</caption>\n *\n * ```ts\n * import { createESLintConfig } from '@aryaemami59/eslint-config'\n *\n * export default createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using `require`)__</caption>\n *\n * ```ts\n * const { createESLintConfig } = require('@aryaemami59/eslint-config')\n *\n * module.exports = createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` or `eslint.config.cjs` (using dynamic import)__</caption>\n *\n * ```ts\n * module.exports = (async () =>\n * (await import('@aryaemami59/eslint-config')).createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ]))()\n * ```\n *\n * @example\n * <caption>#### __CommonJS (CJS) usage inside a file like `eslint.config.cts` (using import and export assignment)__</caption>\n *\n * ```ts\n * import eslintConfigModule = require('@aryaemami59/eslint-config')\n * import createESLintConfig = eslintConfigModule.createESLintConfig\n *\n * export = createESLintConfig([\n * {\n * rules: {\n * 'no-console': [0],\n * },\n * },\n * {\n * // ...Other additional overrides\n * },\n * ])\n * ```\n *\n * @since 0.0.3\n * @public\n */\nexport const createESLintConfig = (\n additionalOverrides: Parameters<typeof defineConfig> = [],\n): Config[] =>\n /* @__PURE__ */ defineConfig(...flatESLintConfig, ...additionalOverrides)\n"],"mappings":"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"}