@dimensional-innovations/tool-config 5.0.1 → 6.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/astro-6WHBKQFX.js +43 -0
- package/dist/astro-6WHBKQFX.js.map +1 -0
- package/dist/chunk-AKQIWLRC.js +446 -0
- package/dist/chunk-AKQIWLRC.js.map +1 -0
- package/dist/chunk-HAVDVZO3.js +624 -0
- package/dist/chunk-HAVDVZO3.js.map +1 -0
- package/dist/chunk-HUYPX7RZ.js +125 -0
- package/dist/chunk-HUYPX7RZ.js.map +1 -0
- package/dist/chunk-L7IN57ZC.js +167 -0
- package/dist/chunk-L7IN57ZC.js.map +1 -0
- package/dist/chunk-LRQFF2N5.js +141 -0
- package/dist/chunk-LRQFF2N5.js.map +1 -0
- package/dist/chunk-NRDWX5HH.js +363 -0
- package/dist/chunk-NRDWX5HH.js.map +1 -0
- package/dist/chunk-OMQFJOZZ.js +48 -0
- package/dist/chunk-OMQFJOZZ.js.map +1 -0
- package/dist/cli/index.js +72 -55
- package/dist/cli/index.js.map +1 -1
- package/dist/eslint-DXHSX6VW.js +5 -0
- package/dist/eslint-DXHSX6VW.js.map +1 -0
- package/dist/index.js +14 -2589
- package/dist/index.js.map +1 -1
- package/dist/prettier-EYWEBRIS.js +4 -0
- package/dist/prettier-EYWEBRIS.js.map +1 -0
- package/dist/react-YIKJI3VA.js +91 -0
- package/dist/react-YIKJI3VA.js.map +1 -0
- package/dist/semantic-release-7XCPBEKO.js +4 -0
- package/dist/semantic-release-7XCPBEKO.js.map +1 -0
- package/dist/solid-F44BEBBP.js +54 -0
- package/dist/solid-F44BEBBP.js.map +1 -0
- package/dist/stylelint-UAZHFIUD.js +5 -0
- package/dist/stylelint-UAZHFIUD.js.map +1 -0
- package/dist/svelte-XEOX6WAQ.js +56 -0
- package/dist/svelte-XEOX6WAQ.js.map +1 -0
- package/dist/typescript-G4HYJJ7T.js +4 -0
- package/dist/typescript-G4HYJJ7T.js.map +1 -0
- package/dist/vue-DP7MCMOU.js +144 -0
- package/dist/vue-DP7MCMOU.js.map +1 -0
- package/package.json +12 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/eslint/presets/frameworks/react.ts"],"names":[],"mappings":";;;;;AAUe,SAAR,iBAAA,GAAyD;AAC9D,EAAA,OAAO;AAAA;AAAA,IAEL,KAAA,CAAM,QAAQ,IAAA,CAAK,WAAA;AAAA,IACnB,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,aAAa,CAAA;AAAA;AAAA;AAAA,IAGhC;AAAA,MACE,KAAA,EAAO,CAAC,SAAA,EAAW,UAAA,EAAY,WAAW,UAAU,CAAA;AAAA,MACpD,OAAA,EAAS;AAAA,QACP,aAAA,EAAe;AAAA,OACjB;AAAA,MACA,KAAA,EAAO,UAAA,CAAW,OAAA,CAAQ,WAAA,CAAY;AAAA,KACxC;AAAA;AAAA,IAGA;AAAA,MACE,KAAA,EAAO,CAAC,SAAA,EAAW,UAAA,EAAY,WAAW,UAAU,CAAA;AAAA,MACpD,QAAA,EAAU;AAAA,QACR,KAAA,EAAO;AAAA,UACL,OAAA,EAAS;AAAA;AAAA;AACX,OACF;AAAA,MACA,KAAA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQL,0BAAA,EAA4B,KAAA;AAAA;AAAA,QAC5B,sBAAA,EAAwB,KAAA;AAAA;AAAA;AAAA,QAGxB,kBAAA,EAAoB,KAAA;AAAA;AAAA;AAAA,QAGpB,qBAAA,EAAuB,OAAA;AAAA;AAAA,QACvB,gCAAA,EAAkC,CAAC,OAAA,EAAS,EAAE,OAAO,OAAA,EAAS,QAAA,EAAU,SAAS,CAAA;AAAA;AAAA,QACjF,yBAAA,EAA2B,OAAA;AAAA;AAAA,QAC3B,yBAAA,EAA2B,CAAC,OAAA,EAAS,OAAO,CAAA;AAAA;AAAA,QAC5C,qBAAA,EAAuB,CAAC,OAAA,EAAS,QAAQ,CAAA;AAAA;AAAA,QACzC,+BAAA,EAAiC,OAAA;AAAA;AAAA;AAAA,QAGjC,qCAAA,EAAuC;AAAA,UACrC,OAAA;AAAA,UACA;AAAA,YACE,eAAA,EAAiB,gBAAA;AAAA;AAAA,YACjB,iBAAA,EAAmB;AAAA;AACrB,SACF;AAAA;AAAA;AAAA;AAAA;AAAA,QAOA,0BAAA,EAA4B,MAAA;AAAA;AAAA,QAC5B,eAAA,EAAiB,OAAA;AAAA;AAAA,QACjB,wBAAA,EAA0B,OAAA;AAAA;AAAA,QAC1B,iBAAA,EAAmB,MAAA;AAAA;AAAA,QACnB,qBAAA,EAAuB,OAAA;AAAA;AAAA,QACvB,2BAAA,EAA6B;AAAA;AAAA;AAC/B,KACF;AAAA;AAAA;AAAA,IAIA;AAAA,GACF;AACF","file":"react-YIKJI3VA.js","sourcesContent":["import prettierConfig from 'eslint-config-prettier'\nimport react from 'eslint-plugin-react'\nimport reactHooks from 'eslint-plugin-react-hooks'\n\nimport type { EslintFlatConfig } from '#core/types.js'\n\n/**\n * React configuration (conservative)\n * Includes React + React Hooks plugins with essential rules\n */\nexport default function createReactPreset(): EslintFlatConfig[] {\n return [\n // React recommended configuration\n react.configs.flat.recommended,\n react.configs.flat['jsx-runtime'], // Disable React-in-scope for React 17+\n\n // React Hooks rules\n {\n files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],\n plugins: {\n 'react-hooks': reactHooks\n },\n rules: reactHooks.configs.recommended.rules\n },\n\n // Custom opinionated React rules\n {\n files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],\n settings: {\n react: {\n version: 'detect' // Automatically detect React version\n }\n },\n rules: {\n // ============================================================\n // REACT RULES (Conservative - Essential Only)\n // React best practices for modern React 17+\n // Documentation: https://github.com/jsx-eslint/eslint-plugin-react\n // ============================================================\n\n // Modern React (17+) adjustments\n 'react/react-in-jsx-scope': 'off', // Not needed in React 17+ with new JSX transform\n 'react/jsx-uses-react': 'off', // Not needed in React 17+ with new JSX transform\n\n // TypeScript integration\n 'react/prop-types': 'off', // TypeScript handles prop validation\n\n // JSX best practices\n 'react/jsx-uses-vars': 'error', // Prevent variables used in JSX being marked as unused\n 'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }], // Use strings when possible: prop=\"value\" not prop={\"value\"}\n 'react/self-closing-comp': 'error', // Use <Component /> instead of <Component></Component>\n 'react/jsx-boolean-value': ['error', 'never'], // Use prop instead of prop={true}\n 'react/jsx-fragments': ['error', 'syntax'], // Use <> instead of <Fragment>\n 'react/jsx-no-useless-fragment': 'error', // Disallow unnecessary fragments\n\n // Component definition\n 'react/function-component-definition': [\n 'error',\n {\n namedComponents: 'arrow-function', // const Component = () => ...\n unnamedComponents: 'arrow-function'\n }\n ],\n\n // Hooks (enforced by react-hooks plugin)\n // - react-hooks/rules-of-hooks: error\n // - react-hooks/exhaustive-deps: warn\n\n // Best practices\n 'react/no-array-index-key': 'warn', // Warn when using array index as key (can cause issues)\n 'react/jsx-key': 'error', // Require key prop in iterators\n 'react/no-children-prop': 'error', // Prevent passing children as props\n 'react/no-danger': 'warn', // Warn on dangerouslySetInnerHTML (XSS risk)\n 'react/no-deprecated': 'error', // Prevent usage of deprecated methods\n 'react/no-unknown-property': 'error' // Prevent usage of unknown DOM properties\n }\n },\n\n // Disable all formatting rules that conflict with Prettier\n // This must be last to override any formatting rules from above\n prettierConfig\n ]\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"semantic-release-7XCPBEKO.js"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
2
|
+
import solid from 'eslint-plugin-solid/configs/typescript';
|
|
3
|
+
|
|
4
|
+
// src/tools/eslint/presets/frameworks/solid.ts
|
|
5
|
+
function createSolidPreset() {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
files: ["**/*.jsx", "**/*.tsx"],
|
|
9
|
+
...solid,
|
|
10
|
+
rules: {
|
|
11
|
+
...solid.rules,
|
|
12
|
+
// Reactive Primitives (7 rules)
|
|
13
|
+
"solid/reactivity": "error",
|
|
14
|
+
// Enforce reactive dependencies
|
|
15
|
+
"solid/no-destructure": "error",
|
|
16
|
+
// Don't destructure props (loses reactivity)
|
|
17
|
+
"solid/prefer-for": "error",
|
|
18
|
+
// Use <For> over .map()
|
|
19
|
+
"solid/no-innerhtml": ["error", { allowStatic: true }],
|
|
20
|
+
// Prevent XSS
|
|
21
|
+
"solid/event-handlers": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
// Consistent event handler naming
|
|
25
|
+
ignoreCase: false,
|
|
26
|
+
warnOnSpread: false
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"solid/jsx-no-undef": "error",
|
|
30
|
+
// Undefined components
|
|
31
|
+
"solid/jsx-uses-vars": "error",
|
|
32
|
+
// Mark JSX vars as used
|
|
33
|
+
// Component Best Practices (5 rules)
|
|
34
|
+
"solid/components-return-once": "error",
|
|
35
|
+
// Single return per component
|
|
36
|
+
"solid/no-unknown-namespaces": "error",
|
|
37
|
+
// Validate JSX namespaces
|
|
38
|
+
"solid/prefer-show": "error",
|
|
39
|
+
// Use <Show> over ternary
|
|
40
|
+
"solid/self-closing-comp": "error",
|
|
41
|
+
// Self-close components without children
|
|
42
|
+
"solid/style-prop": ["error", { styleProps: ["style", "css"] }]
|
|
43
|
+
// Validate style prop
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
// Disable all formatting rules that conflict with Prettier
|
|
47
|
+
// This must be last to override any formatting rules from above
|
|
48
|
+
prettierConfig
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { createSolidPreset as default };
|
|
53
|
+
//# sourceMappingURL=solid-F44BEBBP.js.map
|
|
54
|
+
//# sourceMappingURL=solid-F44BEBBP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/eslint/presets/frameworks/solid.ts"],"names":[],"mappings":";;;;AAce,SAAR,iBAAA,GAAyD;AAC9D,EAAA,OAAO;AAAA,IACL;AAAA,MACE,KAAA,EAAO,CAAC,UAAA,EAAY,UAAU,CAAA;AAAA,MAC9B,GAAG,KAAA;AAAA,MACH,KAAA,EAAO;AAAA,QACL,GAAG,KAAA,CAAM,KAAA;AAAA;AAAA,QAGT,kBAAA,EAAoB,OAAA;AAAA;AAAA,QACpB,sBAAA,EAAwB,OAAA;AAAA;AAAA,QACxB,kBAAA,EAAoB,OAAA;AAAA;AAAA,QACpB,sBAAsB,CAAC,OAAA,EAAS,EAAE,WAAA,EAAa,MAAM,CAAA;AAAA;AAAA,QACrD,sBAAA,EAAwB;AAAA,UACtB,OAAA;AAAA,UACA;AAAA;AAAA,YAEE,UAAA,EAAY,KAAA;AAAA,YACZ,YAAA,EAAc;AAAA;AAChB,SACF;AAAA,QACA,oBAAA,EAAsB,OAAA;AAAA;AAAA,QACtB,qBAAA,EAAuB,OAAA;AAAA;AAAA;AAAA,QAGvB,8BAAA,EAAgC,OAAA;AAAA;AAAA,QAChC,6BAAA,EAA+B,OAAA;AAAA;AAAA,QAC/B,mBAAA,EAAqB,OAAA;AAAA;AAAA,QACrB,yBAAA,EAA2B,OAAA;AAAA;AAAA,QAC3B,kBAAA,EAAoB,CAAC,OAAA,EAAS,EAAE,YAAY,CAAC,OAAA,EAAS,KAAK,CAAA,EAAG;AAAA;AAAA;AAChE,KACF;AAAA;AAAA;AAAA,IAIA;AAAA,GACF;AACF","file":"solid-F44BEBBP.js","sourcesContent":["import prettierConfig from 'eslint-config-prettier'\nimport solid from 'eslint-plugin-solid/configs/typescript'\n\nimport type { EslintFlatConfig } from '#core/types.js'\n\n/**\n * Solid.js framework configuration\n * Conservative rules for Solid reactive primitives and JSX\n *\n * Rules organized by category:\n * - Reactive primitives (signals, effects, memos)\n * - JSX best practices\n * - Component patterns\n */\nexport default function createSolidPreset(): EslintFlatConfig[] {\n return [\n {\n files: ['**/*.jsx', '**/*.tsx'],\n ...solid,\n rules: {\n ...solid.rules,\n\n // Reactive Primitives (7 rules)\n 'solid/reactivity': 'error', // Enforce reactive dependencies\n 'solid/no-destructure': 'error', // Don't destructure props (loses reactivity)\n 'solid/prefer-for': 'error', // Use <For> over .map()\n 'solid/no-innerhtml': ['error', { allowStatic: true }], // Prevent XSS\n 'solid/event-handlers': [\n 'error',\n {\n // Consistent event handler naming\n ignoreCase: false,\n warnOnSpread: false\n }\n ],\n 'solid/jsx-no-undef': 'error', // Undefined components\n 'solid/jsx-uses-vars': 'error', // Mark JSX vars as used\n\n // Component Best Practices (5 rules)\n 'solid/components-return-once': 'error', // Single return per component\n 'solid/no-unknown-namespaces': 'error', // Validate JSX namespaces\n 'solid/prefer-show': 'error', // Use <Show> over ternary\n 'solid/self-closing-comp': 'error', // Self-close components without children\n 'solid/style-prop': ['error', { styleProps: ['style', 'css'] }] // Validate style prop\n }\n },\n\n // Disable all formatting rules that conflict with Prettier\n // This must be last to override any formatting rules from above\n prettierConfig\n ]\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"stylelint-UAZHFIUD.js"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
2
|
+
import svelte from 'eslint-plugin-svelte';
|
|
3
|
+
import svelteParser from 'svelte-eslint-parser';
|
|
4
|
+
import tseslint from 'typescript-eslint';
|
|
5
|
+
|
|
6
|
+
// src/tools/eslint/presets/frameworks/svelte.ts
|
|
7
|
+
function createSveltePreset() {
|
|
8
|
+
return [
|
|
9
|
+
...svelte.configs["flat/recommended"],
|
|
10
|
+
{
|
|
11
|
+
files: ["**/*.svelte"],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
parser: svelteParser,
|
|
14
|
+
parserOptions: {
|
|
15
|
+
parser: tseslint.parser,
|
|
16
|
+
extraFileExtensions: [".svelte"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
rules: {
|
|
20
|
+
// Core Svelte Best Practices (7 rules)
|
|
21
|
+
"svelte/no-at-html-tags": "error",
|
|
22
|
+
"svelte/no-target-blank": "error",
|
|
23
|
+
"svelte/no-reactive-reassign": "error",
|
|
24
|
+
"svelte/require-store-reactive-access": "error",
|
|
25
|
+
"svelte/valid-compile": "error",
|
|
26
|
+
"svelte/no-unused-svelte-ignore": "error",
|
|
27
|
+
"svelte/no-useless-mustaches": "error",
|
|
28
|
+
"svelte/require-optimized-style-attribute": "error",
|
|
29
|
+
// Svelte 5 (runes mode) - 4 rules
|
|
30
|
+
"svelte/block-lang": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
script: "ts",
|
|
34
|
+
style: null
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"svelte/no-dom-manipulating": "error",
|
|
38
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
39
|
+
"svelte/no-store-async": "error",
|
|
40
|
+
// Code Style (3 rules - formatting rules removed, handled by Prettier)
|
|
41
|
+
"svelte/shorthand-attribute": "error",
|
|
42
|
+
"svelte/shorthand-directive": "error",
|
|
43
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": "error"
|
|
44
|
+
// Note: svelte/html-quotes, svelte/indent, svelte/first-attribute-linebreak
|
|
45
|
+
// are formatting rules disabled by eslint-config-prettier
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
// Disable all formatting rules that conflict with Prettier
|
|
49
|
+
// This must be last to override any formatting rules from above
|
|
50
|
+
prettierConfig
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { createSveltePreset as default };
|
|
55
|
+
//# sourceMappingURL=svelte-XEOX6WAQ.js.map
|
|
56
|
+
//# sourceMappingURL=svelte-XEOX6WAQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/eslint/presets/frameworks/svelte.ts"],"names":[],"mappings":";;;;;;AAkBe,SAAR,kBAAA,GAA0D;AAC/D,EAAA,OAAO;AAAA,IACL,GAAG,MAAA,CAAO,OAAA,CAAQ,kBAAkB,CAAA;AAAA,IACpC;AAAA,MACE,KAAA,EAAO,CAAC,aAAa,CAAA;AAAA,MACrB,eAAA,EAAiB;AAAA,QACf,MAAA,EAAQ,YAAA;AAAA,QACR,aAAA,EAAe;AAAA,UACb,QAAQ,QAAA,CAAS,MAAA;AAAA,UACjB,mBAAA,EAAqB,CAAC,SAAS;AAAA;AACjC,OACF;AAAA,MACA,KAAA,EAAO;AAAA;AAAA,QAEL,wBAAA,EAA0B,OAAA;AAAA,QAC1B,wBAAA,EAA0B,OAAA;AAAA,QAC1B,6BAAA,EAA+B,OAAA;AAAA,QAC/B,sCAAA,EAAwC,OAAA;AAAA,QACxC,sBAAA,EAAwB,OAAA;AAAA,QACxB,gCAAA,EAAkC,OAAA;AAAA,QAClC,6BAAA,EAA+B,OAAA;AAAA,QAC/B,0CAAA,EAA4C,OAAA;AAAA;AAAA,QAG5C,mBAAA,EAAqB;AAAA,UACnB,OAAA;AAAA,UACA;AAAA,YACE,MAAA,EAAQ,IAAA;AAAA,YACR,KAAA,EAAO;AAAA;AACT,SACF;AAAA,QACA,4BAAA,EAA8B,OAAA;AAAA,QAC9B,qDAAA,EAAuD,OAAA;AAAA,QACvD,uBAAA,EAAyB,OAAA;AAAA;AAAA,QAGzB,4BAAA,EAA8B,OAAA;AAAA,QAC9B,4BAAA,EAA8B,OAAA;AAAA,QAC9B,kDAAA,EAAoD;AAAA;AAAA;AAAA;AAGtD,KACF;AAAA;AAAA;AAAA,IAIA;AAAA,GACF;AACF","file":"svelte-XEOX6WAQ.js","sourcesContent":["import prettierConfig from 'eslint-config-prettier'\nimport svelte from 'eslint-plugin-svelte'\nimport svelteParser from 'svelte-eslint-parser'\nimport tseslint from 'typescript-eslint'\n\nimport type { EslintFlatConfig } from '#core/types.js'\n\n/**\n * Svelte.js framework configuration\n * Comprehensive rules for Svelte 5 (runes, snippets) and SvelteKit projects\n *\n * Rules organized by category:\n * - Core Svelte best practices\n * - Svelte 5 runes mode\n * - Code style and formatting\n *\n * Note: Accessibility checks are handled by Svelte compiler warnings via svelte/valid-compile\n */\nexport default function createSveltePreset(): EslintFlatConfig[] {\n return [\n ...svelte.configs['flat/recommended'],\n {\n files: ['**/*.svelte'],\n languageOptions: {\n parser: svelteParser,\n parserOptions: {\n parser: tseslint.parser,\n extraFileExtensions: ['.svelte']\n }\n },\n rules: {\n // Core Svelte Best Practices (7 rules)\n 'svelte/no-at-html-tags': 'error',\n 'svelte/no-target-blank': 'error',\n 'svelte/no-reactive-reassign': 'error',\n 'svelte/require-store-reactive-access': 'error',\n 'svelte/valid-compile': 'error',\n 'svelte/no-unused-svelte-ignore': 'error',\n 'svelte/no-useless-mustaches': 'error',\n 'svelte/require-optimized-style-attribute': 'error',\n\n // Svelte 5 (runes mode) - 4 rules\n 'svelte/block-lang': [\n 'error',\n {\n script: 'ts',\n style: null\n }\n ],\n 'svelte/no-dom-manipulating': 'error',\n 'svelte/no-export-load-in-svelte-module-in-kit-pages': 'error',\n 'svelte/no-store-async': 'error',\n\n // Code Style (3 rules - formatting rules removed, handled by Prettier)\n 'svelte/shorthand-attribute': 'error',\n 'svelte/shorthand-directive': 'error',\n 'svelte/no-spaces-around-equal-signs-in-attribute': 'error'\n // Note: svelte/html-quotes, svelte/indent, svelte/first-attribute-linebreak\n // are formatting rules disabled by eslint-config-prettier\n }\n },\n\n // Disable all formatting rules that conflict with Prettier\n // This must be last to override any formatting rules from above\n prettierConfig\n ]\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"typescript-G4HYJJ7T.js"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
2
|
+
import vuePlugin from 'eslint-plugin-vue';
|
|
3
|
+
import tseslint from 'typescript-eslint';
|
|
4
|
+
import vueParser from 'vue-eslint-parser';
|
|
5
|
+
|
|
6
|
+
// src/tools/eslint/presets/frameworks/vue.ts
|
|
7
|
+
var vueCustomRules = {
|
|
8
|
+
// Component naming
|
|
9
|
+
"vue/component-name-in-template-casing": ["error", "PascalCase"],
|
|
10
|
+
"vue/multi-word-component-names": "off",
|
|
11
|
+
"vue/component-definition-name-casing": ["error", "PascalCase"],
|
|
12
|
+
// Template best practices
|
|
13
|
+
"vue/html-self-closing": [
|
|
14
|
+
"error",
|
|
15
|
+
{
|
|
16
|
+
html: {
|
|
17
|
+
void: "any",
|
|
18
|
+
normal: "always",
|
|
19
|
+
component: "always"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"vue/max-attributes-per-line": [
|
|
24
|
+
"error",
|
|
25
|
+
{
|
|
26
|
+
singleline: 3,
|
|
27
|
+
multiline: 1
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"vue/first-attribute-linebreak": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
singleline: "ignore",
|
|
34
|
+
multiline: "below"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"vue/html-closing-bracket-newline": [
|
|
38
|
+
"error",
|
|
39
|
+
{
|
|
40
|
+
singleline: "never",
|
|
41
|
+
multiline: "always"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
// Disable formatting rules that conflict with Prettier
|
|
45
|
+
"vue/multiline-html-element-content-newline": "off",
|
|
46
|
+
"vue/singleline-html-element-content-newline": "off",
|
|
47
|
+
// Vue 3 Composition API
|
|
48
|
+
"vue/no-deprecated-v-on-native-modifier": "error",
|
|
49
|
+
"vue/no-deprecated-slot-attribute": "error",
|
|
50
|
+
"vue/require-explicit-emits": "error",
|
|
51
|
+
"vue/no-setup-props-reactivity-loss": "error",
|
|
52
|
+
"vue/component-api-style": ["error", ["script-setup"]],
|
|
53
|
+
"vue/define-macros-order": [
|
|
54
|
+
"error",
|
|
55
|
+
{
|
|
56
|
+
order: ["defineProps", "defineEmits"]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"vue/define-emits-declaration": ["error", "type-based"],
|
|
60
|
+
// Directives
|
|
61
|
+
"vue/no-v-html": "warn",
|
|
62
|
+
"vue/v-on-event-hyphenation": ["error", "always"],
|
|
63
|
+
"vue/v-bind-style": ["error", "shorthand"],
|
|
64
|
+
"vue/v-on-style": ["error", "shorthand"],
|
|
65
|
+
// Attributes
|
|
66
|
+
"vue/attribute-hyphenation": ["error", "always"],
|
|
67
|
+
"vue/prop-name-casing": ["error", "camelCase"],
|
|
68
|
+
// Order and organization
|
|
69
|
+
"vue/order-in-components": [
|
|
70
|
+
"error",
|
|
71
|
+
{
|
|
72
|
+
order: [
|
|
73
|
+
"el",
|
|
74
|
+
"name",
|
|
75
|
+
"parent",
|
|
76
|
+
"functional",
|
|
77
|
+
["delimiters", "comments"],
|
|
78
|
+
["components", "directives", "filters"],
|
|
79
|
+
"extends",
|
|
80
|
+
"mixins",
|
|
81
|
+
"inheritAttrs",
|
|
82
|
+
"model",
|
|
83
|
+
["props", "propsData"],
|
|
84
|
+
"data",
|
|
85
|
+
"computed",
|
|
86
|
+
"watch",
|
|
87
|
+
"LIFECYCLE_HOOKS",
|
|
88
|
+
"methods",
|
|
89
|
+
["template", "render"],
|
|
90
|
+
"renderError"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
function createVuePreset() {
|
|
96
|
+
return [
|
|
97
|
+
// Vue recommended configuration (flat config)
|
|
98
|
+
...vuePlugin.configs["flat/recommended"],
|
|
99
|
+
// Vue-specific custom rules
|
|
100
|
+
{
|
|
101
|
+
files: ["**/*.vue", "**/*.js", "**/*.ts", "**/*.tsx"],
|
|
102
|
+
rules: vueCustomRules
|
|
103
|
+
},
|
|
104
|
+
// Vue-specific parser configuration for TypeScript in <script> tags
|
|
105
|
+
// We must explicitly set vue-eslint-parser as the main parser, then configure
|
|
106
|
+
// it to use TypeScript parser for <script> blocks via parserOptions.parser
|
|
107
|
+
{
|
|
108
|
+
files: ["**/*.vue"],
|
|
109
|
+
languageOptions: {
|
|
110
|
+
parser: vueParser,
|
|
111
|
+
parserOptions: {
|
|
112
|
+
parser: tseslint.parser,
|
|
113
|
+
extraFileExtensions: [".vue"],
|
|
114
|
+
ecmaVersion: "latest",
|
|
115
|
+
sourceType: "module"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
// Disable TypeScript naming convention for Vue files (allows onUpdate:modelValue pattern)
|
|
120
|
+
// IMPORTANT: Must also set parser to maintain vue-eslint-parser
|
|
121
|
+
{
|
|
122
|
+
files: ["**/*.vue"],
|
|
123
|
+
languageOptions: {
|
|
124
|
+
parser: vueParser,
|
|
125
|
+
parserOptions: {
|
|
126
|
+
parser: tseslint.parser,
|
|
127
|
+
extraFileExtensions: [".vue"],
|
|
128
|
+
ecmaVersion: "latest",
|
|
129
|
+
sourceType: "module"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
rules: {
|
|
133
|
+
"@typescript-eslint/naming-convention": "off"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
// Disable all formatting rules that conflict with Prettier
|
|
137
|
+
// This must be last to override any formatting rules from above
|
|
138
|
+
prettierConfig
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { createVuePreset as default };
|
|
143
|
+
//# sourceMappingURL=vue-DP7MCMOU.js.map
|
|
144
|
+
//# sourceMappingURL=vue-DP7MCMOU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/eslint/presets/frameworks/vue.ts"],"names":[],"mappings":";;;;;;AAYA,IAAM,cAAA,GAA0C;AAAA;AAAA,EAE9C,uCAAA,EAAyC,CAAC,OAAA,EAAS,YAAY,CAAA;AAAA,EAC/D,gCAAA,EAAkC,KAAA;AAAA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AIA;AAAA,MACE,KAAA,EAAO,CAAC,UAAU,CAAA;AAAA,MAClB,eAAA,EAAiB;AAAA,QACf,MAAA,EAAQ,SAAA;AAAA,QACR,aAAA,EAAe;AAAA,UACb,QAAQ,QAAA,CAAS,MAAA;AAAA,UACjB,mBAAA,EAAqB,CAAC,MAAM,CAAA;AAAA,UAC5B,WAAA,EAAa,QAAA;AAAA,UACb,UAAA,EAAY;AAAA;AACd,OACF;AAAA,MACA,KAAA,EAAO;AAAA,QACL,sCAAA,EAAwC;AAAA;AAC1C,KACF;AAAA;AAAA;AAAA,IAIA;AAAA,GACF;AACF","file":"vue-DP7MCMOU.js","sourcesContent":["import prettierConfig from 'eslint-config-prettier'\nimport vuePlugin from 'eslint-plugin-vue'\nimport tseslint from 'typescript-eslint'\nimport vueParser from 'vue-eslint-parser'\n\nimport type { EslintFlatConfig } from '#core/types.js'\n\n/**\n * Vue.js 3 custom rules\n * Vue 3 best practices and conventions\n * Documentation: https://eslint.vuejs.org/rules/\n */\nconst vueCustomRules: Record<string, unknown> = {\n // Component naming\n 'vue/component-name-in-template-casing': ['error', 'PascalCase'],\n 'vue/multi-word-component-names': 'off',\n 'vue/component-definition-name-casing': ['error', 'PascalCase'],\n\n // Template best practices\n 'vue/html-self-closing': [\n 'error',\n {\n html: {\n void: 'any',\n normal: 'always',\n component: 'always'\n }\n }\n ],\n 'vue/max-attributes-per-line': [\n 'error',\n {\n singleline: 3,\n multiline: 1\n }\n ],\n 'vue/first-attribute-linebreak': [\n 'error',\n {\n singleline: 'ignore',\n multiline: 'below'\n }\n ],\n 'vue/html-closing-bracket-newline': [\n 'error',\n {\n singleline: 'never',\n multiline: 'always'\n }\n ],\n\n // Disable formatting rules that conflict with Prettier\n 'vue/multiline-html-element-content-newline': 'off',\n 'vue/singleline-html-element-content-newline': 'off',\n\n // Vue 3 Composition API\n 'vue/no-deprecated-v-on-native-modifier': 'error',\n 'vue/no-deprecated-slot-attribute': 'error',\n 'vue/require-explicit-emits': 'error',\n 'vue/no-setup-props-reactivity-loss': 'error',\n 'vue/component-api-style': ['error', ['script-setup']],\n 'vue/define-macros-order': [\n 'error',\n {\n order: ['defineProps', 'defineEmits']\n }\n ],\n 'vue/define-emits-declaration': ['error', 'type-based'],\n\n // Directives\n 'vue/no-v-html': 'warn',\n 'vue/v-on-event-hyphenation': ['error', 'always'],\n 'vue/v-bind-style': ['error', 'shorthand'],\n 'vue/v-on-style': ['error', 'shorthand'],\n\n // Attributes\n 'vue/attribute-hyphenation': ['error', 'always'],\n 'vue/prop-name-casing': ['error', 'camelCase'],\n\n // Order and organization\n 'vue/order-in-components': [\n 'error',\n {\n order: [\n 'el',\n 'name',\n 'parent',\n 'functional',\n ['delimiters', 'comments'],\n ['components', 'directives', 'filters'],\n 'extends',\n 'mixins',\n 'inheritAttrs',\n 'model',\n ['props', 'propsData'],\n 'data',\n 'computed',\n 'watch',\n 'LIFECYCLE_HOOKS',\n 'methods',\n ['template', 'render'],\n 'renderError'\n ]\n }\n ]\n}\n\n/**\n * Vue.js 3 configuration\n * Includes Vue plugin and Vue-specific rules\n */\nexport default function createVuePreset(): EslintFlatConfig[] {\n return [\n // Vue recommended configuration (flat config)\n ...vuePlugin.configs['flat/recommended'],\n\n // Vue-specific custom rules\n {\n files: ['**/*.vue', '**/*.js', '**/*.ts', '**/*.tsx'],\n rules: vueCustomRules\n },\n\n // Vue-specific parser configuration for TypeScript in <script> tags\n // We must explicitly set vue-eslint-parser as the main parser, then configure\n // it to use TypeScript parser for <script> blocks via parserOptions.parser\n {\n files: ['**/*.vue'],\n languageOptions: {\n parser: vueParser,\n parserOptions: {\n parser: tseslint.parser,\n extraFileExtensions: ['.vue'],\n ecmaVersion: 'latest',\n sourceType: 'module'\n }\n }\n },\n\n // Disable TypeScript naming convention for Vue files (allows onUpdate:modelValue pattern)\n // IMPORTANT: Must also set parser to maintain vue-eslint-parser\n {\n files: ['**/*.vue'],\n languageOptions: {\n parser: vueParser,\n parserOptions: {\n parser: tseslint.parser,\n extraFileExtensions: ['.vue'],\n ecmaVersion: 'latest',\n sourceType: 'module'\n }\n },\n rules: {\n '@typescript-eslint/naming-convention': 'off'\n }\n },\n\n // Disable all formatting rules that conflict with Prettier\n // This must be last to override any formatting rules from above\n prettierConfig\n ]\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimensional-innovations/tool-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Universal configuration package for ESLint, Prettier, Stylelint, TypeScript, and semantic-release with auto-detection for React, Vue, Svelte, Solid, Astro, Angular, and more",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"README.md",
|
|
52
52
|
"LICENSE"
|
|
53
53
|
],
|
|
54
|
+
"packageManager": "pnpm@10.11.0",
|
|
54
55
|
"engines": {
|
|
55
56
|
"node": ">=22.20.0"
|
|
56
57
|
},
|
|
@@ -70,11 +71,11 @@
|
|
|
70
71
|
"style:fix": "NODE_OPTIONS='--import tsx' stylelint \"**/*.css\" --fix --allow-empty-input",
|
|
71
72
|
"typecheck": "tsc --noEmit",
|
|
72
73
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
73
|
-
"check-all": "
|
|
74
|
+
"check-all": "pnpm prettier && pnpm style && pnpm lint && pnpm typecheck",
|
|
75
|
+
"fix:all": "pnpm lint:fix && pnpm prettier:fix && pnpm style:fix && pnpm typecheck",
|
|
74
76
|
"prepublishOnly": "tsup"
|
|
75
77
|
},
|
|
76
78
|
"dependencies": {
|
|
77
|
-
"@eslint/compat": "^1.4.0",
|
|
78
79
|
"@eslint/js": "^9.37.0",
|
|
79
80
|
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
80
81
|
"@typescript-eslint/parser": "^8.46.0",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"eslint": ">=9.0.0",
|
|
83
84
|
"eslint-config-prettier": "^9.1.0",
|
|
84
85
|
"eslint-plugin-astro": "^1.3.1",
|
|
85
|
-
"eslint-plugin-import": "^
|
|
86
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
86
87
|
"eslint-plugin-react": "^7.37.0",
|
|
87
88
|
"eslint-plugin-react-hooks": "^6.1.1",
|
|
88
89
|
"eslint-plugin-solid": "^0.14.5",
|
|
@@ -95,16 +96,16 @@
|
|
|
95
96
|
"postcss-scss": "^4.0.9",
|
|
96
97
|
"prettier": ">=3.0.0",
|
|
97
98
|
"prompts": "^2.4.2",
|
|
98
|
-
"stylelint": ">=
|
|
99
|
-
"stylelint-config-
|
|
100
|
-
"stylelint-config-standard
|
|
101
|
-
"stylelint-config-standard-
|
|
99
|
+
"stylelint": ">=17.0.0",
|
|
100
|
+
"stylelint-config-recommended-vue": "^1.6.1",
|
|
101
|
+
"stylelint-config-standard": "^40.0.0",
|
|
102
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
102
103
|
"svelte-eslint-parser": "^1.3.3",
|
|
103
104
|
"typescript-eslint": "^8.46.0",
|
|
104
105
|
"vue-eslint-parser": "^10.2.0"
|
|
105
106
|
},
|
|
106
107
|
"peerDependencies": {
|
|
107
|
-
"@typescript/native-preview": ">=7.0.0-
|
|
108
|
+
"@typescript/native-preview": ">=7.0.0-dev",
|
|
108
109
|
"astro": ">=3.0.0 || >=4.0.0 || >=5.0.0",
|
|
109
110
|
"eslint": ">=9.0.0",
|
|
110
111
|
"less": ">=4.0.0",
|
|
@@ -113,7 +114,7 @@
|
|
|
113
114
|
"prettier-plugin-svelte": ">=3.0.0",
|
|
114
115
|
"sass": ">=1.0.0",
|
|
115
116
|
"solid-js": ">=1.0.0",
|
|
116
|
-
"stylelint": ">=
|
|
117
|
+
"stylelint": ">=17.0.0",
|
|
117
118
|
"svelte": ">=3.0.0 || >=4.0.0 || >=5.0.0",
|
|
118
119
|
"tailwindcss": ">=3.0.0",
|
|
119
120
|
"typescript": ">=5.0.0",
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
"@vitest/ui": "^3.2.4",
|
|
174
175
|
"astro": "^5.14.1",
|
|
175
176
|
"husky": "^9.1.7",
|
|
176
|
-
"semantic-release": "^
|
|
177
|
+
"semantic-release": "^25.0.3",
|
|
177
178
|
"solid-js": "^1.9.9",
|
|
178
179
|
"svelte": "^5.39.9",
|
|
179
180
|
"tsup": "^8.5.1",
|