@jimmy.codes/eslint-config 6.0.0 → 6.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.
@@ -0,0 +1,17 @@
1
+ //#region src/utils/interop-default.ts
2
+ /**
3
+ * Utility to safely fetch an imported `ESLint` plugin.
4
+ *
5
+ * Since ESLint Flat Config still isn't widely adopted, many plugins don't include types or a default import by default. Additionally, since we accept large version ranges in our peer dependencies, the structure of plugins may change at times. This function normalizes an import of a generic ESLint plugin, ensuring it is typed and accessible.
6
+ *
7
+ * @param module the result of `import('eslint-plugin-name')`.
8
+ *
9
+ * @returns The normalized and awaited default export.
10
+ */
11
+ const interopDefault = async (module) => {
12
+ const resolved = await module;
13
+ return resolved?.default ?? resolved;
14
+ };
15
+
16
+ //#endregion
17
+ export { interopDefault };
@@ -0,0 +1,62 @@
1
+ import { GLOB_E2E, GLOB_TESTS } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+
4
+ //#region src/rules/jest.ts
5
+ const jestRules = async () => {
6
+ const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
7
+ return {
8
+ ...jestPlugin.configs["flat/recommended"].rules,
9
+ ...jestPlugin.configs["flat/style"].rules,
10
+ "jest/consistent-test-it": ["error", {
11
+ fn: "test",
12
+ withinDescribe: "it"
13
+ }],
14
+ "jest/expect-expect": "error",
15
+ "jest/no-alias-methods": "error",
16
+ "jest/no-commented-out-tests": "error",
17
+ "jest/no-conditional-in-test": "error",
18
+ "jest/no-confusing-set-timeout": "error",
19
+ "jest/no-duplicate-hooks": "error",
20
+ "jest/no-hooks": "off",
21
+ "jest/no-large-snapshots": "off",
22
+ "jest/no-restricted-jest-methods": "off",
23
+ "jest/no-restricted-matchers": "off",
24
+ "jest/no-test-return-statement": "error",
25
+ "jest/no-untyped-mock-factory": "off",
26
+ "jest/prefer-called-with": "error",
27
+ "jest/prefer-comparison-matcher": "error",
28
+ "jest/prefer-each": "error",
29
+ "jest/prefer-equality-matcher": "error",
30
+ "jest/prefer-expect-assertions": "off",
31
+ "jest/prefer-expect-resolves": "error",
32
+ "jest/prefer-hooks-in-order": "error",
33
+ "jest/prefer-hooks-on-top": "error",
34
+ "jest/prefer-lowercase-title": "off",
35
+ "jest/prefer-mock-promise-shorthand": "error",
36
+ "jest/prefer-snapshot-hint": "error",
37
+ "jest/prefer-spy-on": "off",
38
+ "jest/prefer-strict-equal": "error",
39
+ "jest/prefer-todo": "warn",
40
+ "jest/require-hook": "error",
41
+ "jest/require-to-throw-message": "error",
42
+ "jest/require-top-level-describe": "off",
43
+ "jest/unbound-method": "off",
44
+ "jest/valid-title": ["error", { mustMatch: { it: "^should" } }]
45
+ };
46
+ };
47
+
48
+ //#endregion
49
+ //#region src/configs/jest.ts
50
+ async function jestConfig() {
51
+ const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
52
+ return [{
53
+ files: GLOB_TESTS,
54
+ ignores: GLOB_E2E,
55
+ ...jestPlugin.configs["flat/recommended"],
56
+ name: "jimmy.codes/jest",
57
+ rules: await jestRules()
58
+ }];
59
+ }
60
+
61
+ //#endregion
62
+ export { jestConfig as default };
@@ -0,0 +1,24 @@
1
+ import { GLOB_NEXTJS } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+ import { upwarn } from "./upwarn-C7t3ub-R.js";
4
+
5
+ //#region src/rules/nextjs.ts
6
+ const nextjsRules = async () => {
7
+ const nextjsPlugin = await interopDefault(import("@next/eslint-plugin-next"));
8
+ return upwarn(nextjsPlugin.configs.recommended.rules);
9
+ };
10
+
11
+ //#endregion
12
+ //#region src/configs/nextjs.ts
13
+ async function nextjsConfig() {
14
+ const nextjsPlugin = await interopDefault(import("@next/eslint-plugin-next"));
15
+ return [{
16
+ files: GLOB_NEXTJS,
17
+ name: "jimmy.codes/nextjs",
18
+ plugins: { "@next/next": nextjsPlugin },
19
+ rules: await nextjsRules()
20
+ }];
21
+ }
22
+
23
+ //#endregion
24
+ export { nextjsConfig as default };
@@ -0,0 +1,41 @@
1
+ import { GLOB_PLAYWRIGHT } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+
4
+ //#region src/rules/playwright.ts
5
+ const playwrightRules = async () => {
6
+ const playwrightPlugin = await interopDefault(import("eslint-plugin-playwright"));
7
+ return {
8
+ ...playwrightPlugin.configs["flat/recommended"].rules,
9
+ "playwright/expect-expect": "error",
10
+ "playwright/max-nested-describe": "error",
11
+ "playwright/no-conditional-expect": "error",
12
+ "playwright/no-conditional-in-test": "error",
13
+ "playwright/no-element-handle": "error",
14
+ "playwright/no-eval": "error",
15
+ "playwright/no-force-option": "error",
16
+ "playwright/no-nested-step": "error",
17
+ "playwright/no-page-pause": "error",
18
+ "playwright/no-skipped-test": "error",
19
+ "playwright/no-slowed-test": "error",
20
+ "playwright/no-useless-await": "error",
21
+ "playwright/no-useless-not": "error",
22
+ "playwright/no-wait-for-selector": "error",
23
+ "playwright/no-wait-for-timeout": "error",
24
+ "playwright/valid-title": "off"
25
+ };
26
+ };
27
+
28
+ //#endregion
29
+ //#region src/configs/playwright.ts
30
+ async function playwrightConfig() {
31
+ const playwrightPlugin = await interopDefault(import("eslint-plugin-playwright"));
32
+ return [{
33
+ ...playwrightPlugin.configs["flat/recommended"],
34
+ files: GLOB_PLAYWRIGHT,
35
+ name: "jimmy.codes/playwright",
36
+ rules: await playwrightRules()
37
+ }];
38
+ }
39
+
40
+ //#endregion
41
+ export { playwrightConfig as default };
@@ -0,0 +1,94 @@
1
+ import { GLOB_JSX, GLOB_TSX } from "./constants-dep165g5.js";
2
+ import { hasNext, hasTypescript, hasVite } from "./has-dependency-B3Fi8OzA.js";
3
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
4
+ import { upwarn } from "./upwarn-C7t3ub-R.js";
5
+ import globals from "globals";
6
+
7
+ //#region src/rules/react.ts
8
+ const nextAllowedExportNames = [
9
+ "dynamic",
10
+ "dynamicParams",
11
+ "revalidate",
12
+ "fetchCache",
13
+ "runtime",
14
+ "preferredRegion",
15
+ "maxDuration",
16
+ "config",
17
+ "generateStaticParams",
18
+ "metadata",
19
+ "generateMetadata",
20
+ "viewport",
21
+ "generateViewport"
22
+ ];
23
+ const reactRules = async () => {
24
+ const [{ configs: reactConfigs }, jsxA11yPlugin] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-jsx-a11y"))]);
25
+ const isUsingNextjs = hasNext();
26
+ const isUsingVite = hasVite();
27
+ const isUsingTypesScript = hasTypescript();
28
+ const reactPluginRules = isUsingTypesScript ? reactConfigs["recommended-type-checked"].rules : reactConfigs.recommended.rules;
29
+ return {
30
+ ...jsxA11yPlugin.configs.recommended.rules,
31
+ ...upwarn(reactPluginRules),
32
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "error",
33
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
34
+ "@eslint-react/jsx-key-before-spread": "error",
35
+ "@eslint-react/jsx-shorthand-boolean": "error",
36
+ "@eslint-react/jsx-shorthand-fragment": "error",
37
+ "@eslint-react/naming-convention/component-name": "error",
38
+ "@eslint-react/naming-convention/use-state": "error",
39
+ "@eslint-react/no-children-prop": "error",
40
+ "@eslint-react/no-class-component": "error",
41
+ "@eslint-react/no-missing-context-display-name": "error",
42
+ "@eslint-react/no-unnecessary-use-callback": "error",
43
+ "@eslint-react/no-unnecessary-use-memo": "error",
44
+ "@eslint-react/no-useless-fragment": "error",
45
+ "@eslint-react/prefer-namespace-import": "error",
46
+ "react-compiler/react-compiler": "error",
47
+ "react-hooks/exhaustive-deps": "error",
48
+ "react-hooks/rules-of-hooks": "error",
49
+ "react-refresh/only-export-components": ["warn", {
50
+ allowConstantExport: isUsingVite,
51
+ allowExportNames: isUsingNextjs ? nextAllowedExportNames : []
52
+ }]
53
+ };
54
+ };
55
+
56
+ //#endregion
57
+ //#region src/configs/react.ts
58
+ async function reactConfig() {
59
+ const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin] = await Promise.all([
60
+ interopDefault(import("@eslint-react/eslint-plugin")),
61
+ interopDefault(import("eslint-plugin-jsx-a11y")),
62
+ import("eslint-plugin-react-hooks"),
63
+ interopDefault(import("eslint-plugin-react-refresh")),
64
+ import("eslint-plugin-react-compiler")
65
+ ]);
66
+ const reactPlugins = reactPlugin.configs.all.plugins;
67
+ return [{
68
+ files: [GLOB_JSX, GLOB_TSX],
69
+ languageOptions: {
70
+ globals: { ...globals.browser },
71
+ parserOptions: {
72
+ ecmaFeatures: { jsx: true },
73
+ jsxPragma: null
74
+ }
75
+ },
76
+ name: "jimmy.codes/react",
77
+ plugins: {
78
+ "@eslint-react": reactPlugins["@eslint-react"],
79
+ "@eslint-react/dom": reactPlugins["@eslint-react/dom"],
80
+ "@eslint-react/hooks-extra": reactPlugins["@eslint-react/hooks-extra"],
81
+ "@eslint-react/naming-convention": reactPlugins["@eslint-react/naming-convention"],
82
+ "@eslint-react/web-api": reactPlugins["@eslint-react/web-api"],
83
+ "jsx-a11y": jsxA11yPlugin,
84
+ "react-compiler": reactCompilerPlugin,
85
+ "react-hooks": reactHooksPlugin,
86
+ "react-refresh": reactRefreshPlugin
87
+ },
88
+ rules: await reactRules(),
89
+ settings: { react: { version: "detect" } }
90
+ }];
91
+ }
92
+
93
+ //#endregion
94
+ export { reactConfig as default };
@@ -0,0 +1,32 @@
1
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
2
+ import { upwarn } from "./upwarn-C7t3ub-R.js";
3
+
4
+ //#region src/configs/storybook.ts
5
+ async function storybookConfig() {
6
+ const { configs } = await interopDefault(import("eslint-plugin-storybook"));
7
+ const [setup, storiesConfig, mainConfig] = configs["flat/recommended"];
8
+ return [
9
+ {
10
+ name: "jimmy.codes/storybook/setup",
11
+ plugins: setup?.plugins
12
+ },
13
+ {
14
+ files: storiesConfig?.files,
15
+ name: "jimmy.codes/storybook/stories-rules",
16
+ rules: {
17
+ ...upwarn(storiesConfig?.rules),
18
+ "import-x/no-anonymous-default-export": "off",
19
+ "storybook/meta-satisfies-type": "error",
20
+ "unicorn/no-anonymous-default-export": "off"
21
+ }
22
+ },
23
+ {
24
+ files: mainConfig?.files,
25
+ name: "jimmy.codes/storybook/main-rules",
26
+ rules: { ...mainConfig?.rules }
27
+ }
28
+ ];
29
+ }
30
+
31
+ //#endregion
32
+ export { storybookConfig as default };
@@ -0,0 +1,24 @@
1
+ import { GLOB_JSX, GLOB_TSX } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+
4
+ //#region src/configs/tanstack-query.ts
5
+ async function tanstackQueryConfig() {
6
+ const queryPlugin = await interopDefault(import("@tanstack/eslint-plugin-query"));
7
+ return [{
8
+ files: [GLOB_JSX, GLOB_TSX],
9
+ name: "jimmy.codes/tanstack/react-query",
10
+ plugins: { "@tanstack/query": queryPlugin },
11
+ rules: {
12
+ "@tanstack/query/exhaustive-deps": "error",
13
+ "@tanstack/query/infinite-query-property-order": "error",
14
+ "@tanstack/query/mutation-property-order": "error",
15
+ "@tanstack/query/no-rest-destructuring": "error",
16
+ "@tanstack/query/no-unstable-deps": "error",
17
+ "@tanstack/query/no-void-query-fn": "error",
18
+ "@tanstack/query/stable-query-client": "error"
19
+ }
20
+ }];
21
+ }
22
+
23
+ //#endregion
24
+ export { tanstackQueryConfig as default };
@@ -0,0 +1,31 @@
1
+ import { GLOB_E2E, GLOB_TESTS } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+
4
+ //#region src/rules/testing-library.ts
5
+ const testingLibraryRules = async () => {
6
+ const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), interopDefault(import("eslint-plugin-testing-library"))]);
7
+ return {
8
+ ...testingLibrary.configs["flat/react"].rules,
9
+ ...jestDom.configs["flat/recommended"].rules,
10
+ "testing-library/no-test-id-queries": "error"
11
+ };
12
+ };
13
+
14
+ //#endregion
15
+ //#region src/configs/testing-library.ts
16
+ async function testingLibraryConfig() {
17
+ const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), interopDefault(import("eslint-plugin-testing-library"))]);
18
+ return [{
19
+ files: GLOB_TESTS,
20
+ ignores: GLOB_E2E,
21
+ name: "jimmy.codes/testing-library",
22
+ plugins: {
23
+ "jest-dom": jestDom,
24
+ "testing-library": testingLibrary
25
+ },
26
+ rules: await testingLibraryRules()
27
+ }];
28
+ }
29
+
30
+ //#endregion
31
+ export { testingLibraryConfig as default };
@@ -0,0 +1,64 @@
1
+ import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./constants-dep165g5.js";
2
+
3
+ //#region src/rules/typescript.ts
4
+ const disabledEslintRules = { "no-use-before-define": "off" };
5
+ const typescriptRules = {
6
+ "@typescript-eslint/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: false }],
7
+ "@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
8
+ "@typescript-eslint/no-deprecated": "warn",
9
+ "@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }],
10
+ "@typescript-eslint/no-unnecessary-type-conversion": "error",
11
+ "@typescript-eslint/no-unused-vars": ["error", {
12
+ args: "all",
13
+ argsIgnorePattern: "^_",
14
+ caughtErrors: "all",
15
+ caughtErrorsIgnorePattern: "^_",
16
+ destructuredArrayIgnorePattern: "^_",
17
+ ignoreRestSiblings: true,
18
+ varsIgnorePattern: "^_"
19
+ }],
20
+ "@typescript-eslint/no-use-before-define": ["error", {
21
+ allowNamedExports: false,
22
+ classes: false,
23
+ functions: false,
24
+ variables: true
25
+ }],
26
+ "@typescript-eslint/no-useless-empty-export": "error",
27
+ "@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
28
+ ...disabledEslintRules
29
+ };
30
+
31
+ //#endregion
32
+ //#region src/configs/typescript.ts
33
+ async function typescriptConfig() {
34
+ const { configs } = await import("typescript-eslint");
35
+ return [
36
+ ...configs.strictTypeChecked,
37
+ ...configs.stylisticTypeChecked.filter((config) => {
38
+ return config.name === "typescript-eslint/stylistic-type-checked";
39
+ }),
40
+ {
41
+ languageOptions: { parserOptions: {
42
+ projectService: true,
43
+ tsconfigRootDir: process.cwd()
44
+ } },
45
+ name: "jimmy.codes/typescript",
46
+ rules: typescriptRules
47
+ },
48
+ {
49
+ files: [GLOB_JS, GLOB_JSX],
50
+ ...configs.disableTypeChecked
51
+ },
52
+ {
53
+ files: GLOB_TESTS,
54
+ name: "jimmy.codes/typescript/testing",
55
+ rules: {
56
+ "@typescript-eslint/no-unsafe-argument": "off",
57
+ "@typescript-eslint/no-unsafe-assignment": "off"
58
+ }
59
+ }
60
+ ];
61
+ }
62
+
63
+ //#endregion
64
+ export { typescriptConfig as default };
@@ -0,0 +1,16 @@
1
+ //#region src/utils/upwarn.ts
2
+ /**
3
+ * Converts all ESLint rules set to `"warn"` into `"error"`.
4
+ *
5
+ * @param rules - A partial set of ESLint rules.
6
+ *
7
+ * @returns A new rules object with all `"warn"` values changed to `"error"`.
8
+ */
9
+ const upwarn = (rules = {}) => {
10
+ return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
11
+ return [rule, option === "warn" ? "error" : option];
12
+ }));
13
+ };
14
+
15
+ //#endregion
16
+ export { upwarn };
@@ -0,0 +1,74 @@
1
+ import { GLOB_E2E, GLOB_TESTS } from "./constants-dep165g5.js";
2
+ import { interopDefault } from "./interop-default-D4l3hsYQ.js";
3
+
4
+ //#region src/rules/vitest.ts
5
+ const vitestRules = async () => {
6
+ const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
7
+ return {
8
+ ...vitestPlugin.configs.recommended.rules,
9
+ "vitest/consistent-test-it": ["error", {
10
+ fn: "test",
11
+ withinDescribe: "it"
12
+ }],
13
+ "vitest/consistent-vitest-vi": "error",
14
+ "vitest/no-alias-methods": "error",
15
+ "vitest/no-commented-out-tests": "error",
16
+ "vitest/no-conditional-in-test": "error",
17
+ "vitest/no-disabled-tests": "warn",
18
+ "vitest/no-duplicate-hooks": "error",
19
+ "vitest/no-focused-tests": "error",
20
+ "vitest/no-hooks": "off",
21
+ "vitest/no-identical-title": "error",
22
+ "vitest/no-interpolation-in-snapshots": "error",
23
+ "vitest/no-large-snapshots": "off",
24
+ "vitest/no-mocks-import": "error",
25
+ "vitest/no-restricted-matchers": "off",
26
+ "vitest/no-restricted-vi-methods": "off",
27
+ "vitest/no-standalone-expect": "error",
28
+ "vitest/no-test-prefixes": "error",
29
+ "vitest/no-test-return-statement": "error",
30
+ "vitest/prefer-called-once": "error",
31
+ "vitest/prefer-called-times": "off",
32
+ "vitest/prefer-called-with": "error",
33
+ "vitest/prefer-comparison-matcher": "error",
34
+ "vitest/prefer-each": "error",
35
+ "vitest/prefer-equality-matcher": "error",
36
+ "vitest/prefer-expect-assertions": "off",
37
+ "vitest/prefer-expect-resolves": "error",
38
+ "vitest/prefer-hooks-in-order": "error",
39
+ "vitest/prefer-hooks-on-top": "error",
40
+ "vitest/prefer-lowercase-title": "off",
41
+ "vitest/prefer-mock-promise-shorthand": "error",
42
+ "vitest/prefer-snapshot-hint": "error",
43
+ "vitest/prefer-spy-on": "off",
44
+ "vitest/prefer-strict-boolean-matchers": "error",
45
+ "vitest/prefer-strict-equal": "error",
46
+ "vitest/prefer-to-be": "error",
47
+ "vitest/prefer-to-contain": "error",
48
+ "vitest/prefer-to-have-length": "error",
49
+ "vitest/prefer-todo": "warn",
50
+ "vitest/require-hook": "error",
51
+ "vitest/require-to-throw-message": "error",
52
+ "vitest/require-top-level-describe": "off",
53
+ "vitest/valid-expect": "error",
54
+ "vitest/valid-expect-in-promise": "error",
55
+ "vitest/valid-title": ["error", { mustMatch: { it: "^should" } }],
56
+ "vitest/warn-todo": "warn"
57
+ };
58
+ };
59
+
60
+ //#endregion
61
+ //#region src/configs/vitest.ts
62
+ async function vitestConfig() {
63
+ const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
64
+ return [{
65
+ files: GLOB_TESTS,
66
+ ignores: GLOB_E2E,
67
+ ...vitestPlugin.configs.recommended,
68
+ name: "jimmy.codes/vitest",
69
+ rules: await vitestRules()
70
+ }];
71
+ }
72
+
73
+ //#endregion
74
+ export { vitestConfig as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -33,14 +33,14 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
36
- "@eslint-react/eslint-plugin": "^1.52.3",
37
- "@eslint/js": "^9.31.0",
38
- "@next/eslint-plugin-next": "^15.4.2",
39
- "@stylistic/eslint-plugin": "^5.2.1",
40
- "@tanstack/eslint-plugin-query": "^5.81.2",
36
+ "@eslint-react/eslint-plugin": "2.0.0-beta.23",
37
+ "@eslint/js": "^9.33.0",
38
+ "@next/eslint-plugin-next": "^15.4.6",
39
+ "@stylistic/eslint-plugin": "^5.2.3",
40
+ "@tanstack/eslint-plugin-query": "^5.83.1",
41
41
  "@types/eslint": "9.6.1",
42
- "@typescript-eslint/parser": "^8.38.0",
43
- "@typescript-eslint/utils": "^8.38.0",
42
+ "@typescript-eslint/parser": "^8.39.0",
43
+ "@typescript-eslint/utils": "^8.39.0",
44
44
  "@vitest/eslint-plugin": "^1.3.4",
45
45
  "astro-eslint-parser": "^1.2.2",
46
46
  "eslint-config-prettier": "^10.1.8",
@@ -49,21 +49,21 @@
49
49
  "eslint-plugin-import-x": "^4.16.1",
50
50
  "eslint-plugin-jest": "^29.0.1",
51
51
  "eslint-plugin-jest-dom": "^5.5.0",
52
- "eslint-plugin-jsdoc": "^51.4.1",
52
+ "eslint-plugin-jsdoc": "^52.0.4",
53
53
  "eslint-plugin-jsx-a11y": "^6.10.2",
54
- "eslint-plugin-n": "^17.21.0",
54
+ "eslint-plugin-n": "^17.21.3",
55
55
  "eslint-plugin-perfectionist": "^4.15.0",
56
- "eslint-plugin-playwright": "^2.2.0",
56
+ "eslint-plugin-playwright": "^2.2.2",
57
57
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
58
58
  "eslint-plugin-react-hooks": "^5.2.0",
59
59
  "eslint-plugin-react-refresh": "0.4.20",
60
- "eslint-plugin-regexp": "^2.9.0",
60
+ "eslint-plugin-regexp": "^2.10.0",
61
61
  "eslint-plugin-storybook": "0.12.0",
62
- "eslint-plugin-testing-library": "^7.6.0",
62
+ "eslint-plugin-testing-library": "^7.6.3",
63
63
  "eslint-plugin-unicorn": "^60.0.0",
64
64
  "globals": "^16.3.0",
65
65
  "local-pkg": "^1.1.1",
66
- "typescript-eslint": "^8.38.0"
66
+ "typescript-eslint": "^8.39.0"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "eslint": "^9.10.0"
@@ -1,71 +0,0 @@
1
- import {
2
- interopDefault
3
- } from "./chunk-72FT76PY.js";
4
- import {
5
- GLOB_ASTRO
6
- } from "./chunk-XMM6FHXC.js";
7
-
8
- // src/configs/astro.ts
9
- import globals from "globals";
10
- async function astroConfig() {
11
- const files = [GLOB_ASTRO];
12
- const { configs, parser: parserTs } = await import("typescript-eslint");
13
- const [astroPlugin, astroParser, jsxA11yPlugin] = await Promise.all([
14
- import("eslint-plugin-astro"),
15
- import("astro-eslint-parser"),
16
- interopDefault(import("eslint-plugin-jsx-a11y"))
17
- ]);
18
- return [
19
- {
20
- files,
21
- languageOptions: {
22
- globals: {
23
- ...globals.node,
24
- Astro: false,
25
- Fragment: false
26
- },
27
- parser: astroParser,
28
- parserOptions: {
29
- extraFileExtensions: [".astro"],
30
- parser: parserTs
31
- },
32
- sourceType: "module"
33
- },
34
- name: "jimmy.codes/astro",
35
- plugins: {
36
- "astro": astroPlugin,
37
- "jsx-a11y": jsxA11yPlugin
38
- },
39
- processor: "astro/client-side-ts",
40
- rules: {
41
- ...jsxA11yPlugin.configs.recommended.rules,
42
- "astro/missing-client-only-directive-value": "error",
43
- "astro/no-conflict-set-directives": "error",
44
- "astro/no-deprecated-astro-canonicalurl": "error",
45
- "astro/no-deprecated-astro-fetchcontent": "error",
46
- "astro/no-deprecated-astro-resolve": "error",
47
- "astro/no-deprecated-getentrybyslug": "error",
48
- "astro/no-exports-from-components": "off",
49
- "astro/no-unused-define-vars-in-style": "error",
50
- "astro/valid-compile": "error"
51
- }
52
- },
53
- {
54
- files,
55
- languageOptions: {
56
- parserOptions: configs.disableTypeChecked.languageOptions?.parserOptions
57
- },
58
- name: "jimmy.codes/astro/disable-type-checked",
59
- rules: configs.disableTypeChecked.rules
60
- },
61
- {
62
- name: "jimmy.codes/astro/imports",
63
- settings: {
64
- "import-x/core-modules": ["astro:content"]
65
- }
66
- }
67
- ];
68
- }
69
- export {
70
- astroConfig as default
71
- };
@@ -1,9 +0,0 @@
1
- // src/utils/interop-default.ts
2
- var interopDefault = async (module) => {
3
- const resolved = await module;
4
- return resolved?.default ?? resolved;
5
- };
6
-
7
- export {
8
- interopDefault
9
- };