@shivaedev/quality 0.66.0 → 0.67.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.
Files changed (162) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +6 -4
  3. package/dist/adapters/asymmetricMatcher.d.ts +3 -0
  4. package/dist/adapters/asymmetricMatcher.d.ts.map +1 -0
  5. package/dist/adapters/asymmetricMatcher.js +27 -0
  6. package/dist/adapters/asymmetricMatcher.js.map +1 -0
  7. package/dist/adapters/knip/configuration.d.ts.map +1 -1
  8. package/dist/adapters/knip/configuration.js +2 -1
  9. package/dist/adapters/knip/configuration.js.map +1 -1
  10. package/dist/adapters/pureReader.d.ts +3 -0
  11. package/dist/adapters/pureReader.d.ts.map +1 -0
  12. package/dist/adapters/pureReader.js +52 -0
  13. package/dist/adapters/pureReader.js.map +1 -0
  14. package/dist/adapters/readConfig.js +1 -1
  15. package/dist/adapters/readConfig.js.map +1 -1
  16. package/dist/adapters/scriptPaths.d.ts +2 -0
  17. package/dist/adapters/scriptPaths.d.ts.map +1 -0
  18. package/dist/adapters/scriptPaths.js +5 -0
  19. package/dist/adapters/scriptPaths.js.map +1 -0
  20. package/dist/adapters/specReaderSources.d.ts +7 -0
  21. package/dist/adapters/specReaderSources.d.ts.map +1 -0
  22. package/dist/adapters/specReaderSources.js +73 -0
  23. package/dist/adapters/specReaderSources.js.map +1 -0
  24. package/dist/cli/args.js +2 -2
  25. package/dist/cli/args.js.map +1 -1
  26. package/dist/cli/fix.d.ts +0 -1
  27. package/dist/cli/fix.d.ts.map +1 -1
  28. package/dist/cli/fix.js +1 -1
  29. package/dist/cli/fix.js.map +1 -1
  30. package/dist/cli/limits.d.ts +2 -0
  31. package/dist/cli/limits.d.ts.map +1 -0
  32. package/dist/cli/limits.js +2 -0
  33. package/dist/cli/limits.js.map +1 -0
  34. package/dist/cli/{options.d.ts → misplaced.d.ts} +1 -1
  35. package/dist/cli/misplaced.d.ts.map +1 -0
  36. package/dist/cli/{options.js → misplaced.js} +1 -1
  37. package/dist/cli/misplaced.js.map +1 -0
  38. package/dist/cli/program.js +1 -1
  39. package/dist/cli/program.js.map +1 -1
  40. package/dist/cli/subcommands.d.ts +2 -0
  41. package/dist/cli/subcommands.d.ts.map +1 -0
  42. package/dist/cli/subcommands.js +6 -0
  43. package/dist/cli/subcommands.js.map +1 -0
  44. package/dist/cli/{messages.d.ts → usage.d.ts} +1 -2
  45. package/dist/cli/usage.d.ts.map +1 -0
  46. package/{src/cli/messages.ts → dist/cli/usage.js} +1 -6
  47. package/dist/cli/usage.js.map +1 -0
  48. package/dist/config/defaultExtensions.d.ts +2 -0
  49. package/dist/config/defaultExtensions.d.ts.map +1 -0
  50. package/{src/config/constants.ts → dist/config/defaultExtensions.js} +1 -2
  51. package/dist/config/defaultExtensions.js.map +1 -0
  52. package/dist/config/file.d.ts +2 -0
  53. package/dist/config/file.d.ts.map +1 -0
  54. package/dist/config/file.js +2 -0
  55. package/dist/config/file.js.map +1 -0
  56. package/dist/config/load.js +1 -1
  57. package/dist/config/load.js.map +1 -1
  58. package/dist/hooks/install.js +1 -1
  59. package/dist/hooks/install.js.map +1 -1
  60. package/dist/imports/testComposition.d.ts +4 -0
  61. package/dist/imports/testComposition.d.ts.map +1 -0
  62. package/dist/imports/testComposition.js +38 -0
  63. package/dist/imports/testComposition.js.map +1 -0
  64. package/dist/naming/adapters/plainData.d.ts +5 -0
  65. package/dist/naming/adapters/plainData.d.ts.map +1 -0
  66. package/dist/naming/adapters/plainData.js +77 -0
  67. package/dist/naming/adapters/plainData.js.map +1 -0
  68. package/dist/naming/constantModule.d.ts +3 -0
  69. package/dist/naming/constantModule.d.ts.map +1 -0
  70. package/dist/naming/constantModule.js +25 -0
  71. package/dist/naming/constantModule.js.map +1 -0
  72. package/dist/naming/{migrationFile.d.ts → isMigrationFile.d.ts} +1 -1
  73. package/dist/naming/isMigrationFile.d.ts.map +1 -0
  74. package/dist/naming/{migrationFile.js → isMigrationFile.js} +1 -1
  75. package/dist/naming/isMigrationFile.js.map +1 -0
  76. package/dist/naming/ownExports.d.ts +0 -1
  77. package/dist/naming/ownExports.d.ts.map +1 -1
  78. package/dist/naming/ownExports.js +11 -25
  79. package/dist/naming/ownExports.js.map +1 -1
  80. package/dist/naming/packageTests.d.ts +7 -0
  81. package/dist/naming/packageTests.d.ts.map +1 -0
  82. package/dist/naming/packageTests.js +21 -0
  83. package/dist/naming/packageTests.js.map +1 -0
  84. package/dist/naming/testCode.d.ts +4 -0
  85. package/dist/naming/testCode.d.ts.map +1 -0
  86. package/dist/naming/testCode.js +46 -0
  87. package/dist/naming/testCode.js.map +1 -0
  88. package/dist/rules/comments/kinds.js +1 -1
  89. package/dist/rules/comments/kinds.js.map +1 -1
  90. package/dist/rules/files/namedAfterExport.d.ts.map +1 -1
  91. package/dist/rules/files/namedAfterExport.js +23 -11
  92. package/dist/rules/files/namedAfterExport.js.map +1 -1
  93. package/dist/rules/imports/manifest.d.ts.map +1 -1
  94. package/dist/rules/imports/manifest.js +9 -11
  95. package/dist/rules/imports/manifest.js.map +1 -1
  96. package/dist/rules/imports/noTestCode.d.ts.map +1 -1
  97. package/dist/rules/imports/noTestCode.js +13 -9
  98. package/dist/rules/imports/noTestCode.js.map +1 -1
  99. package/dist/rules/maxLines.d.ts.map +1 -1
  100. package/dist/rules/maxLines.js +7 -2
  101. package/dist/rules/maxLines.js.map +1 -1
  102. package/dist/rules/stories/specHelpers.d.ts.map +1 -1
  103. package/dist/rules/stories/specHelpers.js +8 -4
  104. package/dist/rules/stories/specHelpers.js.map +1 -1
  105. package/dist/rules/suppressions/{directives.d.ts → in.d.ts} +1 -1
  106. package/dist/rules/suppressions/in.d.ts.map +1 -0
  107. package/dist/rules/suppressions/{directives.js → in.js} +1 -1
  108. package/dist/rules/suppressions/in.js.map +1 -0
  109. package/dist/rules/suppressions/noInline.js +1 -1
  110. package/dist/rules/suppressions/noInline.js.map +1 -1
  111. package/dist/rules/test-names/colocated.d.ts.map +1 -1
  112. package/dist/rules/test-names/colocated.js +7 -4
  113. package/dist/rules/test-names/colocated.js.map +1 -1
  114. package/dist/rules/test-names/follow.d.ts.map +1 -1
  115. package/dist/rules/test-names/follow.js +13 -6
  116. package/dist/rules/test-names/follow.js.map +1 -1
  117. package/package.json +3 -3
  118. package/src/adapters/asymmetricMatcher.ts +33 -0
  119. package/src/adapters/knip/configuration.ts +2 -5
  120. package/src/adapters/pureReader.ts +56 -0
  121. package/src/adapters/readConfig.ts +1 -1
  122. package/src/adapters/scriptPaths.ts +5 -0
  123. package/src/adapters/specReaderSources.ts +77 -0
  124. package/src/cli/args.ts +2 -2
  125. package/src/cli/fix.ts +1 -2
  126. package/src/cli/limits.ts +1 -0
  127. package/src/cli/program.ts +1 -1
  128. package/src/cli/subcommands.ts +5 -0
  129. package/{dist/cli/messages.js → src/cli/usage.ts} +0 -6
  130. package/{dist/config/constants.js → src/config/defaultExtensions.ts} +0 -2
  131. package/src/config/file.ts +1 -0
  132. package/src/config/load.ts +1 -1
  133. package/src/hooks/install.ts +1 -1
  134. package/src/imports/testComposition.ts +47 -0
  135. package/src/naming/adapters/plainData.ts +88 -0
  136. package/src/naming/constantModule.ts +28 -0
  137. package/src/naming/ownExports.ts +11 -28
  138. package/src/naming/packageTests.ts +24 -0
  139. package/src/naming/testCode.ts +62 -0
  140. package/src/rules/comments/kinds.ts +1 -1
  141. package/src/rules/files/namedAfterExport.ts +28 -11
  142. package/src/rules/imports/manifest.ts +18 -10
  143. package/src/rules/imports/noTestCode.ts +13 -12
  144. package/src/rules/maxLines.ts +7 -3
  145. package/src/rules/stories/specHelpers.ts +14 -4
  146. package/src/rules/suppressions/noInline.ts +1 -1
  147. package/src/rules/test-names/colocated.ts +7 -4
  148. package/src/rules/test-names/follow.ts +13 -6
  149. package/dist/cli/messages.d.ts.map +0 -1
  150. package/dist/cli/messages.js.map +0 -1
  151. package/dist/cli/options.d.ts.map +0 -1
  152. package/dist/cli/options.js.map +0 -1
  153. package/dist/config/constants.d.ts +0 -3
  154. package/dist/config/constants.d.ts.map +0 -1
  155. package/dist/config/constants.js.map +0 -1
  156. package/dist/naming/migrationFile.d.ts.map +0 -1
  157. package/dist/naming/migrationFile.js.map +0 -1
  158. package/dist/rules/suppressions/directives.d.ts.map +0 -1
  159. package/dist/rules/suppressions/directives.js.map +0 -1
  160. /package/src/cli/{options.ts → misplaced.ts} +0 -0
  161. /package/src/naming/{migrationFile.ts → isMigrationFile.ts} +0 -0
  162. /package/src/rules/suppressions/{directives.ts → in.ts} +0 -0
