js-style-kit 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/bin/index.js +3531 -0
  2. package/dist/bin/index.js.map +1 -0
  3. package/dist/chunk-2EXCSH5L.js +21 -0
  4. package/dist/chunk-2EXCSH5L.js.map +1 -0
  5. package/dist/{chunk-LODDGOPW.js → chunk-BDTLNELO.js} +4 -2
  6. package/dist/{chunk-LODDGOPW.js.map → chunk-BDTLNELO.js.map} +1 -1
  7. package/dist/{chunk-MQCYNRXY.js → chunk-C63QD4BT.js} +6 -2
  8. package/dist/chunk-C63QD4BT.js.map +1 -0
  9. package/dist/{chunk-MICOVBJ4.js → chunk-DR4DHSO2.js} +2 -2
  10. package/dist/{chunk-67MZ7HGN.js → chunk-FJNJWCYG.js} +2 -2
  11. package/dist/{chunk-H2WBGBO4.js → chunk-HN2CEVC4.js} +2 -2
  12. package/dist/{chunk-PHFQMAHS.js → chunk-HOZDQJWG.js} +2 -2
  13. package/dist/chunk-HOZDQJWG.js.map +1 -0
  14. package/dist/{chunk-GMXUFYEC.js → chunk-I4GUWATW.js} +2 -2
  15. package/dist/{chunk-D3SKAD35.js → chunk-IKA5P3EP.js} +36 -12
  16. package/dist/chunk-IKA5P3EP.js.map +1 -0
  17. package/dist/{chunk-2DEE5IMM.js → chunk-LYJZ2BXK.js} +2 -2
  18. package/dist/{chunk-IDOXOS33.js → chunk-NPTVKFZO.js} +2 -2
  19. package/dist/{chunk-4JICVSDT.js → chunk-PB5PHG6U.js} +2 -2
  20. package/dist/chunk-PSSB4TGO.js +29 -0
  21. package/dist/chunk-PSSB4TGO.js.map +1 -0
  22. package/dist/{chunk-67I7QCZW.js → chunk-TA2KEF22.js} +2 -2
  23. package/dist/{chunk-3A7OYQSX.js → chunk-UV6CA4PE.js} +2 -2
  24. package/dist/chunk-UV6CA4PE.js.map +1 -0
  25. package/dist/chunk-V3QNQKET.js +20 -0
  26. package/dist/chunk-V3QNQKET.js.map +1 -0
  27. package/dist/{chunk-V34MGXE7.js → chunk-XHFTPVHK.js} +5 -6
  28. package/dist/chunk-XHFTPVHK.js.map +1 -0
  29. package/dist/chunk-YZG34ZNI.js +80 -0
  30. package/dist/chunk-YZG34ZNI.js.map +1 -0
  31. package/dist/eslint/base/config.js +2 -3
  32. package/dist/eslint/base/rules.js +0 -1
  33. package/dist/eslint/constants.d.ts +2 -0
  34. package/dist/eslint/constants.js +1 -2
  35. package/dist/eslint/ignores.js +2 -3
  36. package/dist/eslint/index.d.ts +5 -1
  37. package/dist/eslint/index.js +17 -14
  38. package/dist/eslint/jsdoc/config.js +2 -3
  39. package/dist/eslint/jsdoc/rules.js +0 -1
  40. package/dist/eslint/perfectionist/config.js +2 -3
  41. package/dist/eslint/perfectionist/rules.js +0 -1
  42. package/dist/eslint/prefer-arrow-function/config.js +2 -3
  43. package/dist/eslint/react/config.js +2 -3
  44. package/dist/eslint/react/rules.js +0 -1
  45. package/dist/eslint/react-compiler/config.js +2 -3
  46. package/dist/eslint/testing/config.js +4 -5
  47. package/dist/eslint/testing/jest-rules.js +7 -0
  48. package/dist/eslint/testing/vitest-rules.js +7 -0
  49. package/dist/eslint/turbo/config.d.ts +12 -0
  50. package/dist/eslint/turbo/config.js +8 -0
  51. package/dist/eslint/turbo/types.d.ts +11 -0
  52. package/dist/eslint/turbo/types.js +1 -0
  53. package/dist/eslint/typescript/config.js +2 -3
  54. package/dist/eslint/typescript/rules.js +0 -1
  55. package/dist/eslint/unicorn/config.d.ts +11 -0
  56. package/dist/eslint/unicorn/config.js +9 -0
  57. package/dist/eslint/unicorn/config.js.map +1 -0
  58. package/dist/eslint/unicorn/rules.d.ts +8 -0
  59. package/dist/eslint/unicorn/rules.js +7 -0
  60. package/dist/eslint/unicorn/rules.js.map +1 -0
  61. package/dist/index.js +20 -18
  62. package/dist/prettier/index.js +2 -2
  63. package/dist/utils/is-type.d.ts +44 -0
  64. package/dist/utils/is-type.js +17 -0
  65. package/dist/utils/is-type.js.map +1 -0
  66. package/package.json +25 -18
  67. package/dist/chunk-3A7OYQSX.js.map +0 -1
  68. package/dist/chunk-7D4SUZUM.js +0 -38
  69. package/dist/chunk-D3SKAD35.js.map +0 -1
  70. package/dist/chunk-ETHEVVRU.js +0 -1
  71. package/dist/chunk-LQQAQ4PJ.js +0 -17936
  72. package/dist/chunk-LQQAQ4PJ.js.map +0 -1
  73. package/dist/chunk-MQCYNRXY.js.map +0 -1
  74. package/dist/chunk-PHFQMAHS.js.map +0 -1
  75. package/dist/chunk-V34MGXE7.js.map +0 -1
  76. package/dist/eslint/index.test.d.ts +0 -2
  77. package/dist/eslint/index.test.js +0 -409
  78. package/dist/eslint/index.test.js.map +0 -1
  79. package/dist/eslint/testing/config.test.d.ts +0 -2
  80. package/dist/eslint/testing/config.test.js +0 -124
  81. package/dist/eslint/testing/config.test.js.map +0 -1
  82. package/dist/eslint/testing/jestRules.js +0 -8
  83. package/dist/eslint/testing/vitestRules.js +0 -8
  84. package/dist/magic-string.es-HYRYIEM3.js +0 -1300
  85. package/dist/magic-string.es-HYRYIEM3.js.map +0 -1
  86. package/dist/prettier/index.test.d.ts +0 -2
  87. package/dist/prettier/index.test.js +0 -137
  88. package/dist/prettier/index.test.js.map +0 -1
  89. /package/dist/{chunk-MICOVBJ4.js.map → chunk-DR4DHSO2.js.map} +0 -0
  90. /package/dist/{chunk-67MZ7HGN.js.map → chunk-FJNJWCYG.js.map} +0 -0
  91. /package/dist/{chunk-H2WBGBO4.js.map → chunk-HN2CEVC4.js.map} +0 -0
  92. /package/dist/{chunk-GMXUFYEC.js.map → chunk-I4GUWATW.js.map} +0 -0
  93. /package/dist/{chunk-2DEE5IMM.js.map → chunk-LYJZ2BXK.js.map} +0 -0
  94. /package/dist/{chunk-IDOXOS33.js.map → chunk-NPTVKFZO.js.map} +0 -0
  95. /package/dist/{chunk-4JICVSDT.js.map → chunk-PB5PHG6U.js.map} +0 -0
  96. /package/dist/{chunk-67I7QCZW.js.map → chunk-TA2KEF22.js.map} +0 -0
  97. /package/dist/eslint/testing/{jestRules.d.ts → jest-rules.d.ts} +0 -0
  98. /package/dist/{chunk-7D4SUZUM.js.map → eslint/testing/jest-rules.js.map} +0 -0
  99. /package/dist/eslint/testing/{vitestRules.d.ts → vitest-rules.d.ts} +0 -0
  100. /package/dist/{chunk-ETHEVVRU.js.map → eslint/testing/vitest-rules.js.map} +0 -0
  101. /package/dist/eslint/{testing/jestRules.js.map → turbo/config.js.map} +0 -0
  102. /package/dist/eslint/{testing/vitestRules.js.map → turbo/types.js.map} +0 -0
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  reactCompilerEslintConfig
3
- } from "../../chunk-IDOXOS33.js";
4
- import "../../chunk-LODDGOPW.js";
5
- import "../../chunk-7D4SUZUM.js";
3
+ } from "../../chunk-NPTVKFZO.js";
4
+ import "../../chunk-BDTLNELO.js";
6
5
  export {
7
6
  reactCompilerEslintConfig
8
7
  };
