@agilebot/eslint-config 0.6.0 → 0.7.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @license @agilebot/eslint-config v0.7.0-beta.1
3
+ *
4
+ * Copyright (c) Agilebot, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
11
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
12
+ }) : x)(function(x) {
13
+ if (typeof require !== "undefined") return require.apply(this, arguments);
14
+ throw Error('Dynamic require of "' + x + '" is not supported');
15
+ });
16
+
17
+ // <define:__STANDARD_RULES>
18
+ var define_STANDARD_RULES_default = { "class-methods-use-this": ["off"], "dot-notation": ["off"], "init-declarations": ["off"], "max-params": ["off"], "no-array-constructor": ["off"], "no-dupe-class-members": ["off"], "no-empty-function": ["off"], "no-implied-eval": ["off"], "no-loop-func": ["off"], "no-magic-numbers": ["off"], "no-unused-expressions": ["off"], "no-unused-vars": ["off"], "no-use-before-define": ["off"], "no-useless-constructor": ["off"], "prefer-destructuring": ["off"], "prefer-promise-reject-errors": ["off"], "accessor-pairs": ["error", { setWithoutGet: true, getWithoutSet: false, enforceForClassMembers: true }], "array-callback-return": ["error", { allowImplicit: false, allowVoid: false, checkForEach: false }], "constructor-super": ["error"], curly: ["error", "multi-line"], "default-case-last": ["error"], eqeqeq: ["error", "always", { null: "ignore" }], "new-cap": ["error", { newIsCap: true, capIsNew: false, properties: true }], "no-async-promise-executor": ["error"], "no-caller": ["error"], "no-case-declarations": ["error"], "no-class-assign": ["error"], "no-compare-neg-zero": ["error"], "no-cond-assign": ["error"], "no-const-assign": ["error"], "no-constant-condition": ["error", { checkLoops: false }], "no-control-regex": ["error"], "no-debugger": ["error"], "no-delete-var": ["error"], "no-dupe-args": ["error"], "no-dupe-keys": ["error"], "no-duplicate-case": ["error"], "no-useless-backreference": ["error"], "no-empty": ["error", { allowEmptyCatch: true }], "no-empty-character-class": ["error"], "no-empty-pattern": ["error"], "no-eval": ["error"], "no-ex-assign": ["error"], "no-extend-native": ["error"], "no-extra-bind": ["error"], "no-extra-boolean-cast": ["error"], "no-fallthrough": ["error"], "no-func-assign": ["error"], "no-global-assign": ["error"], "no-import-assign": ["error"], "no-invalid-regexp": ["error"], "no-irregular-whitespace": ["error"], "no-iterator": ["error"], "no-labels": ["error", { allowLoop: false, allowSwitch: false }], "no-lone-blocks": ["error"], "no-loss-of-precision": ["error"], "no-misleading-character-class": ["error"], "no-prototype-builtins": ["error"], "no-useless-catch": ["error"], "no-multi-str": ["error"], "no-new": ["error"], "no-new-func": ["error"], "no-new-native-nonconstructor": ["error"], "no-new-wrappers": ["error"], "no-obj-calls": ["error"], "no-object-constructor": ["error"], "no-octal": ["error"], "no-octal-escape": ["error"], "no-proto": ["error"], "no-regex-spaces": ["error"], "no-return-assign": ["error", "except-parens"], "no-self-assign": ["error", { props: true }], "no-self-compare": ["error"], "no-sequences": ["error"], "no-shadow-restricted-names": ["error"], "no-sparse-arrays": ["error"], "no-template-curly-in-string": ["error"], "no-this-before-super": ["error"], "no-throw-literal": ["off"], "no-unexpected-multiline": ["error"], "no-unmodified-loop-condition": ["error"], "no-unneeded-ternary": ["error", { defaultAssignment: false }], "no-unreachable": ["error"], "no-unreachable-loop": ["error"], "no-unsafe-finally": ["error"], "no-unsafe-negation": ["error"], "no-useless-call": ["error"], "no-useless-computed-key": ["error"], "no-useless-escape": ["error"], "no-useless-rename": ["error"], "no-useless-return": ["error"], "no-var": ["error"], "no-void": ["error", { allowAsStatement: true }], "no-with": ["error"], "object-shorthand": ["warn", "properties"], "one-var": ["error", { initialized: "never" }], "prefer-const": ["error", { destructuring: "all", ignoreReadBeforeAssign: false }], "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }], "symbol-description": ["error"], "unicode-bom": ["error", "never"], "use-isnan": ["error", { enforceForSwitchCase: true, enforceForIndexOf: true }], "valid-typeof": ["error", { requireStringLiterals: true }], yoda: ["error", "never"], "import/export": ["error"], "import/first": ["error"], "import/no-absolute-path": ["error", { esmodule: true, commonjs: true, amd: false }], "import/no-duplicates": ["error"], "import/no-named-default": ["error"], "import/no-webpack-loader-syntax": ["error"], "n/handle-callback-err": ["error", "^(err|error)$"], "n/no-callback-literal": ["error"], "n/no-deprecated-api": ["error"], "n/no-exports-assign": ["error"], "n/no-new-require": ["error"], "n/no-path-concat": ["error"], "n/process-exit-as-throw": ["error"], "promise/param-names": ["error"], "@typescript-eslint/adjacent-overload-signatures": ["error"], "@typescript-eslint/array-type": ["error", { default: "array-simple" }], "@typescript-eslint/await-thenable": ["error"], "@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description", "ts-ignore": true, "ts-nocheck": true, "ts-check": false, minimumDescriptionLength: 3 }], "@typescript-eslint/ban-tslint-comment": ["error"], "@typescript-eslint/class-literal-property-style": ["error", "fields"], "@typescript-eslint/class-methods-use-this": ["error", { exceptMethods: [], enforceForClassFields: true, ignoreOverrideMethods: false, ignoreClassesThatImplementAnInterface: false }], "@typescript-eslint/consistent-generic-constructors": ["error", "constructor"], "@typescript-eslint/consistent-indexed-object-style": ["error", "record"], "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as", objectLiteralTypeAssertions: "never" }], "@typescript-eslint/consistent-type-definitions": ["error", "interface"], "@typescript-eslint/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: true }], "@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports", disallowTypeAnnotations: true, fixStyle: "inline-type-imports" }], "@typescript-eslint/dot-notation": ["error", { allowIndexSignaturePropertyAccess: false, allowKeywords: true, allowPattern: "", allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false }], "@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true, allowHigherOrderFunctions: true, allowTypedFunctionExpressions: true, allowDirectConstAssertionInArrowFunctions: true }], "@typescript-eslint/init-declarations": ["error", "always"], "@typescript-eslint/max-params": ["error", { max: 4 }], "@typescript-eslint/method-signature-style": ["error"], "@typescript-eslint/naming-convention": ["error", { selector: "variableLike", leadingUnderscore: "allow", trailingUnderscore: "allow", format: ["camelCase", "PascalCase", "UPPER_CASE"] }], "@typescript-eslint/no-array-constructor": ["error"], "@typescript-eslint/no-array-delete": ["error"], "@typescript-eslint/no-base-to-string": ["error"], "@typescript-eslint/no-confusing-non-null-assertion": ["error"], "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: false, ignoreVoidOperator: false }], "@typescript-eslint/no-deprecated": ["warn"], "@typescript-eslint/no-dupe-class-members": ["error"], "@typescript-eslint/no-duplicate-enum-values": ["error"], "@typescript-eslint/no-duplicate-type-constituents": ["error", { ignoreIntersections: false, ignoreUnions: false }], "@typescript-eslint/no-dynamic-delete": ["error"], "@typescript-eslint/no-empty-function": ["error", { allow: [] }], "@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends", allowObjectTypes: "never" }], "@typescript-eslint/no-explicit-any": ["error", { fixToUnknown: false, ignoreRestArgs: false }], "@typescript-eslint/no-extra-non-null-assertion": ["error"], "@typescript-eslint/no-extraneous-class": ["error", { allowWithDecorator: true }], "@typescript-eslint/no-floating-promises": ["error"], "@typescript-eslint/no-for-in-array": ["error"], "@typescript-eslint/no-implied-eval": ["error"], "@typescript-eslint/no-import-type-side-effects": ["error"], "@typescript-eslint/no-inferrable-types": ["error", { ignoreParameters: false, ignoreProperties: false }], "@typescript-eslint/no-invalid-void-type": ["error"], "@typescript-eslint/no-loop-func": ["error"], "@typescript-eslint/no-magic-numbers": ["error", { ignore: [], ignoreArrayIndexes: false, ignoreDefaultValues: false, ignoreClassFieldInitialValues: false, enforceConst: false, detectObjects: true, ignoreEnums: true, ignoreNumericLiteralTypes: false, ignoreReadonlyClassProperties: true, ignoreTypeIndexes: false }], "@typescript-eslint/no-meaningless-void-operator": ["error", { checkNever: true }], "@typescript-eslint/no-misused-new": ["error"], "@typescript-eslint/no-misused-promises": ["error"], "@typescript-eslint/no-mixed-enums": ["error"], "@typescript-eslint/no-namespace": ["error"], "@typescript-eslint/no-non-null-asserted-nullish-coalescing": ["error"], "@typescript-eslint/no-non-null-asserted-optional-chain": ["error"], "@typescript-eslint/no-non-null-assertion": ["error"], "@typescript-eslint/no-redundant-type-constituents": ["error"], "@typescript-eslint/no-require-imports": ["error", { allow: [], allowAsImport: false }], "@typescript-eslint/no-this-alias": ["error", { allowDestructuring: true }], "@typescript-eslint/no-unnecessary-boolean-literal-compare": ["error"], "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }], "@typescript-eslint/no-unnecessary-parameter-property-assignment": ["error"], "@typescript-eslint/no-unnecessary-qualifier": ["error"], "@typescript-eslint/no-unnecessary-template-expression": ["error"], "@typescript-eslint/no-unnecessary-type-arguments": ["error"], "@typescript-eslint/no-unnecessary-type-assertion": ["error"], "@typescript-eslint/no-unnecessary-type-constraint": ["error"], "@typescript-eslint/no-unnecessary-type-parameters": ["error"], "@typescript-eslint/no-unsafe-argument": ["error"], "@typescript-eslint/no-unsafe-assignment": ["error"], "@typescript-eslint/no-unsafe-call": ["error"], "@typescript-eslint/no-unsafe-declaration-merging": ["error"], "@typescript-eslint/no-unsafe-enum-comparison": ["error"], "@typescript-eslint/no-unsafe-function-type": ["error"], "@typescript-eslint/no-unsafe-member-access": ["error"], "@typescript-eslint/no-unsafe-return": ["error"], "@typescript-eslint/no-unsafe-unary-minus": ["error"], "@typescript-eslint/no-unused-expressions": ["error", { allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true, enforceForJSX: false }], "@typescript-eslint/no-unused-vars": ["error", { args: "none", caughtErrors: "none", ignoreRestSiblings: true, vars: "all" }], "@typescript-eslint/no-use-before-define": ["error", { functions: false, classes: false, enums: false, variables: false, typedefs: false }], "@typescript-eslint/no-useless-constructor": ["error"], "@typescript-eslint/no-useless-empty-export": ["error"], "@typescript-eslint/no-wrapper-object-types": ["error"], "@typescript-eslint/non-nullable-type-assertion-style": ["error"], "@typescript-eslint/only-throw-error": ["error", { allowThrowingAny: false, allowThrowingUnknown: false }], "@typescript-eslint/prefer-as-const": ["error"], "@typescript-eslint/prefer-destructuring": ["error", { array: true, object: true }, { enforceForRenamedProperties: true, enforceForDeclarationWithTypeAnnotation: false }], "@typescript-eslint/prefer-function-type": ["error"], "@typescript-eslint/prefer-includes": ["error"], "@typescript-eslint/prefer-nullish-coalescing": ["error", { ignoreConditionalTests: false, ignoreMixedLogicalExpressions: false }], "@typescript-eslint/prefer-optional-chain": ["error"], "@typescript-eslint/prefer-promise-reject-errors": ["error"], "@typescript-eslint/prefer-readonly": ["error"], "@typescript-eslint/prefer-reduce-type-parameter": ["error"], "@typescript-eslint/prefer-return-this-type": ["error"], "@typescript-eslint/promise-function-async": ["error"], "@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }], "@typescript-eslint/restrict-plus-operands": ["error", { skipCompoundAssignments: false }], "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }], "@typescript-eslint/return-await": ["error", "always"], "@typescript-eslint/strict-boolean-expressions": ["error", { allowString: false, allowNumber: false, allowNullableObject: false, allowNullableBoolean: false, allowNullableString: false, allowNullableNumber: false, allowAny: false }], "@typescript-eslint/triple-slash-reference": ["error", { lib: "never", path: "never", types: "never" }], "@typescript-eslint/unbound-method": ["error", { ignoreStatic: false }] };
19
+
20
+ // ../../node_modules/.pnpm/tsup@8.3.5_jiti@2.3.3_postcss@8.4.47_tsx@4.19.2_typescript@5.5.4_yaml@2.6.1/node_modules/tsup/assets/esm_shims.js
21
+ import { fileURLToPath } from "url";
22
+ import path from "path";
23
+ var getFilename = () => fileURLToPath(import.meta.url);
24
+ var getDirname = () => path.dirname(getFilename());
25
+ var __dirname = /* @__PURE__ */ getDirname();
26
+
27
+ // src/constants.ts
28
+ var JS_EXTS = [".js", ".jsx", ".cjs", ".cjsx", ".mjs", ".mjsx"];
29
+ var TS_EXTS = [".ts", ".tsx", ".cts", ".ctsx", ".mts", ".mtsx"];
30
+ var DTS_EXTS = [".d.ts", ".d.cts", ".d.mts"];
31
+ var VUE_EXTS = [".vue"];
32
+ var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
33
+ var JS_GLOBS = JS_EXTS.map((ext) => `**/*${ext}`);
34
+ var TS_GLOBS = TS_EXTS.map((ext) => `**/*${ext}`);
35
+ var DTS_GLOBS = DTS_EXTS.map((ext) => `**/*${ext}`);
36
+ var VUE_GLOBS = VUE_EXTS.map((ext) => `**/*${ext}`);
37
+ var DEFAULT_GLOBS = DEFAULT_EXTS.map((ext) => `**/*${ext}`);
38
+ var IGNORE_GLOBS = [
39
+ "**/node_modules",
40
+ "**/dist",
41
+ "**/package-lock.json",
42
+ "**/yarn.lock",
43
+ "**/pnpm-lock.yaml",
44
+ "**/bun.lockb",
45
+ "**/output",
46
+ "**/coverage",
47
+ "**/temp",
48
+ "**/.temp",
49
+ "**/tmp",
50
+ "**/.tmp",
51
+ "**/.history",
52
+ "**/.vitepress/cache",
53
+ "**/.nuxt",
54
+ "**/.next",
55
+ "**/.svelte-kit",
56
+ "**/.vercel",
57
+ "**/.changeset",
58
+ "**/.idea",
59
+ "**/.cache",
60
+ "**/.output",
61
+ "**/.vite-inspect",
62
+ "**/.yarn",
63
+ "**/vite.config.*.timestamp-*",
64
+ "**/CHANGELOG*.md",
65
+ "**/*.min.*",
66
+ "**/LICENSE*",
67
+ "**/__snapshots__",
68
+ "**/auto-import?(s).d.ts",
69
+ "**/components.d.ts"
70
+ ];
71
+ var CLI_NAME = "eslint-agilebot";
72
+
73
+ export {
74
+ __require,
75
+ define_STANDARD_RULES_default,
76
+ __dirname,
77
+ JS_GLOBS,
78
+ TS_GLOBS,
79
+ DTS_GLOBS,
80
+ VUE_GLOBS,
81
+ DEFAULT_GLOBS,
82
+ IGNORE_GLOBS,
83
+ CLI_NAME
84
+ };
package/dist/cli.d.mts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.6.0
2
+ * @license @agilebot/eslint-config v0.7.0-beta.1
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
@@ -40,22 +40,18 @@ var import_picocolors = __toESM(require("picocolors"));
40
40
  // src/constants.ts
