tailwind-typescript-plugin 1.4.1-beta.12 → 1.4.1-beta.13
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/CHANGELOG.md +6 -0
- package/README.md +212 -143
- package/lib/core/interfaces.d.ts +17 -12
- package/lib/core/interfaces.d.ts.map +1 -1
- package/lib/core/types.d.ts +75 -0
- package/lib/core/types.d.ts.map +1 -1
- package/lib/infrastructure/TailwindValidator.css-vars.spec.js +1 -11
- package/lib/infrastructure/TailwindValidator.css-vars.spec.js.map +1 -1
- package/lib/infrastructure/TailwindValidator.d.ts +1 -3
- package/lib/infrastructure/TailwindValidator.d.ts.map +1 -1
- package/lib/infrastructure/TailwindValidator.js +6 -26
- package/lib/infrastructure/TailwindValidator.js.map +1 -1
- package/lib/infrastructure/TailwindValidator.spec.js +7 -17
- package/lib/infrastructure/TailwindValidator.spec.js.map +1 -1
- package/lib/plugin/TailwindTypescriptPlugin.d.ts +0 -1
- package/lib/plugin/TailwindTypescriptPlugin.d.ts.map +1 -1
- package/lib/plugin/TailwindTypescriptPlugin.js +26 -60
- package/lib/plugin/TailwindTypescriptPlugin.js.map +1 -1
- package/lib/services/CodeActionService.spec.js +1 -2
- package/lib/services/CodeActionService.spec.js.map +1 -1
- package/lib/services/CompletionService.d.ts +1 -3
- package/lib/services/CompletionService.d.ts.map +1 -1
- package/lib/services/CompletionService.js +1 -12
- package/lib/services/CompletionService.js.map +1 -1
- package/lib/services/CompletionService.spec.js +11 -12
- package/lib/services/CompletionService.spec.js.map +1 -1
- package/lib/services/ConflictClassDetection.spec.js +5 -5
- package/lib/services/ConflictClassDetection.spec.js.map +1 -1
- package/lib/services/DiagnosticService.d.ts +8 -8
- package/lib/services/DiagnosticService.d.ts.map +1 -1
- package/lib/services/DiagnosticService.js +29 -13
- package/lib/services/DiagnosticService.js.map +1 -1
- package/lib/services/DuplicateClassDetection.spec.js +20 -21
- package/lib/services/DuplicateClassDetection.spec.js.map +1 -1
- package/lib/services/PluginConfigService.d.ts +38 -15
- package/lib/services/PluginConfigService.d.ts.map +1 -1
- package/lib/services/PluginConfigService.js +182 -82
- package/lib/services/PluginConfigService.js.map +1 -1
- package/lib/services/ValidationService.d.ts +5 -4
- package/lib/services/ValidationService.d.ts.map +1 -1
- package/lib/services/ValidationService.js +39 -42
- package/lib/services/ValidationService.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,108 +2,208 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PluginConfigService = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Default
|
|
6
|
-
*
|
|
7
|
-
* handled by dedicated extractors (CvaExtractor, TailwindVariantsExtractor)
|
|
8
|
-
* Note: 'cn' is a simple string since it's typically a custom wrapper (e.g., shadcn pattern)
|
|
5
|
+
* Default utilities configuration
|
|
6
|
+
* Key is function name, value is import source ("*" = any source, "off" = disabled)
|
|
9
7
|
*/
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const DEFAULT_UTILITIES = {
|
|
9
|
+
cn: '*', // Custom wrapper pattern (e.g., shadcn), any source
|
|
10
|
+
clsx: 'clsx',
|
|
11
|
+
classnames: 'classnames',
|
|
12
|
+
classNames: 'classnames',
|
|
13
|
+
cx: 'classnames',
|
|
14
|
+
twMerge: 'tailwind-merge'
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Default variants configuration
|
|
18
|
+
*/
|
|
19
|
+
const DEFAULT_VARIANTS = {
|
|
20
|
+
tailwindVariants: true,
|
|
21
|
+
classVarianceAuthority: true
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Default validation configuration
|
|
25
|
+
*/
|
|
26
|
+
const DEFAULT_VALIDATION = {
|
|
27
|
+
enabled: true,
|
|
28
|
+
severity: 'error',
|
|
29
|
+
allowedClasses: []
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Default lint configuration
|
|
33
|
+
*/
|
|
34
|
+
const DEFAULT_LINT = {
|
|
35
|
+
enabled: true,
|
|
36
|
+
conflictingClasses: {
|
|
37
|
+
enabled: true,
|
|
38
|
+
severity: 'warning'
|
|
39
|
+
},
|
|
40
|
+
repeatedClasses: {
|
|
41
|
+
enabled: true,
|
|
42
|
+
severity: 'warning'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
18
45
|
/**
|
|
19
46
|
* Service responsible for managing plugin configuration
|
|
20
47
|
* Follows Single Responsibility Principle
|
|
21
48
|
*/
|
|
22
49
|
class PluginConfigService {
|
|
23
|
-
constructor(config
|
|
24
|
-
this.logger = logger;
|
|
25
|
-
this.loggingEnabled = config.enableLogging === true;
|
|
26
|
-
this.utilityFunctions = this.initializeUtilityFunctions(config);
|
|
50
|
+
constructor(config) {
|
|
27
51
|
this.cssFilePath = config.globalCss;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// No variants configured - enable both by default
|
|
42
|
-
this.tailwindVariantsEnabled = true;
|
|
43
|
-
this.classVarianceAuthorityEnabled = true;
|
|
44
|
-
}
|
|
45
|
-
this.logExtractorConfig();
|
|
46
|
-
}
|
|
47
|
-
initializeUtilityFunctions(config) {
|
|
48
|
-
// Helper to get the name from a UtilityFunction
|
|
49
|
-
const getName = (f) => (typeof f === 'string' ? f : f.name);
|
|
50
|
-
if (config.utilityFunctions && Array.isArray(config.utilityFunctions)) {
|
|
51
|
-
// Merge user-provided functions with defaults (remove duplicates by name)
|
|
52
|
-
const userFunctions = config.utilityFunctions;
|
|
53
|
-
const userFunctionNames = new Set(userFunctions.map(getName));
|
|
54
|
-
// Only include defaults that aren't overridden by user config
|
|
55
|
-
const nonOverriddenDefaults = DEFAULT_UTILITY_FUNCTIONS.filter(def => !userFunctionNames.has(getName(def)));
|
|
56
|
-
const merged = [...nonOverriddenDefaults, ...userFunctions];
|
|
57
|
-
this.logger.log(`Using utility functions (defaults + custom): ${merged.map(getName).join(', ')}`);
|
|
58
|
-
return merged;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this.logger.log(`Using default utility functions: ${DEFAULT_UTILITY_FUNCTIONS.map(getName).join(', ')}`);
|
|
62
|
-
return DEFAULT_UTILITY_FUNCTIONS;
|
|
52
|
+
// Initialize configuration with backwards compatibility
|
|
53
|
+
this.utilitiesConfig = this.initializeUtilities(config);
|
|
54
|
+
this.variantsConfig = this.initializeVariants(config);
|
|
55
|
+
this.validationConfig = this.initializeValidation(config);
|
|
56
|
+
this.lintConfig = this.initializeLint(config);
|
|
57
|
+
this.editorConfig = this.initializeEditor(config);
|
|
58
|
+
// Convert to legacy format for extractors
|
|
59
|
+
this.utilityFunctionsLegacy = this.convertToLegacyFormat(this.utilitiesConfig);
|
|
60
|
+
}
|
|
61
|
+
initializeUtilities(config) {
|
|
62
|
+
if (config.libraries?.utilities) {
|
|
63
|
+
// Merge with defaults (user config overrides defaults)
|
|
64
|
+
return { ...DEFAULT_UTILITIES, ...config.libraries.utilities };
|
|
63
65
|
}
|
|
66
|
+
return { ...DEFAULT_UTILITIES };
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
if (config.
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
initializeVariants(config) {
|
|
69
|
+
if (config.libraries?.variants) {
|
|
70
|
+
const userVariants = config.libraries.variants;
|
|
71
|
+
const hasAnyConfig = userVariants.tailwindVariants !== undefined ||
|
|
72
|
+
userVariants.classVarianceAuthority !== undefined;
|
|
73
|
+
if (hasAnyConfig) {
|
|
74
|
+
// User specified at least one - only enable those explicitly set to true
|
|
75
|
+
return {
|
|
76
|
+
tailwindVariants: userVariants.tailwindVariants === true,
|
|
77
|
+
classVarianceAuthority: userVariants.classVarianceAuthority === true
|
|
78
|
+
};
|
|
79
|
+
}
|
|
69
80
|
}
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
return { ...DEFAULT_VARIANTS };
|
|
82
|
+
}
|
|
83
|
+
initializeValidation(config) {
|
|
84
|
+
const validation = config.validation || {};
|
|
85
|
+
return {
|
|
86
|
+
enabled: validation.enabled !== false, // default true
|
|
87
|
+
severity: validation.severity || DEFAULT_VALIDATION.severity,
|
|
88
|
+
allowedClasses: validation.allowedClasses || []
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
initializeLint(config) {
|
|
92
|
+
const lint = config.lint || {};
|
|
93
|
+
return {
|
|
94
|
+
enabled: lint.enabled !== false, // default true
|
|
95
|
+
conflictingClasses: {
|
|
96
|
+
enabled: lint.conflictingClasses?.enabled !== false, // default true
|
|
97
|
+
severity: lint.conflictingClasses?.severity || DEFAULT_LINT.conflictingClasses.severity
|
|
98
|
+
},
|
|
99
|
+
repeatedClasses: {
|
|
100
|
+
enabled: lint.repeatedClasses?.enabled !== false, // default true
|
|
101
|
+
severity: lint.repeatedClasses?.severity || DEFAULT_LINT.repeatedClasses.severity
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
initializeEditor(config) {
|
|
106
|
+
const editor = config.editor || {};
|
|
107
|
+
return {
|
|
108
|
+
enabled: editor.enabled !== false, // default true
|
|
109
|
+
autocomplete: {
|
|
110
|
+
enabled: editor.autocomplete?.enabled !== false // default true
|
|
111
|
+
},
|
|
112
|
+
hover: {
|
|
113
|
+
enabled: editor.hover?.enabled !== false // default true
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Convert new utilities config to legacy UtilityFunction[] format
|
|
119
|
+
* This is needed for backwards compatibility with extractors
|
|
120
|
+
*/
|
|
121
|
+
convertToLegacyFormat(utilities) {
|
|
122
|
+
const result = [];
|
|
123
|
+
for (const [name, source] of Object.entries(utilities)) {
|
|
124
|
+
if (source === 'off') {
|
|
125
|
+
continue; // Skip disabled utilities
|
|
126
|
+
}
|
|
127
|
+
if (source === '*') {
|
|
128
|
+
result.push(name); // Simple string = any source
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
result.push({ name, from: source });
|
|
132
|
+
}
|
|
72
133
|
}
|
|
134
|
+
return result;
|
|
73
135
|
}
|
|
74
|
-
|
|
75
|
-
|
|
136
|
+
// ---- Getters for utilities ----
|
|
137
|
+
getUtilitiesConfig() {
|
|
138
|
+
return this.utilitiesConfig;
|
|
76
139
|
}
|
|
77
|
-
|
|
78
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Get utility functions in legacy format (for extractors)
|
|
142
|
+
*/
|
|
143
|
+
getUtilityFunctions() {
|
|
144
|
+
return this.utilityFunctionsLegacy;
|
|
79
145
|
}
|
|
80
|
-
|
|
81
|
-
|
|
146
|
+
// ---- Getters for variants ----
|
|
147
|
+
getVariantsConfig() {
|
|
148
|
+
return this.variantsConfig;
|
|
82
149
|
}
|
|
83
150
|
isTailwindVariantsEnabled() {
|
|
84
|
-
return this.
|
|
151
|
+
return this.variantsConfig.tailwindVariants === true;
|
|
85
152
|
}
|
|
86
153
|
isClassVarianceAuthorityEnabled() {
|
|
87
|
-
return this.
|
|
154
|
+
return this.variantsConfig.classVarianceAuthority === true;
|
|
155
|
+
}
|
|
156
|
+
// ---- Getters for validation ----
|
|
157
|
+
getValidationConfig() {
|
|
158
|
+
return this.validationConfig;
|
|
159
|
+
}
|
|
160
|
+
isValidationEnabled() {
|
|
161
|
+
return this.validationConfig.enabled;
|
|
162
|
+
}
|
|
163
|
+
getValidationSeverity() {
|
|
164
|
+
return this.validationConfig.severity;
|
|
88
165
|
}
|
|
89
166
|
getAllowedClasses() {
|
|
90
|
-
return this.allowedClasses;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
167
|
+
return this.validationConfig.allowedClasses;
|
|
168
|
+
}
|
|
169
|
+
// ---- Getters for lint ----
|
|
170
|
+
getLintConfig() {
|
|
171
|
+
return this.lintConfig;
|
|
172
|
+
}
|
|
173
|
+
isLintEnabled() {
|
|
174
|
+
return this.lintConfig.enabled !== false;
|
|
175
|
+
}
|
|
176
|
+
isConflictingClassesEnabled() {
|
|
177
|
+
return this.isLintEnabled() && this.lintConfig.conflictingClasses?.enabled !== false;
|
|
178
|
+
}
|
|
179
|
+
getConflictingClassesSeverity() {
|
|
180
|
+
return this.lintConfig.conflictingClasses?.severity || 'warning';
|
|
181
|
+
}
|
|
182
|
+
isRepeatedClassesEnabled() {
|
|
183
|
+
return this.isLintEnabled() && this.lintConfig.repeatedClasses?.enabled !== false;
|
|
184
|
+
}
|
|
185
|
+
getRepeatedClassesSeverity() {
|
|
186
|
+
return this.lintConfig.repeatedClasses?.severity || 'warning';
|
|
187
|
+
}
|
|
188
|
+
// ---- Getters for editor ----
|
|
189
|
+
getEditorConfig() {
|
|
190
|
+
return this.editorConfig;
|
|
191
|
+
}
|
|
192
|
+
isEditorEnabled() {
|
|
193
|
+
return this.editorConfig.enabled !== false;
|
|
194
|
+
}
|
|
195
|
+
isAutocompleteEnabled() {
|
|
196
|
+
return this.isEditorEnabled() && this.editorConfig.autocomplete?.enabled !== false;
|
|
197
|
+
}
|
|
198
|
+
isHoverEnabled() {
|
|
199
|
+
return this.isEditorEnabled() && this.editorConfig.hover?.enabled !== false;
|
|
200
|
+
}
|
|
201
|
+
// ---- Getters for global settings ----
|
|
202
|
+
getCssFilePath() {
|
|
203
|
+
return this.cssFilePath;
|
|
204
|
+
}
|
|
205
|
+
hasValidCssPath() {
|
|
206
|
+
return this.cssFilePath !== undefined && this.cssFilePath.length > 0;
|
|
107
207
|
}
|
|
108
208
|
}
|
|
109
209
|
exports.PluginConfigService = PluginConfigService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginConfigService.js","sourceRoot":"","sources":["../../src/services/PluginConfigService.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PluginConfigService.js","sourceRoot":"","sources":["../../src/services/PluginConfigService.ts"],"names":[],"mappings":";;;AAWA;;;GAGG;AACH,MAAM,iBAAiB,GAAoB;IAC1C,EAAE,EAAE,GAAG,EAAE,oDAAoD;IAC7D,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,EAAE,EAAE,YAAY;IAChB,OAAO,EAAE,gBAAgB;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,gBAAgB,GAAmB;IACxC,gBAAgB,EAAE,IAAI;IACtB,sBAAsB,EAAE,IAAI;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,kBAAkB,GAEpB;IACH,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,OAAO;IACjB,cAAc,EAAE,EAAE;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,YAAY,GAAe;IAChC,OAAO,EAAE,IAAI;IACb,kBAAkB,EAAE;QACnB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACnB;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;KACnB;CACD,CAAC;AAEF;;;GAGG;AACH,MAAa,mBAAmB;IAa/B,YAAY,MAAqB;QAChC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC;QAEpC,wDAAwD;QACxD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC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AAO,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,OAAO,KAAK,KAAK,CAAC;IACtF,CAAC;IAED,6BAA6B;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,QAAQ,IAAI,SAAS,CAAC;IAClE,CAAC;IAED,wBAAwB;QACvB,OAAO,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,OAAO,KAAK,KAAK,CAAC;IACnF,CAAC;IAED,0BAA0B;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,QAAQ,IAAI,SAAS,CAAC;IAC/D,CAAC;IAED,+BAA+B;IAE/B,eAAe;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,eAAe;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,KAAK,CAAC;IAC5C,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAI,CAAC,eAAe,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,KAAK,KAAK,CAAC;IACpF,CAAC;IAED,cAAc;QACb,OAAO,IAAI,CAAC,eAAe,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,CAAC;IAC7E,CAAC;IAED,wCAAwC;IAExC,cAAc;QACb,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAED,eAAe;QACd,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;IACtE,CAAC;CACD;AA1ND,kDA0NC"}
|
|
@@ -2,9 +2,9 @@ import * as ts from 'typescript/lib/tsserverlibrary';
|
|
|
2
2
|
import { IClassNameValidator } from '../core/interfaces';
|
|
3
3
|
import { UtilityFunction } from '../core/types';
|
|
4
4
|
import { ICssProvider } from '../infrastructure/TailwindConflictDetector';
|
|
5
|
-
import { Logger } from '../utils/Logger';
|
|
6
5
|
import { ClassNameExtractionService } from './ClassNameExtractionService';
|
|
7
6
|
import { DiagnosticService } from './DiagnosticService';
|
|
7
|
+
import { PluginConfigService } from './PluginConfigService';
|
|
8
8
|
/**
|
|
9
9
|
* Service responsible for validating class names and creating diagnostics
|
|
10
10
|
* Orchestrates the validation workflow
|
|
@@ -13,9 +13,9 @@ export declare class ValidationService {
|
|
|
13
13
|
private readonly extractionService;
|
|
14
14
|
private readonly diagnosticService;
|
|
15
15
|
private readonly validator;
|
|
16
|
-
private readonly
|
|
16
|
+
private readonly configService;
|
|
17
17
|
private readonly conflictDetector;
|
|
18
|
-
constructor(extractionService: ClassNameExtractionService, diagnosticService: DiagnosticService, validator: IClassNameValidator,
|
|
18
|
+
constructor(extractionService: ClassNameExtractionService, diagnosticService: DiagnosticService, validator: IClassNameValidator, configService: PluginConfigService, cssProvider?: ICssProvider);
|
|
19
19
|
/**
|
|
20
20
|
* Validate a source file and return diagnostics
|
|
21
21
|
* PERFORMANCE OPTIMIZED: Minimal logging overhead
|
|
@@ -27,7 +27,8 @@ export declare class ValidationService {
|
|
|
27
27
|
*/
|
|
28
28
|
private filterInvalidClasses;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Find duplicate and extractable classes within the same attribute
|
|
31
|
+
* Returns true duplicates and extractable classes (same class in both ternary branches)
|
|
31
32
|
*/
|
|
32
33
|
private findDuplicateClasses;
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationService.d.ts","sourceRoot":"","sources":["../../src/services/ValidationService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAiB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,YAAY,EAA4B,MAAM,4CAA4C,CAAC;AACpG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ValidationService.d.ts","sourceRoot":"","sources":["../../src/services/ValidationService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAiB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,YAAY,EAA4B,MAAM,4CAA4C,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,qBAAa,iBAAiB;IAI5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAN/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;gBAG1C,iBAAiB,EAAE,0BAA0B,EAC7C,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,mBAAmB,EACnD,WAAW,CAAC,EAAE,YAAY;IAQ3B;;;OAGG;IACH,YAAY,CACX,UAAU,EAAE,OAAO,EAAE,EACrB,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,gBAAgB,EAAE,eAAe,EAAE,EACnC,WAAW,CAAC,EAAE,EAAE,CAAC,WAAW,GAC1B,EAAE,CAAC,UAAU,EAAE;IA4ElB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;CAiG5B"}
|
|
@@ -7,11 +7,11 @@ const TailwindConflictDetector_1 = require("../infrastructure/TailwindConflictDe
|
|
|
7
7
|
* Orchestrates the validation workflow
|
|
8
8
|
*/
|
|
9
9
|
class ValidationService {
|
|
10
|
-
constructor(extractionService, diagnosticService, validator,
|
|
10
|
+
constructor(extractionService, diagnosticService, validator, configService, cssProvider) {
|
|
11
11
|
this.extractionService = extractionService;
|
|
12
12
|
this.diagnosticService = diagnosticService;
|
|
13
13
|
this.validator = validator;
|
|
14
|
-
this.
|
|
14
|
+
this.configService = configService;
|
|
15
15
|
this.conflictDetector = new TailwindConflictDetector_1.TailwindConflictDetector();
|
|
16
16
|
if (cssProvider) {
|
|
17
17
|
this.conflictDetector.setCssProvider(cssProvider);
|
|
@@ -23,50 +23,48 @@ class ValidationService {
|
|
|
23
23
|
*/
|
|
24
24
|
validateFile(typescript, sourceFile, utilityFunctions, typeChecker) {
|
|
25
25
|
if (!this.validator.isInitialized()) {
|
|
26
|
-
this.logger.log(`[ValidationService] Validator not initialized yet for ${sourceFile.fileName}`);
|
|
27
26
|
return [];
|
|
28
27
|
}
|
|
29
|
-
// PERFORMANCE: Only log if enabled
|
|
30
|
-
if (this.logger.isEnabled()) {
|
|
31
|
-
this.logger.log(`[ValidationService] Processing file: ${sourceFile.fileName}`);
|
|
32
|
-
}
|
|
33
28
|
// Extract all class names from the file
|
|
34
29
|
const classNames = this.extractionService.extractFromSourceFile(typescript, sourceFile, utilityFunctions, typeChecker);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
const diagnostics = [];
|
|
31
|
+
// Validation diagnostics (invalid class detection)
|
|
32
|
+
if (this.configService.isValidationEnabled()) {
|
|
33
|
+
const severity = this.configService.getValidationSeverity();
|
|
34
|
+
if (severity !== 'off') {
|
|
35
|
+
const invalidClasses = this.filterInvalidClasses(classNames);
|
|
36
|
+
if (invalidClasses.length > 0) {
|
|
37
|
+
diagnostics.push(...this.diagnosticService.createDiagnostics(invalidClasses, sourceFile, severity));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (totalIssues > 0) {
|
|
52
|
-
this.logger.log(`[ValidationService] Returning ${invalidClasses.length} invalid + ${trueDuplicates.length} duplicate + ${extractableClasses.length} extractable + ${conflicts.length} conflict diagnostics`);
|
|
41
|
+
// Lint diagnostics (only if lint is enabled globally)
|
|
42
|
+
if (this.configService.isLintEnabled()) {
|
|
43
|
+
// Detect duplicate and extractable classes
|
|
44
|
+
const { trueDuplicates, extractableClasses } = this.findDuplicateClasses(classNames);
|
|
45
|
+
// Repeated classes
|
|
46
|
+
if (this.configService.isRepeatedClassesEnabled()) {
|
|
47
|
+
const severity = this.configService.getRepeatedClassesSeverity();
|
|
48
|
+
if (severity !== 'off') {
|
|
49
|
+
if (trueDuplicates.length > 0) {
|
|
50
|
+
diagnostics.push(...this.diagnosticService.createDuplicateDiagnostics(trueDuplicates, sourceFile, severity));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// Extractable classes (always enabled when lint is enabled, no config option)
|
|
55
|
+
if (extractableClasses.length > 0) {
|
|
56
|
+
diagnostics.push(...this.diagnosticService.createExtractableClassDiagnostics(extractableClasses, sourceFile));
|
|
57
|
+
}
|
|
58
|
+
// Conflicting classes
|
|
59
|
+
if (this.configService.isConflictingClassesEnabled()) {
|
|
60
|
+
const severity = this.configService.getConflictingClassesSeverity();
|
|
61
|
+
if (severity !== 'off') {
|
|
62
|
+
const conflicts = this.conflictDetector.findConflicts(classNames);
|
|
63
|
+
if (conflicts.length > 0) {
|
|
64
|
+
diagnostics.push(...this.diagnosticService.createConflictDiagnostics(conflicts, sourceFile, severity));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
56
67
|
}
|
|
57
|
-
}
|
|
58
|
-
const diagnostics = [];
|
|
59
|
-
if (invalidClasses.length > 0) {
|
|
60
|
-
diagnostics.push(...this.diagnosticService.createDiagnostics(invalidClasses, sourceFile));
|
|
61
|
-
}
|
|
62
|
-
if (trueDuplicates.length > 0) {
|
|
63
|
-
diagnostics.push(...this.diagnosticService.createDuplicateDiagnostics(trueDuplicates, sourceFile));
|
|
64
|
-
}
|
|
65
|
-
if (extractableClasses.length > 0) {
|
|
66
|
-
diagnostics.push(...this.diagnosticService.createExtractableClassDiagnostics(extractableClasses, sourceFile));
|
|
67
|
-
}
|
|
68
|
-
if (conflicts.length > 0) {
|
|
69
|
-
diagnostics.push(...this.diagnosticService.createConflictDiagnostics(conflicts, sourceFile));
|
|
70
68
|
}
|
|
71
69
|
return diagnostics;
|
|
72
70
|
}
|
|
@@ -75,12 +73,11 @@ class ValidationService {
|
|
|
75
73
|
* PERFORMANCE OPTIMIZED: No logging in hot path
|
|
76
74
|
*/
|
|
77
75
|
filterInvalidClasses(classNames) {
|
|
78
|
-
// PERFORMANCE: Skip logging each class validation (hot path)
|
|
79
|
-
// This method is called for every class in every file
|
|
80
76
|
return classNames.filter(classInfo => !this.validator.isValidClass(classInfo.className));
|
|
81
77
|
}
|
|
82
78
|
/**
|
|
83
|
-
*
|
|
79
|
+
* Find duplicate and extractable classes within the same attribute
|
|
80
|
+
* Returns true duplicates and extractable classes (same class in both ternary branches)
|
|
84
81
|
*/
|
|
85
82
|
findDuplicateClasses(classNames) {
|
|
86
83
|
const trueDuplicates = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationService.js","sourceRoot":"","sources":["../../src/services/ValidationService.ts"],"names":[],"mappings":";;;AAIA,yFAAoG;AAKpG;;;GAGG;AACH,MAAa,iBAAiB;IAG7B,YACkB,iBAA6C,EAC7C,iBAAoC,EACpC,SAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"ValidationService.js","sourceRoot":"","sources":["../../src/services/ValidationService.ts"],"names":[],"mappings":";;;AAIA,yFAAoG;AAKpG;;;GAGG;AACH,M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CAAC;IAC/C,CAAC;CACD;AAlND,8CAkNC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-typescript-plugin",
|
|
3
|
-
"version": "1.4.1-beta.
|
|
3
|
+
"version": "1.4.1-beta.13",
|
|
4
4
|
"description": "TypeScript Language Service plugin that validates Tailwind CSS class names in JSX/TSX files. Catches typos and invalid classes in real-time with support for tailwind-variants and class-variance-authority.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|