@@ -1,10 +1,9 @@
1
1
  import {
2
2
  testingConfig
3
- } from "../../chunk-V34MGXE7.js";
4
- import "../../chunk-3A7OYQSX.js";
5
- import "../../chunk-PHFQMAHS.js";
6
- import "../../chunk-LODDGOPW.js";
7
- import "../../chunk-7D4SUZUM.js";
3
+ } from "../../chunk-XHFTPVHK.js";
4
+ import "../../chunk-UV6CA4PE.js";
5
+ import "../../chunk-HOZDQJWG.js";
6
+ import "../../chunk-BDTLNELO.js";
8
7
  export {
9
8
  testingConfig
10
9
  };
@@ -0,0 +1,7 @@
1
+ import {
2
+ jestRules
3
+ } from "../../chunk-UV6CA4PE.js";
4
+ export {
5
+ jestRules
6
+ };
7
+ //# sourceMappingURL=jest-rules.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ vitestRules
3
+ } from "../../chunk-HOZDQJWG.js";
4
+ export {
5
+ vitestRules
6
+ };
7
+ //# sourceMappingURL=vitest-rules.js.map
@@ -0,0 +1,12 @@
1
+ import { EslintConfigObject } from '../types.js';
2
+ import 'eslint';
3
+ import '../constants.js';
4
+
5
+ /**
6
+ * Creates an ESLint configuration for Turbo.
7
+ *
8
+ * @returns ESLint configuration object for Turbo
9
+ */
10
+ declare const turboConfig: () => EslintConfigObject;
11
+
12
+ export { turboConfig };
@@ -0,0 +1,8 @@
1
+ import {
2
+ turboConfig
3
+ } from "../../chunk-V3QNQKET.js";
4
+ import "../../chunk-BDTLNELO.js";
5
+ export {
6
+ turboConfig
7
+ };
8
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1,11 @@
1
+ import { EslintRuleConfig } from '../types.js';
2
+ import 'eslint';
3
+ import '../constants.js';
4
+
5
+ interface TurboRules {
6
+ "turbo/no-undeclared-env-vars": EslintRuleConfig<{
7
+ allowList?: string[];
8
+ }>;
9
+ }
10
+
11
+ export type { TurboRules };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  tseslintConfig
3
- } from "../../chunk-GMXUFYEC.js";
3
+ } from "../../chunk-I4GUWATW.js";
4
4
  import "../../chunk-LITSWCYQ.js";
