@infernodesign/eslint-config 1.26.0 → 2.0.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.
- package/dist/cli.js +9 -9
- package/dist/index.d.ts +719 -261
- package/dist/index.js +13 -82
- package/package.json +39 -39
package/dist/index.js
CHANGED
|
@@ -469,7 +469,7 @@ async function disables() {
|
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/configs/e18e.ts
|
|
471
471
|
async function e18e(options = {}) {
|
|
472
|
-
const { isInEditor = false, modernization = true, moduleReplacements = isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
472
|
+
const { isInEditor = false, modernization = true, type = "app", moduleReplacements = type === "lib" && isInEditor, overrides = {}, performanceImprovements = true } = options;
|
|
473
473
|
const configs = pluginE18e.configs;
|
|
474
474
|
return [{
|
|
475
475
|
name: "config/e18e/rules",
|
|
@@ -478,6 +478,12 @@ async function e18e(options = {}) {
|
|
|
478
478
|
...modernization ? { ...configs.modernization.rules } : {},
|
|
479
479
|
...moduleReplacements ? { ...configs.moduleReplacements.rules } : {},
|
|
480
480
|
...performanceImprovements ? { ...configs.performanceImprovements.rules } : {},
|
|
481
|
+
"e18e/prefer-array-at": "off",
|
|
482
|
+
"e18e/prefer-array-from-map": "off",
|
|
483
|
+
"e18e/prefer-array-to-reversed": "off",
|
|
484
|
+
"e18e/prefer-array-to-sorted": "off",
|
|
485
|
+
"e18e/prefer-array-to-spliced": "off",
|
|
486
|
+
"e18e/prefer-spread-syntax": "off",
|
|
481
487
|
...overrides
|
|
482
488
|
}
|
|
483
489
|
}];
|
|
@@ -1750,31 +1756,22 @@ const ReactRouterPackages = [
|
|
|
1750
1756
|
"@react-router/dev"
|
|
1751
1757
|
];
|
|
1752
1758
|
const NextJsPackages = ["next"];
|
|
1753
|
-
const ReactCompilerPackages = ["babel-plugin-react-compiler"];
|
|
1754
1759
|
async function react(options = {}) {
|
|
1755
|
-
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {},
|
|
1760
|
+
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {}, tsconfigPath } = options;
|
|
1756
1761
|
await ensurePackages(["@eslint-react/eslint-plugin", "eslint-plugin-react-refresh"]);
|
|
1757
1762
|
const isTypeAware = !!tsconfigPath;
|
|
1758
|
-
const typeAwareRules = {
|
|
1759
|
-
"react/no-implicit-key": "error",
|
|
1760
|
-
"react/no-leaked-conditional-rendering": "warn"
|
|
1761
|
-
};
|
|
1763
|
+
const typeAwareRules = { "react/no-leaked-conditional-rendering": "error" };
|
|
1762
1764
|
const [pluginReact, pluginReactRefresh] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-react-refresh"))]);
|
|
1763
1765
|
const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some((i) => isPackageExists(i));
|
|
1764
1766
|
const isUsingRemix = RemixPackages.some((i) => isPackageExists(i));
|
|
1765
1767
|
const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists(i));
|
|
1766
1768
|
const isUsingNext = NextJsPackages.some((i) => isPackageExists(i));
|
|
1767
|
-
const plugins = pluginReact.configs.all.plugins;
|
|
1768
1769
|
return [
|
|
1769
1770
|
{
|
|
1770
1771
|
name: "config/react/setup",
|
|
1771
1772
|
plugins: {
|
|
1772
|
-
"react":
|
|
1773
|
-
"react-
|
|
1774
|
-
"react-naming-convention": plugins["@eslint-react/naming-convention"],
|
|
1775
|
-
"react-refresh": pluginReactRefresh,
|
|
1776
|
-
"react-rsc": plugins["@eslint-react/rsc"],
|
|
1777
|
-
"react-web-api": plugins["@eslint-react/web-api"]
|
|
1773
|
+
"react": pluginReact,
|
|
1774
|
+
"react-refresh": pluginReactRefresh
|
|
1778
1775
|
}
|
|
1779
1776
|
},
|
|
1780
1777
|
{
|
|
@@ -1785,70 +1782,8 @@ async function react(options = {}) {
|
|
|
1785
1782
|
},
|
|
1786
1783
|
name: "config/react/rules",
|
|
1787
1784
|
rules: {
|
|
1788
|
-
|
|
1789
|
-
"react/jsx-no-comment-textnodes": "warn",
|
|
1790
|
-
"react/no-access-state-in-setstate": "error",
|
|
1791
|
-
"react/no-array-index-key": "warn",
|
|
1792
|
-
"react/no-children-count": "warn",
|
|
1793
|
-
"react/no-children-for-each": "warn",
|
|
1794
|
-
"react/no-children-map": "warn",
|
|
1795
|
-
"react/no-children-only": "warn",
|
|
1796
|
-
"react/no-children-to-array": "warn",
|
|
1797
|
-
"react/no-clone-element": "warn",
|
|
1798
|
-
"react/no-component-will-mount": "error",
|
|
1799
|
-
"react/no-component-will-receive-props": "error",
|
|
1800
|
-
"react/no-component-will-update": "error",
|
|
1801
|
-
"react/no-context-provider": "warn",
|
|
1802
|
-
"react/no-create-ref": "error",
|
|
1803
|
-
"react/no-direct-mutation-state": "error",
|
|
1804
|
-
"react/no-forward-ref": "warn",
|
|
1805
|
-
"react/no-missing-key": "error",
|
|
1806
|
-
"react/no-nested-component-definitions": "error",
|
|
1807
|
-
"react/no-nested-lazy-component-declarations": "error",
|
|
1808
|
-
"react/no-redundant-should-component-update": "error",
|
|
1809
|
-
"react/no-set-state-in-component-did-mount": "warn",
|
|
1810
|
-
"react/no-set-state-in-component-did-update": "warn",
|
|
1811
|
-
"react/no-set-state-in-component-will-update": "warn",
|
|
1812
|
-
"react/no-unnecessary-use-prefix": "warn",
|
|
1813
|
-
"react/no-unsafe-component-will-mount": "warn",
|
|
1814
|
-
"react/no-unsafe-component-will-receive-props": "warn",
|
|
1815
|
-
"react/no-unsafe-component-will-update": "warn",
|
|
1816
|
-
"react/no-unused-class-component-members": "warn",
|
|
1817
|
-
"react/no-use-context": "warn",
|
|
1818
|
-
"react/set-state-in-effect": "warn",
|
|
1785
|
+
...pluginReact.configs.recommended.rules,
|
|
1819
1786
|
"react/prefer-namespace-import": "error",
|
|
1820
|
-
"react-rsc/function-definition": "error",
|
|
1821
|
-
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
1822
|
-
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
1823
|
-
"react-dom/no-find-dom-node": "error",
|
|
1824
|
-
"react-dom/no-flush-sync": "error",
|
|
1825
|
-
"react-dom/no-hydrate": "error",
|
|
1826
|
-
"react-dom/no-namespace": "error",
|
|
1827
|
-
"react-dom/no-render": "error",
|
|
1828
|
-
"react-dom/no-render-return-value": "error",
|
|
1829
|
-
"react-dom/no-script-url": "warn",
|
|
1830
|
-
"react-dom/no-unsafe-iframe-sandbox": "warn",
|
|
1831
|
-
"react-dom/no-use-form-state": "error",
|
|
1832
|
-
"react-dom/no-void-elements-with-children": "error",
|
|
1833
|
-
"react-naming-convention/context-name": "warn",
|
|
1834
|
-
"react-naming-convention/ref-name": "warn",
|
|
1835
|
-
"react-web-api/no-leaked-event-listener": "warn",
|
|
1836
|
-
"react-web-api/no-leaked-interval": "warn",
|
|
1837
|
-
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1838
|
-
"react-web-api/no-leaked-timeout": "warn",
|
|
1839
|
-
"react/exhaustive-deps": "warn",
|
|
1840
|
-
"react/rules-of-hooks": "error",
|
|
1841
|
-
...reactCompiler ? {
|
|
1842
|
-
"react/component-hook-factories": "error",
|
|
1843
|
-
"react/error-boundaries": "error",
|
|
1844
|
-
"react/immutability": "error",
|
|
1845
|
-
"react/purity": "error",
|
|
1846
|
-
"react/refs": "error",
|
|
1847
|
-
"react/set-state-in-effect": "error",
|
|
1848
|
-
"react/set-state-in-render": "error",
|
|
1849
|
-
"react/unsupported-syntax": "warn",
|
|
1850
|
-
"react/use-memo": "error"
|
|
1851
|
-
} : {},
|
|
1852
1787
|
"react-refresh/only-export-components": ["error", {
|
|
1853
1788
|
allowConstantExport: isAllowConstantExport,
|
|
1854
1789
|
allowExportNames: [...isUsingNext ? [
|
|
@@ -1883,11 +1818,7 @@ async function react(options = {}) {
|
|
|
1883
1818
|
},
|
|
1884
1819
|
{
|
|
1885
1820
|
files: filesTypeAware,
|
|
1886
|
-
name: "config/react/typescript"
|
|
1887
|
-
rules: {
|
|
1888
|
-
"react-dom/no-string-style-prop": "off",
|
|
1889
|
-
"react-dom/no-unknown-property": "off"
|
|
1890
|
-
}
|
|
1821
|
+
name: "config/react/typescript"
|
|
1891
1822
|
},
|
|
1892
1823
|
...isTypeAware ? [{
|
|
1893
1824
|
files: filesTypeAware,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernodesign/eslint-config",
|
|
3
3
|
"description": "ESLint config for Inferno Design.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Inferno Design <support@infernodesign.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,42 +40,42 @@
|
|
|
40
40
|
"build:inspect": "bun run build && bunx @eslint/config-inspector build",
|
|
41
41
|
"dev": "tsdown --watch",
|
|
42
42
|
"gen": "bun run scripts/typegen.ts && bun run scripts/versiongen.ts",
|
|
43
|
-
"lint": "eslint . --cache --cache-location node_modules/.cache/.eslintcache",
|
|
43
|
+
"lint": "eslint . --cache --cache-location node_modules/.cache/.eslintcache --quiet",
|
|
44
44
|
"prepack": "bun run build",
|
|
45
45
|
"test": "vitest",
|
|
46
46
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@antfu/install-pkg": "1.1.0",
|
|
50
|
-
"@clack/prompts": "1.
|
|
51
|
-
"@e18e/eslint-plugin": "0.
|
|
50
|
+
"@clack/prompts": "1.2.0",
|
|
51
|
+
"@e18e/eslint-plugin": "0.3.0",
|
|
52
52
|
"@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
|
|
53
|
-
"@eslint/compat": "2.0.
|
|
54
|
-
"@eslint/config-array": "0.23.
|
|
55
|
-
"@eslint/config-helpers": "0.5.
|
|
56
|
-
"@eslint/markdown": "
|
|
53
|
+
"@eslint/compat": "2.0.5",
|
|
54
|
+
"@eslint/config-array": "0.23.5",
|
|
55
|
+
"@eslint/config-helpers": "0.5.5",
|
|
56
|
+
"@eslint/markdown": "8.0.1",
|
|
57
57
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
59
|
-
"@typescript-eslint/parser": "8.
|
|
60
|
-
"@typescript-eslint/utils": "8.
|
|
61
|
-
"@vitest/eslint-plugin": "1.6.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "8.58.1",
|
|
59
|
+
"@typescript-eslint/parser": "8.58.1",
|
|
60
|
+
"@typescript-eslint/utils": "8.58.1",
|
|
61
|
+
"@vitest/eslint-plugin": "1.6.14",
|
|
62
62
|
"ansis": "4.2.0",
|
|
63
63
|
"cac": "7.0.0",
|
|
64
|
-
"eslint-config-flat-gitignore": "2.
|
|
65
|
-
"eslint-flat-config-utils": "3.0
|
|
64
|
+
"eslint-config-flat-gitignore": "2.3.0",
|
|
65
|
+
"eslint-flat-config-utils": "3.1.0",
|
|
66
66
|
"eslint-merge-processors": "2.0.0",
|
|
67
67
|
"eslint-plugin-antfu": "3.2.2",
|
|
68
68
|
"eslint-plugin-command": "3.5.2",
|
|
69
69
|
"eslint-plugin-import-lite": "0.6.0",
|
|
70
|
-
"eslint-plugin-jsdoc": "62.
|
|
70
|
+
"eslint-plugin-jsdoc": "62.9.0",
|
|
71
71
|
"eslint-plugin-jsonc": "3.1.2",
|
|
72
72
|
"eslint-plugin-n": "17.24.0",
|
|
73
73
|
"eslint-plugin-no-only-tests": "3.3.0",
|
|
74
|
-
"eslint-plugin-perfectionist": "5.
|
|
74
|
+
"eslint-plugin-perfectionist": "5.8.0",
|
|
75
75
|
"eslint-plugin-pnpm": "1.6.0",
|
|
76
76
|
"eslint-plugin-regexp": "3.1.0",
|
|
77
77
|
"eslint-plugin-toml": "1.3.1",
|
|
78
|
-
"eslint-plugin-unicorn": "
|
|
78
|
+
"eslint-plugin-unicorn": "64.0.0",
|
|
79
79
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
80
80
|
"eslint-plugin-vue": "10.8.0",
|
|
81
81
|
"eslint-plugin-yml": "3.3.1",
|
|
@@ -89,25 +89,25 @@
|
|
|
89
89
|
"yaml-eslint-parser": "2.0.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@eslint-react/eslint-plugin": "
|
|
92
|
+
"@eslint-react/eslint-plugin": "4.2.3",
|
|
93
93
|
"@eslint/config-inspector": "1.5.0",
|
|
94
94
|
"@infernodesign/typescript-config": "workspace:*",
|
|
95
|
-
"@next/eslint-plugin-next": "16.2.
|
|
95
|
+
"@next/eslint-plugin-next": "16.2.2",
|
|
96
96
|
"@prettier/plugin-xml": "3.4.2",
|
|
97
97
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
98
|
-
"@types/node": "25.5.
|
|
99
|
-
"@unocss/eslint-plugin": "66.6.
|
|
100
|
-
"astro-eslint-parser": "1.
|
|
101
|
-
"eslint": "10.
|
|
102
|
-
"eslint-plugin-astro": "1.
|
|
98
|
+
"@types/node": "25.5.2",
|
|
99
|
+
"@unocss/eslint-plugin": "66.6.8",
|
|
100
|
+
"astro-eslint-parser": "1.4.0",
|
|
101
|
+
"eslint": "10.2.0",
|
|
102
|
+
"eslint-plugin-astro": "1.7.0",
|
|
103
103
|
"eslint-plugin-better-tailwindcss": "4.3.2",
|
|
104
104
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
105
105
|
"eslint-plugin-format": "2.0.1",
|
|
106
106
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
107
107
|
"eslint-plugin-react-refresh": "0.5.2",
|
|
108
108
|
"eslint-plugin-solid": "0.14.5",
|
|
109
|
-
"eslint-plugin-storybook": "10.3.
|
|
110
|
-
"eslint-plugin-svelte": "3.
|
|
109
|
+
"eslint-plugin-storybook": "10.3.5",
|
|
110
|
+
"eslint-plugin-svelte": "3.17.0",
|
|
111
111
|
"eslint-plugin-vuejs-accessibility": "2.5.0",
|
|
112
112
|
"eslint-typegen": "2.3.1",
|
|
113
113
|
"execa": "9.6.1",
|
|
@@ -116,30 +116,30 @@
|
|
|
116
116
|
"pnpm-workspace-yaml": "1.6.0",
|
|
117
117
|
"prettier-plugin-astro": "0.14.1",
|
|
118
118
|
"prettier-plugin-slidev": "1.0.5",
|
|
119
|
-
"svelte": "5.
|
|
119
|
+
"svelte": "5.55.2",
|
|
120
120
|
"svelte-eslint-parser": "1.6.0",
|
|
121
|
-
"tinyglobby": "0.2.
|
|
122
|
-
"tsdown": "0.21.
|
|
121
|
+
"tinyglobby": "0.2.16",
|
|
122
|
+
"tsdown": "0.21.7",
|
|
123
123
|
"typescript": "5.9.3",
|
|
124
|
-
"vitest": "4.1.
|
|
125
|
-
"vue": "3.5.
|
|
124
|
+
"vitest": "4.1.3",
|
|
125
|
+
"vue": "3.5.32"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"@eslint-react/eslint-plugin": "^
|
|
129
|
-
"@next/eslint-plugin-next": "^16.2.
|
|
128
|
+
"@eslint-react/eslint-plugin": "^4.2.3",
|
|
129
|
+
"@next/eslint-plugin-next": "^16.2.2",
|
|
130
130
|
"@prettier/plugin-xml": "^3.4.2",
|
|
131
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
132
|
-
"astro-eslint-parser": "^1.
|
|
133
|
-
"eslint": "^10.
|
|
134
|
-
"eslint-plugin-astro": "^1.
|
|
131
|
+
"@unocss/eslint-plugin": "^66.6.8",
|
|
132
|
+
"astro-eslint-parser": "^1.4.0",
|
|
133
|
+
"eslint": "^10.2.0",
|
|
134
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
135
135
|
"eslint-plugin-better-tailwindcss": "^4.3.2",
|
|
136
136
|
"eslint-plugin-erasable-syntax-only": "^0.4.0",
|
|
137
137
|
"eslint-plugin-format": "^2.0.1",
|
|
138
138
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
139
139
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
140
140
|
"eslint-plugin-solid": "^0.14.5",
|
|
141
|
-
"eslint-plugin-storybook": "^10.3.
|
|
142
|
-
"eslint-plugin-svelte": "^3.
|
|
141
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
142
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
143
143
|
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
144
144
|
"prettier-plugin-astro": "^0.14.1",
|
|
145
145
|
"prettier-plugin-slidev": "^1.0.5",
|