@@ -6,7 +6,7 @@ import { isTooling } from "#imports/isTooling.ts";
6
6
  import { builtinName } from "#imports/packageName.ts";
7
7
  import { packageOf, type WorkspacePackage } from "#imports/workspace.ts";
8
8
  import { dependencyNames, type EntryPoint, entryPointsOf, isApplication, provider, SHIPPED_FIELDS } from "#manifests/entryPoints.ts";
9
- import { isTestCode } from "#naming/testName.ts";
9
+ import { testCode } from "#naming/testCode.ts";
10
10
  import { defineRule, type RuleInputs } from "#rule.ts";
11
11
  import { bundleInputs } from "./bundleInputs.ts";
12
12
 
@@ -38,6 +38,7 @@ const manifestDependencies = Effect.fn("Imports.manifestDependencies")(function*
38
38
  owner: WorkspacePackage,
39
39
  graph: ImportGraph,
40
40
  workspace: ReadonlyMap<string, string>,
41
+ isTestCode: (path: string) => boolean,
41
42
  ): Effect.fn.Return<ManifestDependencies> {
42
43
  const path = posix.join(owner.directory, "package.json");
43
44
  const manifest = yield* Effect.promise(() => readPackageManifest(inputs.readText, path));
@@ -45,7 +46,7 @@ const manifestDependencies = Effect.fn("Imports.manifestDependencies")(function*
45
46
  return yield* Effect.die(new Error("the manifest is missing"));
46
47
  }
47
48
  return {
48
- ...bundleInputs(graph, owner, manifest, (candidate) => developmentFile(owner, candidate)),
49
+ ...bundleInputs(graph, owner, manifest, (candidate) => developmentFile(owner, candidate, isTestCode)),
49
50
  application: isApplication(manifest),
50
51
  development: new Set(dependencyNames(manifest, "devDependencies")),
51
52
  entryPoints: yield* Effect.promise(() => entryPointsOf(inputs, owner.directory, manifest, workspace)),
@@ -54,15 +55,21 @@ const manifestDependencies = Effect.fn("Imports.manifestDependencies")(function*
54
55
  };
55
56
  });