5
- import "../../chunk-LODDGOPW.js";
6
- import "../../chunk-7D4SUZUM.js";
5
+ import "../../chunk-BDTLNELO.js";
7
6
  export {
8
7
  tseslintConfig
9
8
  };
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  tseslintRules
3
3
  } from "../../chunk-LITSWCYQ.js";
4
- import "../../chunk-7D4SUZUM.js";
5
4
  export {
6
5
  tseslintRules
7
6
  };
@@ -0,0 +1,11 @@
1
+ import { EslintConfigObject } from '../types.js';
2
+ import 'eslint';
3
+ import '../constants.js';
4
+
5
+ /**
6
+ * ESLint configuration for unicorn plugin.
7
+ * This plugin provides a set of rules to enforce consistent code style and catch common errors.
8
+ */
9
+ declare const unicornConfig: EslintConfigObject;
10
+
11
+ export { unicornConfig };
@@ -0,0 +1,9 @@
1
+ import {
2
+ unicornConfig
3
+ } from "../../chunk-2EXCSH5L.js";
4
+ import "../../chunk-YZG34ZNI.js";
5
+ import "../../chunk-BDTLNELO.js";
6
+ export {
7
+ unicornConfig
8
+ };
9
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import { EslintRuleConfig } from '../types.js';
2
+ import 'eslint';
3
+ import '../constants.js';
4
+
5
+ type UnicornRules = Record<`unicorn/${string}`, EslintRuleConfig>;
6
+ declare const rules: UnicornRules;
7
+
8
+ export { rules };
@@ -0,0 +1,7 @@
1
+ import {
2
+ rules
3
+ } from "../../chunk-YZG34ZNI.js";
4
+ export {
5
+ rules
6
+ };
7
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.js CHANGED
@@ -1,28 +1,30 @@
1
- import "./chunk-ETHEVVRU.js";
2
- import {
3
- prettierConfig
4
- } from "./chunk-MQCYNRXY.js";
5
1
  import {
6
2
  eslintConfig
7
- } from "./chunk-D3SKAD35.js";
8
- import "./chunk-GMXUFYEC.js";
3
+ } from "./chunk-IKA5P3EP.js";
4
+ import "./chunk-V3QNQKET.js";
5
+ import "./chunk-I4GUWATW.js";
9
6
  import "./chunk-LITSWCYQ.js";
