@fabriziosalmi/slopless 1.15.2 → 1.16.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.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Its own module because importing it from the CLI ran the CLI. The editor
3
+ * and the MCP server both need this list, and the MCP server speaks JSON-RPC
4
+ * on stdout — a stray "No patterns provided" there is a corrupted protocol,
5
+ * not a stray line.
6
+ */
7
+ /**
8
+ * Paths that are never the author's code. Without these a Django project's
9
+ * collected staticfiles reported 1,122 findings inside xregexp.js and 319 inside
10
+ * jquery.js — real matches, in libraries nobody in that repository wrote.
11
+ *
12
+ * `--init` has written these into `.sloplessignore` all along; applying them
13
+ * without being asked is the difference between a tool that is right by default
14
+ * and one that is right once you have read the manual.
15
+ */
16
+ declare const NEVER_YOURS: string[];
17
+ declare function applyIgnoreRules(files: string[], configIgnore?: string[], root?: string): string[];
18
+ /** The files that survive the ignore rules, and how many each source removed. */
19
+ declare function partitionIgnored(files: string[], configIgnore?: string[], root?: string): {
20
+ kept: string[];
21
+ vendored: number;
22
+ };
23
+
24
+ export { NEVER_YOURS as N, applyIgnoreRules as a, partitionIgnored as p };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { z } from 'zod';
3
+ export { N as NEVER_YOURS, a as applyIgnoreRules, p as partitionIgnored } from './ignore-DOOrJwq6.js';
3
4
 
4
5
  declare const RuleSchema: z.ZodObject<{
5
6
  id: z.ZodString;
@@ -40,6 +41,7 @@ declare const RuleSchema: z.ZodObject<{
40
41
  message: z.ZodOptional<z.ZodString>;
41
42
  }, z.core.$strip>>>;
42
43
  exclude_test_code: z.ZodOptional<z.ZodBoolean>;
44
+ exclude_programs: z.ZodOptional<z.ZodBoolean>;
43
45
  exclude_doc_comments: z.ZodOptional<z.ZodBoolean>;
44
46
  git_check: z.ZodOptional<z.ZodEnum<{
45
47
  committed_env: "committed_env";
@@ -117,28 +119,6 @@ declare const RuleSchema: z.ZodObject<{
117
119
  }, z.core.$strip>;
118
120
  type Rule = z.infer<typeof RuleSchema>;
119
121
 
120
- /**
121
- * `ignore` only accepts paths relative to the working directory and throws on
122
- * anything else, so an absolute path on the command line crashed the whole run.
123
- * Paths outside the project cannot be matched by a .sloplessignore rule at all,
124
- * so they pass through untouched.
125
- */
126
- /**
127
- * Paths that are never the author's code. Without these a Django project's
128
- * collected staticfiles reported 1,122 findings inside xregexp.js and 319 inside
129
- * jquery.js — real matches, in libraries nobody in that repository wrote.
130
- *
131
- * `--init` has written these into `.sloplessignore` all along; applying them
132
- * without being asked is the difference between a tool that is right by default
133
- * and one that is right once you have read the manual.
134
- */
135
- declare const NEVER_YOURS: string[];
136
- declare function applyIgnoreRules(files: string[], configIgnore?: string[]): string[];
137
- /** The files that survive the ignore rules, and how many each source removed. */
138
- declare function partitionIgnored(files: string[], configIgnore?: string[]): {
139
- kept: string[];
140
- vendored: number;
141
- };
142
122
  /**
143
123
  * Narrows the rule set before anything runs.
144
124
  *
@@ -154,4 +134,4 @@ declare function selectRules(rules: Rule[], options: {
154
134
  minSeverity?: string;
155
135
  }): Rule[];
156
136
 
157
- export { NEVER_YOURS, UsageError, applyIgnoreRules, partitionIgnored, selectRules };
137
+ export { UsageError, selectRules };