@konvert7/klint 0.17.0 → 0.18.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/cli.ts CHANGED
@@ -18,7 +18,12 @@ import type { ArchConfig, KlintConfig, KlintRule, RuleConfigValue } from "./core
18
18
  import { BUILT_IN_PLUGINS } from "./plugins/index";
19
19
  import { BUILT_IN_RULES } from "./rules/index";
20
20
 
21
- const RUST_SUPPORTED_TYPESCRIPT_RULES = new Set(["no-string-match"]);
21
+ const RUST_SUPPORTED_TYPESCRIPT_RULES = new Set([
22
+ "no-consecutive-array-push",
23
+ "no-nested-template-literals",
24
+ "no-string-match",
25
+ "no-unguarded-json-parse",
26
+ ]);
22
27
 
23
28
  interface CliOptions {
24
29
  configDir?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konvert7/klint",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Architecture-as-Code linter for TypeScript. Enforce layer boundaries, import rules, and singleton patterns in YAML.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,7 +26,7 @@ export const noConsecutiveArrayPush: KlintRule = {
26
26
  statements[runStart].getStart()
27
27
  );
28
28
  violations.push({
29
- file: relative(root, file),
29
+ file: relative(root, file).replaceAll("\\", "/"),
30
30
  line: line + 1,
31
31
  message: `${upTo - runStart} consecutive .push() calls on \`${runReceiver}\` — combine into a single .push(a, b, …) call.`,
32
32
  });
@@ -32,7 +32,7 @@ function findNestedTemplate(
32
32
  if (ts.isTemplateExpression(node) || ts.isNoSubstitutionTemplateLiteral(node)) {
33
33
  const { line } = src.getLineAndCharacterOfPosition(node.getStart());
34
34
  violations.push({
35
- file: relative(root, file),
35
+ file: relative(root, file).replaceAll("\\", "/"),
36
36
  line: line + 1,
37
37
  message:
38
38
  "Nested template literal — extract the inner template to a variable to improve readability.",
@@ -23,7 +23,7 @@ export const noUnguardedJsonParse: KlintRule = {
23
23
  ) {
24
24
  const { line } = src.getLineAndCharacterOfPosition(node.getStart());
25
25
  violations.push({
26
- file: relative(root, file),
26
+ file: relative(root, file).replaceAll("\\", "/"),
27
27
  line: line + 1,
28
28
  message:
29
29
  "JSON.parse() called without a surrounding try/catch — a malformed payload will throw an unhandled exception.",