10
- import "./chunk-H2WBGBO4.js";
11
- import "./chunk-2DEE5IMM.js";
7
+ import "./chunk-2EXCSH5L.js";
8
+ import "./chunk-YZG34ZNI.js";
9
+ import "./chunk-HN2CEVC4.js";
10
+ import "./chunk-LYJZ2BXK.js";
12
11
  import "./chunk-26SVGV32.js";
13
- import "./chunk-IDOXOS33.js";
14
- import "./chunk-V34MGXE7.js";
15
- import "./chunk-3A7OYQSX.js";
16
- import "./chunk-PHFQMAHS.js";
17
- import "./chunk-67MZ7HGN.js";
12
+ import "./chunk-NPTVKFZO.js";
13
+ import "./chunk-XHFTPVHK.js";
14
+ import "./chunk-UV6CA4PE.js";
15
+ import "./chunk-HOZDQJWG.js";
16
+ import "./chunk-FJNJWCYG.js";
18
17
  import "./chunk-ZOCL6XIB.js";
19
- import "./chunk-MICOVBJ4.js";
18
+ import "./chunk-DR4DHSO2.js";
20
19
  import "./chunk-XCPOAYGQ.js";
21
- import "./chunk-67I7QCZW.js";
20
+ import "./chunk-TA2KEF22.js";
22
21
  import "./chunk-3SHRYTUT.js";
23
- import "./chunk-4JICVSDT.js";
24
- import "./chunk-LODDGOPW.js";
25
- import "./chunk-7D4SUZUM.js";
22
+ import "./chunk-PB5PHG6U.js";
23
+ import "./chunk-BDTLNELO.js";
24
+ import {
25
+ prettierConfig
26
+ } from "./chunk-C63QD4BT.js";
27
+ import "./chunk-PSSB4TGO.js";
26
28
  export {
27
29
  eslintConfig,
28
30
  prettierConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  prettierConfig
3
- } from "../chunk-MQCYNRXY.js";
4
- import "../chunk-7D4SUZUM.js";
3
+ } from "../chunk-C63QD4BT.js";
4
+ import "../chunk-PSSB4TGO.js";
5
5
  export {
6
6
  prettierConfig
7
7
  };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Type predicate for string values