41
41
  var JS_EXTS = [".js", ".jsx", ".cjs", ".cjsx", ".mjs", ".mjsx"];
42
42
  var TS_EXTS = [".ts", ".tsx", ".cts", ".ctsx", ".mts", ".mtsx"];
43
+ var DTS_EXTS = [".d.ts", ".d.cts", ".d.mts"];
43
44
  var VUE_EXTS = [".vue"];
44
45
  var DEFAULT_EXTS = [...JS_EXTS, ...TS_EXTS, ...VUE_EXTS];
46
+ var JS_GLOBS = JS_EXTS.map((ext) => `**/*${ext}`);
47
+ var TS_GLOBS = TS_EXTS.map((ext) => `**/*${ext}`);
48
+ var DTS_GLOBS = DTS_EXTS.map((ext) => `**/*${ext}`);
49
+ var VUE_GLOBS = VUE_EXTS.map((ext) => `**/*${ext}`);
50
+ var DEFAULT_GLOBS = DEFAULT_EXTS.map((ext) => `**/*${ext}`);
45
51
  var CLI_NAME = "eslint-agilebot";
46
52
 
47
53
  // src/cli/stages/eslint.ts
48
54
  var import_node_path = __toESM(require("path"));
49
- function patch() {
50
- process.env.ESLINT_USE_FLAT_CONFIG = "false";
51
- const oldEmitWarning = process.emitWarning;
52
- process.emitWarning = (warning, ...args) => {
53
- if (args[0] === "ESLintRCWarning") {
54
- return;
55
- }
56
- oldEmitWarning(warning, ...args);
57
- };
58
- }
59
55
  function runBinary() {
60
56
  const pkg = require.resolve("eslint/package.json");
61
57
  const bin = import_node_path.default.join(pkg, "..", "bin", "eslint.js");
@@ -64,17 +60,11 @@ function runBinary() {
64
60
 
65
61
  // src/cli/index.ts
66
62
  function cli() {
67
- patch();
68
63
  const argv = (0, import_yargs.default)((0, import_helpers.hideBin)(process.argv)).scriptName(CLI_NAME).usage(`${CLI_NAME} [options] file.js [file.js] [dir]`).options({
69
- ext: {
70
- type: "string",
71
- description: "Specify file extensions",
72
- default: DEFAULT_EXTS.join(",")
73
- },
74
64
  config: {
75
65
  alias: "c",
76
66
  type: "string",
77
- description: "Use this configuration instead of .eslintrc.cjs, .eslintrc.js"
67
+ description: "Use this configuration instead of eslint.config.js, eslint.config.mjs, or eslint.config.cjs"
78
68
  },
79
69
  fix: {
80
70
  type: "boolean",
@@ -112,9 +102,6 @@ function cli() {
112
102
  if (argv.fix) {
113
103
  process.argv.splice(2, 0, "--fix");
114
104
  }
115
- if (argv.ext) {
116
- process.argv.splice(2, 0, "--ext", argv.ext);
117
- }
118
105
  if (argv.config) {
119
106
  process.argv.splice(2, 0, "--config", argv.config);
120
107
  }
package/dist/cli.mjs ADDED
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @license @agilebot/eslint-config v0.7.0-beta.1
3
+ *
4
+ * Copyright (c) Agilebot, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import {
11
+ CLI_NAME,
12
+ __require
13
+ } from "./chunk-XQZGZMJY.mjs";
14
+
15
+ // src/cli/index.ts
16
+ import { isCI } from "@agilebot/eslint-utils";
17
+ import yargs from "yargs";
18
+ import { hideBin } from "yargs/helpers";
19
+ import pc from "picocolors";
20
+
21
+ // src/cli/stages/eslint.ts
22
+ import path from "node:path";
23
+ function runBinary() {
24
+ const pkg = __require.resolve("eslint/package.json");
25
+ const bin = path.join(pkg, "..", "bin", "eslint.js");
26
+ __require(bin);
27
+ }
28
+
29
+ // src/cli/index.ts
30
+ function cli() {
31
+ const argv = yargs(hideBin(process.argv)).scriptName(CLI_NAME).usage(`${CLI_NAME} [options] file.js [file.js] [dir]`).options({
32
+ config: {
33
+ alias: "c",
34
+ type: "string",
35
+ description: "Use this configuration instead of eslint.config.js, eslint.config.mjs, or eslint.config.cjs"
36
+ },
37
+ fix: {
38
+ type: "boolean",
39
+ description: "Automatically fix problems",
40
+ default: true
41
+ },
42
+ "check-intl": {
43
+ type: "boolean",
44
+ description: "Check for unused intl IDs",
45
+ default: false
46
+ },
47
+ progress: {
48
+ type: "boolean",
49
+ description: "Show progress bar",
50
+ default: false
51
+ },
52
+ "show-warnings-in-ci": {
53
+ type: "boolean",
54
+ description: "Show warnings in CI environment",
55
+ default: false
56
+ }
57
+ }).alias("h", "help").alias("v", "version").parseSync();
58
+ process.argv = process.argv.slice(0, 2);
59
+ if (argv._.length === 0) {
60
+ console.error(
61
+ pc.red(
62
+ "Error: 'patterns' must be a non-empty string or an array of non-empty strings"
63
+ )
64
+ );
65
+ process.exit(1);
66
+ }
67
+ argv._.forEach((pattern) => {
68
+ process.argv.push(String(pattern));
69
+ });
70
+ if (argv.fix) {
71
+ process.argv.splice(2, 0, "--fix");
72
+ }
73
+ if (argv.config) {
74
+ process.argv.splice(2, 0, "--config", argv.config);
75
+ }
76
+ if (argv.progress && !isCI()) {
77
+ process.argv.splice(
78
+ 2,
79
+ 0,
80
+ "--plugin",
81
+ "file-progress",
82
+ "--rule",
83
+ "file-progress/activate: 1"
84
+ );
85
+ }
86
+ if (!argv.showWarningsInCi && isCI()) {
87
+ console.warn(
88
+ pc.yellow(
89
+ `Warning: ${CLI_NAME} will report errors only in CI environment`
90
+ )
91
+ );
92
+ process.argv.splice(2, 0, "--quiet");
93
+ }
94
+ if (argv.checkIntl) {
95
+ process.argv.splice(2, 0, "--rule", "@agilebot/intl-id-unused: 1");
96
+ }
97
+ runBinary();
98
+ }
99
+
100
+ // src/cli.ts
101
+ cli();
@@ -0,0 +1,91 @@
1
+ import { Linter } from 'eslint';
2
+ import { Options as Options$1 } from '@cspell/eslint-plugin';
3
+
4
+ interface FlatConfigItem extends Linter.Config {
5
+ name: string;
6
+ files: (string | string[])[];
7
+ plugins?: Record<string, any>;
8
+ }
9
+
10
+ type Options = Options$1['cspell'];
11
+
12
+ interface FactoryOptions {
13
+ /**
14
+ * ESLint configuration
15
+ * @default undefined
16
+ */
17
+ config?: FlatConfigItem;
18
+ /**
19
+ * List of files to ignore
20
+ * @default undefined
21
+ */
22
+ ignores?: string[];
23
+ /**
24
+ * List of development dependencies
25
+ * @default undefined
26
+ */
27
+ devDependencies?: string[];
28
+ /**
29
+ * List of core modules
30
+ * @default undefined
31
+ */
32
+ coreModules?: string[];
33
+ /**
34
+ * Monorepo scope
35
+ * @default undefined
36
+ */
37
+ monorepoScope?: string;
38
+ /**
39
+ * Flag indicating whether to enable React configurations
40
+ * @default undefined
41
+ */
42
+ react?: boolean | string;
43
+ /**
44
+ * Version of Vue.js (optional)
45
+ * @default undefined
46
+ */
47
+ vue?: number;
48
+ /**
49
+ * Flag indicating whether ES modules are used
50
+ * @default undefined
51
+ */
52
+ module?: boolean;
53
+ /**
54
+ * Flag indicating whether to enable GoDaddy configurations
55
+ * @default undefined
56
+ */
57
+ godaddy?: boolean | 'typescript';
58
+ /**
59
+ * Flag indicating whether to enable JSDoc configurations
60
+ * @default true
61
+ */
62
+ jsdoc?: boolean;
63
+ /**
64
+ * Flag indicating whether to enable Prettier configurations
65
+ * @default true
66
+ */
67
+ prettier?: boolean;
68
+ /**
69
+ * Flag indicating whether to enable Lodash configurations
70
+ * @default true
71
+ */
72
+ lodash?: boolean;
73
+ /**
74
+ * Flag indicating whether to enable CSpell configurations
75
+ * @default {}
76
+ */
77
+ cspell?: Options | false;
78
+ /**
79
+ * Flag indicating whether to enable imports configurations
80
+ * @default true
81
+ */
82
+ import?: boolean;
83
+ /**
84
+ * Flag indicating which import resolver to use
85
+ */
86
+ importResolver?: 'typescript' | 'oxc';
87
+ }
88
+
89
+ declare function factory(root: string, options?: FactoryOptions): FlatConfigItem[];
90
+
91
+ export { factory as agilebot };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import { Linter } from 'eslint';
2
2
  import { Options as Options$1 } from '@cspell/eslint-plugin';
3
3
 
4
- type ESLintConfig = Linter.LegacyConfig;
4
+ interface FlatConfigItem extends Linter.Config {
5
+ name: string;
6
+ files: (string | string[])[];
7
+ plugins?: Record<string, any>;
8
+ }
5
9
 
6
10
  type Options = Options$1['cspell'];
7
11
 
@@ -10,7 +14,12 @@ interface FactoryOptions {
10
14
  * ESLint configuration
11
15
  * @default undefined
12
16
  */
13
- config?: Pick<ESLintConfig, 'rules' | 'settings'>;
17
+ config?: FlatConfigItem;
18
+ /**
19
+ * List of files to ignore
20
+ * @default undefined
21
+ */
22
+ ignores?: string[];
14
23
  /**
15
24
  * List of development dependencies
16
25
  * @default undefined
@@ -77,6 +86,6 @@ interface FactoryOptions {
77
86
  importResolver?: 'typescript' | 'oxc';
78
87
  }
79
88
 
80
- declare function factory(root: string, options?: FactoryOptions): Linter.BaseConfig;
89
+ declare function factory(root: string, options?: FactoryOptions): FlatConfigItem[];
81
90
 
82
91
  export { factory as agilebot };