@dimensional-innovations/tool-config 5.0.0 → 5.0.2
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-HUYPX7RZ.js +125 -0
- package/dist/chunk-HUYPX7RZ.js.map +1 -0
- package/dist/chunk-ITGUBGO6.js +625 -0
- package/dist/chunk-ITGUBGO6.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-OMQFJOZZ.js +48 -0
- package/dist/chunk-OMQFJOZZ.js.map +1 -0
- package/dist/chunk-SY42COTI.js +363 -0
- package/dist/chunk-SY42COTI.js.map +1 -0
- package/dist/chunk-SZOB6JY7.js +446 -0
- package/dist/chunk-SZOB6JY7.js.map +1 -0
- package/dist/cli/index.js +1812 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/eslint-YWWMMZDP.js +5 -0
- package/dist/eslint-YWWMMZDP.js.map +1 -0
- package/dist/index.d.ts +401 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- 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-ENTCYNXG.js +5 -0
- package/dist/stylelint-ENTCYNXG.js.map +1 -0
- package/dist/svelte-XEOX6WAQ.js +56 -0
- package/dist/svelte-XEOX6WAQ.js.map +1 -0
- package/dist/typescript-ZJ7LECQN.js +4 -0
- package/dist/typescript-ZJ7LECQN.js.map +1 -0
- package/dist/vue-DP7MCMOU.js +144 -0
- package/dist/vue-DP7MCMOU.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"stylelint-ENTCYNXG.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-ZJ7LECQN.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":"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","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": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
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": {
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"style:fix": "NODE_OPTIONS='--import tsx' stylelint \"**/*.css\" --fix --allow-empty-input",
|
|
71
71
|
"typecheck": "tsc --noEmit",
|
|
72
72
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
73
|
-
"check-all": "yarn prettier && yarn style && yarn lint && yarn typecheck"
|
|
73
|
+
"check-all": "yarn prettier && yarn style && yarn lint && yarn typecheck",
|
|
74
|
+
"prepublishOnly": "tsup"
|
|
74
75
|
},
|
|
75
76
|
"dependencies": {
|
|
76
77
|
"@eslint/compat": "^1.4.0",
|