3
+ *
4
+ * @param value - The value to check
5
+ * @returns True if the value is a string, false otherwise
6
+ */
7
+ declare const isString: (value: unknown) => value is string;
8
+ /**
9
+ * Type predicate for number values
10
+ *
11
+ * @param value - The value to check
12
+ * @returns True if the value is a number and not NaN, false otherwise
13
+ */
14
+ declare const isNumber: (value: unknown) => value is number;
15
+ /**
16
+ * Type predicate for boolean values
17
+ *
18
+ * @param value - The value to check
19
+ * @returns True if the value is a boolean, false otherwise
20
+ */
21
+ declare const isBoolean: (value: unknown) => value is boolean;
22
+ /**
23
+ * Type predicate for array values
24
+ *
25
+ * @param value - The value to check
26
+ * @returns True if the value is an array, false otherwise
27
+ */
28
+ declare const isArray: <T = unknown>(value: unknown) => value is T[];
29
+ /**
30
+ * Type predicate for object values (excluding null and arrays)
31
+ *
32
+ * @param value - The value to check
33
+ * @returns True if the value is an object (not null and not an array), false otherwise
34
+ */
35
+ declare const isObject: (value: unknown) => value is Record<string, unknown>;
36
+ /**
37
+ * Type predicate for function values
38
+ *
39
+ * @param value - The value to check
40
+ * @returns True if the value is a function, false otherwise
41
+ */
42
+ declare const isFunction: (value: unknown) => value is Function;
43
+
44
+ export { isArray, isBoolean, isFunction, isNumber, isObject, isString };
@@ -0,0 +1,17 @@
1
+ import {
2
+ isArray,
3
+ isBoolean,
4
+ isFunction,
5
+ isNumber,
6
+ isObject,
7
+ isString
8
+ } from "../chunk-PSSB4TGO.js";
9
+ export {
10
+ isArray,
11
+ isBoolean,
12
+ isFunction,
13
+ isNumber,
14
+ isObject,
15
+ isString
16
+ };
17
+ //# sourceMappingURL=is-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-style-kit",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "A zero configuration style guide for ESLint and Prettier",
5
5
  "keywords": [
6
6
  "eslint",
@@ -23,45 +23,52 @@
23
23
  },
24
24
  "main": "./dist/index.js",
25
25
  "types": "./dist/index.d.ts",
26
+ "bin": "./dist/bin/index.js",
26
27
  "files": [
27
28
  "dist"
28
29
  ],
30
+ "scripts": {
31
+ "build": "tsup",
32
+ "dev": "tsup --watch",
33
+ "format": "prettier --write . --ignore-path .prettierignore.ci",
34
+ "format:check": "prettier --check . --ignore-path .prettierignore.ci",
35
+ "lint": "eslint .",
36
+ "lint:inspect": "eslint --inspect-config",
37
+ "test": "bun test",
38
+ "test:coverage": "bun test --coverage --coverage-reporter=lcov"
39
+ },
29
40
  "dependencies": {
30
- "eslint": "^9.21.0",
41
+ "eslint": "^9.22.0",
31
42
  "eslint-plugin-jest": "^28.11.0",
32
- "eslint-plugin-jsdoc": "^50.6.3",
33
- "eslint-plugin-perfectionist": "^4.9.0",
43
+ "eslint-plugin-jsdoc": "^50.6.6",
44
+ "eslint-plugin-perfectionist": "^4.10.1",
34
45
  "eslint-plugin-prefer-arrow-functions": "^3.6.2",
35
46
  "eslint-plugin-react": "^7.37.4",
36
- "eslint-plugin-react-compiler": "^19.0.0-beta-30d8a17-20250209",
47
+ "eslint-plugin-react-compiler": "19.0.0-beta-bafa41b-20250307",
37
48
  "eslint-plugin-react-hooks": "^5.2.0",
49
+ "eslint-plugin-turbo": "^2.4.4",
50
+ "eslint-plugin-unicorn": "^57.0.0",
38
51
  "eslint-plugin-vitest": "^0.5.4",
39
52
  "globals": "^16.0.0",
40
- "is-type-of": "^2.2.0",
41
53
  "prettier": "^3.5.3",
42
54
  "prettier-plugin-css-order": "^2.1.2",
43
55
  "prettier-plugin-packagejson": "^2.5.10",
44
56
  "prettier-plugin-sort-json": "^4.1.1",
45
57
  "prettier-plugin-tailwindcss": "^0.6.11",
46
- "typescript-eslint": "^8.26.0"
58
+ "typescript-eslint": "^8.26.1"
47
59
  },
48
60
  "devDependencies": {
49
- "@types/node": "^22.13.9",
50
- "@vitest/coverage-v8": "^3.0.8",
61
+ "@repo/typescript-config": "workspace:*",
62
+ "@types/bun": "^1.2.5",
63
+ "@types/node": "^22.13.10",
64
+ "commander": "^13.1.0",
51
65
  "tsup": "^8.4.0",
52
- "vitest": "^3.0.8",
53
- "@repo/typescript-config": "0.0.0"
66
+ "typescript": "^5.8.2"
54
67
  },