56
57
 
57
- function developmentFile(owner: WorkspacePackage, path: string): boolean {
58
+ function developmentFile(owner: WorkspacePackage, path: string, isTestCode: (path: string) => boolean): boolean {
58
59
  return isTestCode(path) || isTooling(owner.directory, path);
59
60
  }
60
61
 
61
- function developmentImport(policy: ManifestDependencies | undefined, owner: WorkspacePackage, path: string, runtime: ReadonlySet<string>) {
62
+ function developmentImport(
63
+ policy: ManifestDependencies | undefined,
64
+ owner: WorkspacePackage,
65
+ path: string,
66
+ runtime: ReadonlySet<string>,
67
+ isTestCode: (path: string) => boolean,
68
+ ) {
62
69
  if (runtime.has(path)) {
63
70
  return false;
64
71
  }
65
- return developmentFile(owner, path) || policy?.privateFiles.has(path);
72
+ return developmentFile(owner, path, isTestCode) || policy?.privateFiles.has(path);
66
73
  }
67
74
 
68
75
  function declares(policy: ManifestDependencies, target: string, development: boolean): boolean {
@@ -88,6 +95,7 @@ function undeclared(owner: WorkspacePackage, policy: ManifestDependencies | unde
88
95
  export const importsManifest = defineRule({
89
96
  check: Effect.fn("Imports.check")(function* (inputs) {
90
97
  const graph = yield* importGraph(inputs);
98
+ const isTestCode = yield* testCode(inputs);
91
99
  const root: WorkspacePackage | undefined =
92
100
  (yield* Effect.promise(() => readPackageManifest(inputs.readText, "package.json"))) === undefined ? undefined : { directory: ".", name: "." };
93
101
  const owners = [...graph.packages, ...(root === undefined ? [] : [root])];
@@ -96,10 +104,10 @@ export const importsManifest = defineRule({
96
104
  yield* Effect.forEach(
97
105
  owners,
98
106
  (owner) =>
99
- Effect.map(manifestDependencies(inputs, owner, graph, workspace), (policy): readonly [WorkspacePackage, ManifestDependencies] => [
100
- owner,
101
- policy,
102
- ]),
107
+ Effect.map(
108
+ manifestDependencies(inputs, owner, graph, workspace, isTestCode),
109
+ (policy): readonly [WorkspacePackage, ManifestDependencies] => [owner, policy],
110
+ ),
103
111
  { concurrency: "unbounded" },
104
112
  ),
105
113
  );
@@ -115,7 +123,7 @@ export const importsManifest = defineRule({
115
123
  return [];
116
124
  }
117
125
  const policy = policies.get(owner);
118
- const development = developmentImport(policy, owner, request.from, runtime) === true;
126
+ const development = developmentImport(policy, owner, request.from, runtime, isTestCode) === true;
119
127
  if (policy !== undefined && declares(policy, target.name, development)) {
120
128
  return [];
121
129
  }
@@ -1,20 +1,21 @@
1
1
  import { Effect } from "effect";
2
2
  import { importGraph } from "#imports/graph.ts";
3
- import { isTestCode } from "#naming/testName.ts";
3
+ import { testCode } from "#naming/testCode.ts";
4
4
  import { defineRule } from "#rule.ts";
5
5
 
6
6
  export const noTestCode = defineRule({
7
- check: (inputs) =>
8
- Effect.map(importGraph(inputs), (graph) =>
9
- graph.edges
10
- .filter((edge) => !isTestCode(edge.from) && edge.to.kind === "file" && isTestCode(edge.to.path))
11
- .map((edge) => ({
12
- file: edge.from,
13
- line: edge.line,
14
- message: `Imports test code through "${edge.specifier}". Move the shared code into a production module and import it from both production and tests.`,
15
- subject: edge.specifier,
16
- })),
17
- ),
7
+ check: Effect.fn("Imports.check")(function* (inputs) {
8
+ const graph = yield* importGraph(inputs);
9
+ const isTestCode = yield* testCode(inputs);
10
+ return graph.edges
11
+ .filter((edge) => !isTestCode(edge.from) && edge.to.kind === "file" && isTestCode(edge.to.path))
12
+ .map((edge) => ({
13
+ file: edge.from,
14
+ line: edge.line,
15
+ message: `Imports test code through "${edge.specifier}". Move the shared code into a production module and import it from both production and tests.`,
16
+ subject: edge.specifier,
17
+ }));
18
+ }),
18
19
  description: "Production modules import production code. Move shared code out of test files and test-support/ into a production module.",
19
20
  id: "imports/no-test-code",
20
21
  registrable: false,
@@ -1,5 +1,5 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { isTestCode } from "#naming/testName.ts";
2
+ import { testCode } from "#naming/testCode.ts";
3
3
  import { defineRule, type Finding, type SourceFile } from "#rule.ts";
4
4
 
5
5
  const DECLARATION = /\.d\.[cm]?ts$/u;
@@ -25,8 +25,12 @@ function oversized(file: SourceFile, limit: number): readonly Finding[] {
25
25
  }
26
26
 
27
27
  export const maxLines = defineRule({
28
- check: ({ options, sources }) =>
29
- sources.filter((file) => !DECLARATION.test(file.path)).flatMap((file) => oversized(file, isTestCode(file.path) ? options.test : options.source)),
28
+ check: Effect.fn("Structure.check")(function* (inputs) {
29
+ const isTestCode = yield* testCode(inputs);
30
+ return inputs.sources
31
+ .filter((file) => !DECLARATION.test(file.path))
32
+ .flatMap((file) => oversized(file, isTestCode(file.path) ? inputs.options.test : inputs.options.source));
33
+ }),
30
34
  description: "Keep each module to one job. Split a long file along its responsibilities; never golf it under the limit.",
31
35
  id: "structure/max-lines",
32
36
  options: Schema.toStandardSchemaV1(MaxLinesOptions, { parseOptions: { errors: "all", onExcessProperty: "error" } }),
@@ -1,12 +1,22 @@
1
1
  import { Effect } from "effect";
2
+ import { pureReader } from "#adapters/pureReader.ts";
3
+ import { specReaderSources } from "#adapters/specReaderSources.ts";
2
4
  import { defineRule } from "#rule.ts";
3
5
  import { storySources } from "./sources.ts";
4
- import { syntaxFindings, topLevelHelpers } from "./syntax.ts";
6
+ import { findingAt, topLevelHelpers } from "./syntax.ts";
5
7
 
6
- const MESSAGE = "Declares a top-level helper in a spec. Move the action into the story kit's verbs or the setup into its traits in test-support/.";
8
+ const MESSAGE =
9
+ "Declares a setup or action helper in a spec. Move the action into the story kit's verbs or the setup into its traits in test-support/.";
7
10
 
8
11
  export const specHelpers = defineRule({
9
- check: (inputs) => Effect.map(storySources(inputs), (stories) => stories.flatMap((file) => syntaxFindings(file, topLevelHelpers, MESSAGE))),
10
- description: "Specs state expectations; story-kit traits and verbs in test-support own helpers.",
12
+ check: (inputs) =>
13
+ Effect.map(storySources(inputs), (stories) =>
14
+ specReaderSources(stories).flatMap(({ source, readCall }) =>
15
+ topLevelHelpers(source)
16
+ .filter((node) => !pureReader(node, readCall))
17
+ .map((node) => findingAt(source, node, MESSAGE)),
18
+ ),
19
+ ),
20
+ description: "Specs state expectations and may keep pure matchers and readers; story-kit traits and verbs in test-support own setup and actions.",
11
21
  id: "tests/spec-helpers",
12
22
  });
@@ -1,6 +1,6 @@
1
1
  import { defineRule, type Finding, type RuleInputs } from "#rule.ts";
2
2
  import { type SourceComment, scanComments } from "#rules/comments/scan.ts";
3
- import { suppressionIn } from "./directives.ts";
3
+ import { suppressionIn } from "./in.ts";
4
4
  import { STYLESHEET, stylesheetComments } from "./stylesheetComments.ts";
5
5
 
6
6
  const TYPE_TEST = /(?:(?:^|\/)typecheck\.test|\.typecheck\.(?:test|spec))\.[cm]?[jt]sx?$/u;
@@ -1,7 +1,8 @@
1
1
  import { posix } from "node:path";
2
- import { Schema } from "effect";
2
+ import { Effect, Schema } from "effect";
3
3
  import { ignorePatterns } from "#adapters/ignore.ts";
4
4
  import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts";
5
+ import { packageTests } from "#naming/packageTests.ts";
5
6
  import { isTestCode, testName } from "#naming/testName.ts";
6
7
  import { defineRule, type Finding } from "#rule.ts";
7
8
 
@@ -31,11 +32,13 @@ function findingOf(path: string, sourceFolders: ReadonlySet<string>): readonly F
31
32
  }
32
33
 
33
34
  export const testsColocated = defineRule({
34
- check: ({ files, options }) => {
35
+ check: Effect.fn("Tests.check")(function* (inputs) {
36
+ const { files, options } = inputs;
37
+ const trees = yield* packageTests(inputs);
35
38
  const suites = ignorePatterns([...globPatterns(options.suites)]);
36
39
  const sourceFolders = new Set(files.filter((path) => !isTestCode(path)).map((path) => posix.dirname(path)));
37
- return files.filter((path) => !suites.ignores(path)).flatMap((path) => findingOf(path, sourceFolders));
38
- },
40
+ return files.filter((path) => !suites.ignores(path) && trees.sourcePath(path) === undefined).flatMap((path) => findingOf(path, sourceFolders));
41
+ }),
39
42
  description:
40
43
  "A test sits beside the code it covers, at its module root or directly beside its module folder. Outside declared suites, __tests__ is always a test folder; test, tests and spec are test folders only when their directly contained checked files are all tests or test support. Shared test support belongs in test-support/.",
41
44
  id: "tests/colocated",
@@ -1,7 +1,8 @@
1
1
  import { posix } from "node:path";
2
- import { Schema } from "effect";
2
+ import { Effect, Schema } from "effect";
3
3
  import { ignorePatterns } from "#adapters/ignore.ts";
4
4
  import { GlobDeclarations, globPatterns, validateGlobs } from "#config/globs.ts";
5
+ import { packageTests } from "#naming/packageTests.ts";
5
6
  import { ENVIRONMENTS, type TestName, testName } from "#naming/testName.ts";
6
7
  import { CAMEL } from "#naming/words.ts";
7
8
  import { defineRule, type Finding, type SourceFile } from "#rule.ts";
@@ -67,22 +68,28 @@ function environmentMessage(file: string, name: TestName, source: SourceFile): s
67
68
  return `"${file}" uses the DOM, so it is ${name.stem}.dom.${name.kind}${name.extension}${unit} and runs in the dom project.`;
68
69
  }
69
70
 
70
- function findingsOf(source: SourceFile, siblings: ReadonlySet<string>): readonly Finding[] {
71
+ function findingsOf(source: SourceFile, siblings: ReadonlySet<string>, sourcePath: (path: string) => string | undefined): readonly Finding[] {
71
72
  const name = testName(source.path);
72
73
  if (name === undefined) {
73
74
  return [];
74
75
  }
75
76
  const file = posix.basename(source.path);
76
- const messages = [suffixMessage(file, name), placeMessage(file, name, siblings), environmentMessage(file, name, source)];
77
+ const messages = [
78
+ suffixMessage(file, name),
79
+ placeMessage(file, { ...name, folder: posix.dirname(sourcePath(source.path) ?? source.path) }, siblings),
80
+ environmentMessage(file, name, source),
81
+ ];
77
82
  return messages.flatMap((message) => (message === undefined ? [] : [{ file: source.path, message }]));
78
83
  }
79
84
 
80
85
  export const testsFollow = defineRule({
81
- check: ({ files, options, sources }) => {
86
+ check: Effect.fn("Tests.check")(function* (inputs) {
87
+ const { files, options, sources } = inputs;
88
+ const trees = yield* packageTests(inputs);
82
89
  const suites = ignorePatterns([...globPatterns(options.suites)]);
83
90
  const siblings = siblingsIn(files);
84
- return sources.filter((source) => !suites.ignores(source.path)).flatMap((source) => findingsOf(source, siblings));
85
- },
91
+ return sources.filter((source) => !suites.ignores(source.path)).flatMap((source) => findingsOf(source, siblings, trees.sourcePath));
92
+ }),
86
93
  description:
87
94
  "A .test file follows the file beside it, a .spec names a behaviour of its folder, the only suffix is one modifier of dom, heavy, slow, typecheck and unit, and a test that uses the DOM is a .dom test.",
88
95
  id: "tests/follow",
@@ -1 +0,0 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,84GAwCwC,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAwCqC,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC5D,QAAQ,EAAE,yEAAyE;IACnF,UAAU,EAAE,2BAA2B;IACvC,KAAK,EAAE,uDAAuD;CAC9D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,OAAO;aACnB,OAAO;iBAAI,IAAI,EAAE,QAAQ;;aACzB,MAAM;iBAAI,IAAI,EAAE,QAAQ;;aACxB,QAAQ;iBAAI,IAAI,EAAE,SAAS;;aAC3B,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,gBAAgB;iBAAI,IAAI,EAAE,SAAS;;aACnC,KAAK;iBAAI,IAAI,EAAE,SAAS;;aACxB,IAAI;iBAAI,IAAI,EAAE,QAAQ;;aACtB,IAAI;iBAAI,KAAK,EAAE,GAA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ACvH,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,oBAAoB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAClG,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const CONFIG_FILE = "quality.config.ts";
2
- export declare const DEFAULT_EXTENSIONS: string[];
3
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C,eAAO,MAAM,kBAAkB,UAAiE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrationFile.d.ts","sourceRoot":"","sources":["../../src/naming/migrationFile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,sBAAsB,QAAkD,CAAC;AAEtF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrationFile.js","sourceRoot":"","sources":["../../src/naming/migrationFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAC5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,+CAA+C,CAAC;AAEtF,MAAM,UAAU,eAAe,CAAC,IAAY;IAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,SAAS,KAAK,oBAAoB,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;IAC1G,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,KAAK,SAAS,IAAI,SAAS,KAAK,GAAG,IAAI,oBAAoB,CAAC;IAChF,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../../src/rules/suppressions/directives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EASzC,CAAC;AAYF,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAExE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"directives.js","sourceRoot":"","sources":["../../../src/rules/suppressions/directives.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC9C,yCAAyC;IACzC,gDAAgD;IAChD,qEAAqE;IACrE,uCAAuC;IACvC,kBAAkB;IAClB,4BAA4B;IAC5B,oDAAoD;IACpD,iBAAiB;CACjB,CAAC;AAEF,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AAEjE,MAAM,MAAM,GAAG,WAAW,CAAC;AAE3B,SAAS,WAAW,CAAC,OAAsB,EAAE,IAAY;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IACnG,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;AACzH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAsB;IACnD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;AAC5G,CAAC"}
File without changes
File without changes