ai-deslop 0.4.2 → 0.4.3

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.
@@ -10,7 +10,9 @@ function canonicalIntegerType(node, builder) {
10
10
  return null;
11
11
  mode = property.value.value;
12
12
  }
13
- return mode === null ? builder.type : mode === "boolean" ? "TSBooleanKeyword" : null;
13
+ if (mode === null || mode === "number")
14
+ return builder.type;
15
+ return mode === "boolean" ? "TSBooleanKeyword" : null;
14
16
  }
15
17
  function canonicalColumn(node, builders) {
16
18
  let current = node, notNull = false, hasDefault = false, typeOverride = null;
@@ -105,7 +105,20 @@ export const noDuplicateTypesRule = defineRule({
105
105
  }
106
106
  };
107
107
  return {
108
- Program() { options = context.options[0] ?? {}; },
108
+ Program() {
109
+ options = context.options[0] ?? {};
110
+ zodNamespaces.clear();
111
+ valibotNamespaces.clear();
112
+ arkTypeFunctions.clear();
113
+ valibotFunctions.clear();
114
+ drizzleTables.clear();
115
+ drizzleSchemaFactories.clear();
116
+ drizzleSchemaObjects.clear();
117
+ drizzleBuilders.clear();
118
+ drizzleModels.clear();
119
+ drizzleAliases.length = 0;
120
+ hasArkTypeImport = false;
121
+ },
109
122
  ImportDeclaration: trackImport,
110
123
  TSTypeAliasDeclaration(node) { inspectType(node); drizzleAliases.push(node); },
111
124
  TSInterfaceDeclaration: inspectType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-deslop",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Opinionated Oxlint rules that reject low-evidence, low-signal, AI-slop code patterns.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -61,4 +61,4 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  }
64
- }
64
+ }