55
68
  "engines": {
56
69
  "node": "^20.11.0 || >=21.2.0"
57
70
  },
58
71
  "publishConfig": {
59
72
  "access": "public"
60
- },
61
- "scripts": {
62
- "build": "tsup",
63
- "lint": "eslint .",
64
- "lint:inspect": "eslint --inspect-config",
65
- "test": "vitest"
66
73
  }
67
- }
74
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/testing/jestRules.ts"],"sourcesContent":["import type { EslintRuleConfig } from \"../types.js\";\n\ntype JestRules = Record<`jest/${string}`, EslintRuleConfig>;\n\n/**\n * Creates an object containing the ESLint rules for jest.\n *\n * @param itOrTest - \"it\" or \"test\"\n * @returns An object containing the ESLint rules for jest.\n */\nexport const jestRules = (itOrTest: \"it\" | \"test\" = \"test\"): JestRules => ({\n \"jest/consistent-test-it\": [\n \"warn\",\n { fn: itOrTest, withinDescribe: itOrTest },\n ],\n \"jest/expect-expect\": \"warn\",\n \"jest/no-commented-out-tests\": \"warn\",\n \"jest/no-conditional-expect\": \"warn\",\n \"jest/no-conditional-in-test\": \"warn\",\n \"jest/no-disabled-tests\": \"warn\",\n \"jest/no-duplicate-hooks\": \"warn\",\n \"jest/no-focused-tests\": \"warn\",\n \"jest/no-identical-title\": \"warn\",\n \"jest/no-interpolation-in-snapshots\": \"warn\",\n \"jest/no-large-snapshots\": [\"warn\", { inlineMaxSize: 50, maxSize: 100 }],\n \"jest/no-mocks-import\": \"warn\", // Discourage manually importing from __mocks__\n \"jest/no-standalone-expect\": \"warn\",\n \"jest/no-test-prefixes\": \"warn\", // Prefer .only and .skip over f and x\n \"jest/no-test-return-statement\": \"warn\",\n \"jest/prefer-comparison-matcher\": \"warn\",\n \"jest/prefer-equality-matcher\": \"warn\",\n \"jest/prefer-expect-resolves\": \"warn\",\n \"jest/prefer-hooks-in-order\": \"warn\",\n \"jest/prefer-hooks-on-top\": \"warn\",\n \"jest/prefer-lowercase-title\": [\"warn\", { ignoreTopLevelDescribe: true }],\n \"jest/prefer-snapshot-hint\": \"warn\",\n \"jest/prefer-spy-on\": \"warn\",\n \"jest/prefer-strict-equal\": \"warn\",\n \"jest/prefer-to-be\": \"warn\",\n \"jest/prefer-to-contain\": \"warn\",\n \"jest/prefer-to-have-length\": \"warn\",\n \"jest/require-top-level-describe\": \"warn\",\n \"jest/valid-describe-callback\": \"warn\",\n \"jest/valid-expect\": \"warn\",\n \"jest/valid-expect-in-promise\": \"warn\",\n \"jest/valid-title\": \"warn\",\n});\n"],"mappings":";AAUO,IAAM,YAAY,CAAC,WAA0B,YAAuB;AAAA,EACzE,2BAA2B;AAAA,IACzB;AAAA,IACA,EAAE,IAAI,UAAU,gBAAgB,SAAS;AAAA,EAC3C;AAAA,EACA,sBAAsB;AAAA,EACtB,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,sCAAsC;AAAA,EACtC,2BAA2B,CAAC,QAAQ,EAAE,eAAe,IAAI,SAAS,IAAI,CAAC;AAAA,EACvE,wBAAwB;AAAA;AAAA,EACxB,6BAA6B;AAAA,EAC7B,yBAAyB;AAAA;AAAA,EACzB,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,EAClC,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,4BAA4B;AAAA,EAC5B,+BAA+B,CAAC,QAAQ,EAAE,wBAAwB,KAAK,CAAC;AAAA,EACxE,6BAA6B;AAAA,EAC7B,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,mCAAmC;AAAA,EACnC,gCAAgC;AAAA,EAChC,qBAAqB;AAAA,EACrB,gCAAgC;AAAA,EAChC,oBAAoB;AACtB;","names":[]}
@@ -1,38 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") {
18
- for (let key of __getOwnPropNames(from))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
32
-
33
- export {
34
- __require,
35
- __commonJS,
36
- __toESM
37
- };
38
- //# sourceMappingURL=chunk-7D4SUZUM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/index.ts"],"sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { isObject, isString } from \"is-type-of\";\n\nimport type { FunctionStyle } from \"./types.js\";\n\nimport { baseEslintConfig } from \"./base/config.js\";\nimport { ignoresConfig } from \"./ignores.js\";\nimport { jsdocConfig } from \"./jsdoc/config.js\";\nimport { perfectionistConfig } from \"./perfectionist/config.js\";\nimport { preferArrowFunctionConfig } from \"./prefer-arrow-function/config.js\";\nimport { reactCompilerEslintConfig } from \"./react-compiler/config.js\";\nimport { reactEslintConfig } from \"./react/config.js\";\nimport { testingConfig, type TestingConfig } from \"./testing/config.js\";\nimport { tseslintConfig } from \"./typescript/config.js\";\n\nexport interface EslintConfigOptions {\n functionStyle?: \"off\" | FunctionStyle;\n ignores?: string[];\n jsdoc?:\n | false\n | {\n requireJsdoc?: boolean;\n };\n react?:\n | boolean\n | {\n next?: boolean | undefined;\n reactCompiler?: boolean | undefined;\n };\n sorting?: boolean;\n testing?: false | TestingConfig;\n typescript?: boolean | string;\n}\n\n/**\n * Configures ESLint based on provided options.\n *\n * @param options - The optional configuration object.\n * @param options.functionStyle - The function style to enforce. Defaults to \"arrow\".\n * @param options.ignores - Additional paths to ignore. Already excludes `node_modules` and `dist`.\n * @param options.jsdoc - Whether to include JSDoc rules. Set to false to disable, or provide an object to configure.\n * @param options.react - Whether to include React rules. When true, reactCompiler is enabled by default.\n * Can be configured with an object to control next.js support and reactCompiler.\n * @param options.sorting - Whether to include sorting rules from Perfectionist. Defaults to true.\n * @param options.testing - An object with the following properties:\n * - `filenamePattern`: One of \"spec\" or \"test\" to determine which filename pattern to use.\n * - `files`: Array of file patterns to include in the configuration.\n * - `framework`: One of \"vitest\" or \"jest\" to determine which testing library to use.\n * - `formattingRules`: Whether to include formatting rules like padding around blocks.\n * - `itOrTest`: One of \"it\" or \"test\" to determine which test function to use.\n * @param options.typescript - Whether to include TypeScript rules. Can be a boolean or a string with path to tsconfig.\n * @param additionalConfigs - Additional ESLint config objects to be merged into the final configuration.\n * @returns An array of ESLint configuration objects.\n */\nexport const eslintConfig = (\n {\n functionStyle = \"arrow\",\n ignores = [],\n jsdoc = { requireJsdoc: false },\n react = false,\n sorting = true,\n testing,\n typescript = true,\n }: EslintConfigOptions = {},\n ...additionalConfigs: Linter.Config[]\n): Linter.Config[] => {\n const configs: Linter.Config[] = [\n ignoresConfig({\n next: isObject(react) && react.next,\n userIgnores: ignores,\n }),\n baseEslintConfig(functionStyle),\n ];\n\n if (jsdoc !== false) {\n configs.push(jsdocConfig(jsdoc.requireJsdoc ?? false));\n }\n\n if (typescript) {\n configs.push(\n ...(tseslintConfig(\n isString(typescript) ? typescript : undefined,\n ) as Linter.Config[]),\n );\n }\n\n if (react) {\n configs.push(reactEslintConfig(functionStyle, Boolean(typescript)));\n\n // Apply reactCompiler by default if react is true or if react.reactCompiler isn't explicitly false\n const shouldUseReactCompiler =\n react === true || (isObject(react) && react.reactCompiler !== false);\n\n if (shouldUseReactCompiler) {\n configs.push(reactCompilerEslintConfig);\n }\n }\n\n if (testing !== false) {\n const defaultTestingConfig: TestingConfig = {\n filenamePattern: \"test\",\n files: [\"**/*.{test,spec}.{ts,tsx,js,jsx}\"],\n formattingRules: true,\n framework: \"vitest\",\n itOrTest: \"it\",\n };\n\n // Merge the user's testing config with defaults\n const mergedTestingConfig: TestingConfig = {\n ...defaultTestingConfig,\n ...(isObject(testing) ? testing : {}),\n };\n\n // Destructure from the merged config\n const { filenamePattern, files, formattingRules, framework, itOrTest } =\n mergedTestingConfig;\n\n configs.push(\n testingConfig({\n filenamePattern,\n files,\n formattingRules,\n framework,\n itOrTest,\n }),\n );\n }\n\n if (sorting) {\n configs.push(perfectionistConfig);\n }\n\n if (functionStyle === \"arrow\") {\n configs.push(preferArrowFunctionConfig());\n }\n\n // Add any additional config objects provided by the user\n if (additionalConfigs.length > 0) {\n configs.push(...additionalConfigs);\n }\n\n return configs;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,UAAU,gBAAgB;AAqD5B,IAAM,eAAe,CAC1B;AAAA,EACE,gBAAgB;AAAA,EAChB,UAAU,CAAC;AAAA,EACX,QAAQ,EAAE,cAAc,MAAM;AAAA,EAC9B,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AACf,IAAyB,CAAC,MACvB,sBACiB;AACpB,QAAM,UAA2B;AAAA,IAC/B,cAAc;AAAA,MACZ,MAAM,SAAS,KAAK,KAAK,MAAM;AAAA,MAC/B,aAAa;AAAA,IACf,CAAC;AAAA,IACD,iBAAiB,aAAa;AAAA,EAChC;AAEA,MAAI,UAAU,OAAO;AACnB,YAAQ,KAAK,YAAY,MAAM,gBAAgB,KAAK,CAAC;AAAA,EACvD;AAEA,MAAI,YAAY;AACd,YAAQ;AAAA,MACN,GAAI;AAAA,QACF,SAAS,UAAU,IAAI,aAAa;AAAA,MACtC;AAAA,IACF;AAAA,EACF;AAEA,MAAI,OAAO;AACT,YAAQ,KAAK,kBAAkB,eAAe,QAAQ,UAAU,CAAC,CAAC;AAGlE,UAAM,yBACJ,UAAU,QAAS,SAAS,KAAK,KAAK,MAAM,kBAAkB;AAEhE,QAAI,wBAAwB;AAC1B,cAAQ,KAAK,yBAAyB;AAAA,IACxC;AAAA,EACF;AAEA,MAAI,YAAY,OAAO;AACrB,UAAM,uBAAsC;AAAA,MAC1C,iBAAiB;AAAA,MACjB,OAAO,CAAC,kCAAkC;AAAA,MAC1C,iBAAiB;AAAA,MACjB,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAGA,UAAM,sBAAqC;AAAA,MACzC,GAAG;AAAA,MACH,GAAI,SAAS,OAAO,IAAI,UAAU,CAAC;AAAA,IACrC;AAGA,UAAM,EAAE,iBAAiB,OAAO,iBAAiB,WAAW,SAAS,IACnE;AAEF,YAAQ;AAAA,MACN,cAAc;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,MAAI,SAAS;AACX,YAAQ,KAAK,mBAAmB;AAAA,EAClC;AAEA,MAAI,kBAAkB,SAAS;AAC7B,YAAQ,KAAK,0BAA0B,CAAC;AAAA,EAC1C;AAGA,MAAI,kBAAkB,SAAS,GAAG;AAChC,YAAQ,KAAK,GAAG,iBAAiB;AAAA,EACnC;AAEA,SAAO;AACT;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-ETHEVVRU.js.map