uilint-eslint 0.2.166 → 0.2.167
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/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/rules/consistent-dark-mode.js +9 -1
- package/dist/rules/consistent-dark-mode.js.map +1 -1
- package/dist/rules/enforce-absolute-imports.js +9 -1
- package/dist/rules/enforce-absolute-imports.js.map +1 -1
- package/dist/rules/no-any-in-props.js +9 -1
- package/dist/rules/no-any-in-props.js.map +1 -1
- package/dist/rules/no-direct-store-import.js +9 -1
- package/dist/rules/no-direct-store-import.js.map +1 -1
- package/dist/rules/no-mixed-component-libraries.js +9 -1
- package/dist/rules/no-mixed-component-libraries.js.map +1 -1
- package/dist/rules/no-prop-drilling-depth.js +9 -1
- package/dist/rules/no-prop-drilling-depth.js.map +1 -1
- package/dist/rules/no-raw-ui-elements.js +9 -1
- package/dist/rules/no-raw-ui-elements.js.map +1 -1
- package/dist/rules/no-secrets-in-code.js +9 -1
- package/dist/rules/no-secrets-in-code.js.map +1 -1
- package/dist/rules/no-unsafe-type-casts.js +9 -1
- package/dist/rules/no-unsafe-type-casts.js.map +1 -1
- package/dist/rules/prefer-store-selectors.js +9 -1
- package/dist/rules/prefer-store-selectors.js.map +1 -1
- package/dist/rules/prefer-tailwind.js +9 -1
- package/dist/rules/prefer-tailwind.js.map +1 -1
- package/dist/rules/prefer-zustand-state-management.js +9 -1
- package/dist/rules/prefer-zustand-state-management.js.map +1 -1
- package/dist/rules/require-input-validation.js +9 -1
- package/dist/rules/require-input-validation.js.map +1 -1
- package/dist/rules/zustand-use-selectors.js +9 -1
- package/dist/rules/zustand-use-selectors.js.map +1 -1
- package/package.json +2 -2
- package/src/utils/rule-profiler.ts +16 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,14 @@ var EXCLUDED_RULES = /* @__PURE__ */ new Set([
|
|
|
13
13
|
"semantic-vision",
|
|
14
14
|
"no-duplicates"
|
|
15
15
|
]);
|
|
16
|
-
var
|
|
16
|
+
var PROFILER_STATE_KEY = /* @__PURE__ */ Symbol.for("uilint.ruleProfiler.state");
|
|
17
|
+
function getGlobalState() {
|
|
18
|
+
const globalStore = globalThis;
|
|
19
|
+
if (!globalStore[PROFILER_STATE_KEY]) {
|
|
20
|
+
globalStore[PROFILER_STATE_KEY] = createState();
|
|
21
|
+
}
|
|
22
|
+
return globalStore[PROFILER_STATE_KEY];
|
|
23
|
+
}
|
|
17
24
|
function createState() {
|
|
18
25
|
return {
|
|
19
26
|
startedAtNs: process.hrtime.bigint(),
|
|
@@ -23,6 +30,7 @@ function createState() {
|
|
|
23
30
|
now: () => process.hrtime.bigint()
|
|
24
31
|
};
|
|
25
32
|
}
|
|
33
|
+
var state = getGlobalState();
|
|
26
34
|
function parseBoolean(value) {
|
|
27
35
|
if (value === void 0) return true;
|
|
28
36
|
const normalized = value.trim().toLowerCase();
|
|
@@ -237,6 +245,7 @@ function registerRuleProfilerFlush() {
|
|
|
237
245
|
}
|
|
238
246
|
function resetRuleProfilerForTests(now) {
|
|
239
247
|
state = createState();
|
|
248
|
+
globalThis[PROFILER_STATE_KEY] = state;
|
|
240
249
|
if (now) {
|
|
241
250
|
state.now = now;
|
|
242
251
|
state.startedAtNs = now();
|