@amritk/lint 0.3.2 → 0.4.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/AI.md +55 -0
- package/dist/core/document.js +12 -10
- package/dist/core/formats.js +10 -13
- package/dist/core/glob.js +96 -118
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +30 -11
- package/dist/core/jsonpath.js +487 -561
- package/dist/core/lint.js +78 -85
- package/dist/core/plugin.js +21 -29
- package/dist/core/pointers.js +107 -151
- package/dist/core/ruleset.js +0 -0
- package/dist/core/runner.js +214 -272
- package/dist/core/types.js +4 -1
- package/dist/core/validate-ruleset.js +98 -112
- package/dist/fix/apply.d.ts +1 -1
- package/dist/fix/apply.js +58 -96
- package/dist/fix/index.js +7 -2
- package/dist/fix/plugin.js +15 -20
- package/dist/fix/types.d.ts +1 -1
- package/dist/functions/alphabetical.d.ts +1 -1
- package/dist/functions/alphabetical.js +39 -50
- package/dist/functions/casing.d.ts +1 -1
- package/dist/functions/casing.js +39 -45
- package/dist/functions/defined.d.ts +1 -1
- package/dist/functions/defined.js +7 -5
- package/dist/functions/enumeration.d.ts +1 -1
- package/dist/functions/enumeration.js +15 -25
- package/dist/functions/falsy.d.ts +1 -1
- package/dist/functions/falsy.js +7 -5
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.js +60 -44
- package/dist/functions/length.d.ts +1 -1
- package/dist/functions/length.js +22 -32
- package/dist/functions/or.d.ts +1 -1
- package/dist/functions/or.js +18 -24
- package/dist/functions/pattern.d.ts +1 -1
- package/dist/functions/pattern.js +39 -49
- package/dist/functions/schema.d.ts +1 -1
- package/dist/functions/schema.js +93 -119
- package/dist/functions/truthy.d.ts +1 -1
- package/dist/functions/truthy.js +7 -5
- package/dist/functions/typed-enum.d.ts +1 -1
- package/dist/functions/typed-enum.js +33 -36
- package/dist/functions/undefined.d.ts +1 -1
- package/dist/functions/undefined.js +7 -8
- package/dist/functions/unreferenced-reusable-object.d.ts +1 -1
- package/dist/functions/unreferenced-reusable-object.js +35 -47
- package/dist/functions/xor.d.ts +1 -1
- package/dist/functions/xor.js +13 -16
- package/dist/index.d.ts +17 -4
- package/dist/index.js +149 -164
- package/dist/parsers/edit-model.js +316 -444
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +23 -19
- package/dist/parsers/json.js +39 -37
- package/dist/parsers/lines.js +23 -26
- package/dist/parsers/types.js +9 -7
- package/dist/parsers/yaml.js +137 -204
- package/dist/rules/openapi/fixers.js +166 -221
- package/dist/rules/openapi/formats.js +26 -27
- package/dist/rules/openapi/functions/example-validation.d.ts +1 -1
- package/dist/rules/openapi/functions/example-validation.js +98 -138
- package/dist/rules/openapi/functions/helpers.js +8 -10
- package/dist/rules/openapi/functions/index.d.ts +1 -1
- package/dist/rules/openapi/functions/index.js +98 -72
- package/dist/rules/openapi/functions/oas-additional-operations.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-additional-operations.js +16 -22
- package/dist/rules/openapi/functions/oas-discriminator.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-discriminator.js +24 -22
- package/dist/rules/openapi/functions/oas-example-external-value.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-example-external-value.js +13 -21
- package/dist/rules/openapi/functions/oas-example-value.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-example-value.js +24 -27
- package/dist/rules/openapi/functions/oas-mutually-exclusive.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-mutually-exclusive.js +15 -19
- package/dist/rules/openapi/functions/oas-no-nullable.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-no-nullable.js +13 -21
- package/dist/rules/openapi/functions/oas-op-form-data-consume-check.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-op-form-data-consume-check.js +21 -19
- package/dist/rules/openapi/functions/oas-op-id-unique.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-op-id-unique.js +27 -27
- package/dist/rules/openapi/functions/oas-op-params.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-op-params.js +36 -42
- package/dist/rules/openapi/functions/oas-op-security-defined.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-op-security-defined.js +40 -39
- package/dist/rules/openapi/functions/oas-op-success-response.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-op-success-response.js +11 -13
- package/dist/rules/openapi/functions/oas-path-param.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-path-param.js +75 -96
- package/dist/rules/openapi/functions/oas-schema-example-deprecated.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-schema-example-deprecated.js +33 -40
- package/dist/rules/openapi/functions/oas-schema.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-schema.js +9 -14
- package/dist/rules/openapi/functions/oas-server-name-unique.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-server-name-unique.js +21 -19
- package/dist/rules/openapi/functions/oas-server-variables.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-server-variables.js +45 -49
- package/dist/rules/openapi/functions/oas-tag-defined.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-tag-defined.js +20 -20
- package/dist/rules/openapi/functions/oas-tag-kind.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-tag-kind.js +16 -16
- package/dist/rules/openapi/functions/oas-tag-parent-defined.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-tag-parent-defined.js +40 -43
- package/dist/rules/openapi/functions/oas-tags-unique.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-tags-unique.js +18 -16
- package/dist/rules/openapi/functions/oas-unused-component.d.ts +1 -1
- package/dist/rules/openapi/functions/oas-unused-component.js +48 -58
- package/dist/rules/openapi/functions/ref-siblings.d.ts +1 -1
- package/dist/rules/openapi/functions/ref-siblings.js +13 -11
- package/dist/rules/openapi/index.d.ts +2 -1
- package/dist/rules/openapi/index.js +99 -117
- package/dist/rules/openapi/oas.d.ts +1 -1
- package/dist/rules/openapi/oas.js +524 -536
- package/dist/rules/openapi/schemas/index.js +17 -33
- package/dist/rules/openapi/schemas/oas20.json +1 -1592
- package/dist/rules/openapi/schemas/oas30.json +1 -1651
- package/dist/rules/openapi/schemas/oas31.json +1 -1412
- package/dist/rules/openapi/schemas/oas32.json +1 -1684
- package/package.json +11 -6
package/AI.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @amritk/lint — notes for AI coding agents
|
|
2
|
+
|
|
3
|
+
A fast, format-agnostic JSON/YAML style-guide linter: JSON Schema validation
|
|
4
|
+
plus custom rules, emitting findings with exact `line:column` ranges. Full
|
|
5
|
+
reference is [README.md](./README.md).
|
|
6
|
+
|
|
7
|
+
> Pre-alpha: APIs change in **minor** versions.
|
|
8
|
+
|
|
9
|
+
## Minimal example
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { lintDocument } from '@amritk/lint'
|
|
13
|
+
|
|
14
|
+
const ruleset = {
|
|
15
|
+
rules: {
|
|
16
|
+
'require-name': { given: '$', severity: 'error', then: { field: 'name', function: 'truthy' } },
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const findings = await lintDocument('version: 1\n', { ruleset, source: 'service.yaml' })
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Gotchas — where agents fail
|
|
24
|
+
|
|
25
|
+
1. **Two `severity` vocabularies.** In a **ruleset** you author strings
|
|
26
|
+
(`'error' | 'warn' | 'info' | 'hint' | 'off'`). In a **finding** `severity`
|
|
27
|
+
is **numeric** (`0` error, `1` warn, `2` info, `3` hint). Don't cross them.
|
|
28
|
+
2. **Ranges are zero-based** (`{ line, character }` from 0). Add 1 to both to
|
|
29
|
+
print `file:line:col`.
|
|
30
|
+
3. **The engine ships no resolver, no built-in ruleset, no fixers.** `$ref`s are
|
|
31
|
+
only dereferenced if you pass a `resolve` hook (e.g. wrapping
|
|
32
|
+
`@amritk/resolve-refs`); `fixDocument` is a no-op until you supply a
|
|
33
|
+
`FixerRegistry`; `createRuleset()` with no argument runs zero rules.
|
|
34
|
+
4. **`extends` targets are file paths or npm packages only** — there are no
|
|
35
|
+
named built-in rulesets in core. String `extends` resolve relative to
|
|
36
|
+
`rulesetBasePath` (or the ruleset file's own directory).
|
|
37
|
+
5. **OpenAPI support is a separate subpath**, `@amritk/lint/rules/openapi`
|
|
38
|
+
(`createOpenApiRuleset`, `oas`, `oasFixers`, …) — not the package root.
|
|
39
|
+
|
|
40
|
+
## Exports
|
|
41
|
+
|
|
42
|
+
- `lintDocument(input, options?)` → findings only.
|
|
43
|
+
- `lintDocumentWithResult(input, options?)` → `{ diagnostics, output?, pluginData }`.
|
|
44
|
+
- `fixDocument(input, options?)` → `{ output, fixed, applied, remaining }` (needs `fixers`).
|
|
45
|
+
- `createRuleset(def?, basePath?)`, `resolveNamedRuleset(name, basePath?)`,
|
|
46
|
+
`builtinFunctions` (`alphabetical`, `casing`, `truthy`, `pattern`, `schema`, …).
|
|
47
|
+
|
|
48
|
+
## Subpaths
|
|
49
|
+
|
|
50
|
+
| Import | Purpose |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `@amritk/lint` | core engine, `lintDocument`/`fixDocument`, built-in functions |
|
|
53
|
+
| `@amritk/lint/rules/openapi` | ready-made OpenAPI preset (`createOpenApiRuleset`, `oas`) |
|
|
54
|
+
|
|
55
|
+
Install: `bun add @amritk/lint`.
|
package/dist/core/document.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { parseWithPointers
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { parseWithPointers } from "../parsers/index.js";
|
|
2
|
+
const createDocument = (input, options = {}) => {
|
|
3
|
+
const parsed = parseWithPointers(input, options);
|
|
4
|
+
return {
|
|
5
|
+
source: options.source,
|
|
6
|
+
data: parsed.data,
|
|
7
|
+
diagnostics: parsed.diagnostics,
|
|
8
|
+
getLocationForJsonPath: (path, closest = false) => parsed.getLocationForJsonPath(path, closest)
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
createDocument
|
|
11
13
|
};
|
package/dist/core/formats.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
matched.add(name);
|
|
12
|
-
}
|
|
13
|
-
return matched;
|
|
1
|
+
const detectFormats = (document, formats = {}) => {
|
|
2
|
+
const matched = /* @__PURE__ */ new Set();
|
|
3
|
+
for (const [name, detector] of Object.entries(formats)) {
|
|
4
|
+
if (detector(document))
|
|
5
|
+
matched.add(name);
|
|
6
|
+
}
|
|
7
|
+
return matched;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
detectFormats
|
|
14
11
|
};
|
package/dist/core/glob.js
CHANGED
|
@@ -1,132 +1,110 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal glob → RegExp for matching override `files` patterns against document
|
|
3
|
-
* paths. Supports `**` (any path segments), `*` (within a segment), `?`, and
|
|
4
|
-
* brace expansion (`{a,b}`).
|
|
5
|
-
*/
|
|
6
1
|
const REGEXP_SPECIAL = /[\\^$.*+?()[\]{}|/]/;
|
|
7
|
-
/** Splits brace-group content on top-level commas (commas nested in inner braces stay put). */
|
|
8
2
|
const splitTopLevel = (body) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
current += ch;
|
|
3
|
+
const parts = [];
|
|
4
|
+
let depth = 0;
|
|
5
|
+
let current = "";
|
|
6
|
+
for (const ch of body) {
|
|
7
|
+
if (ch === "{")
|
|
8
|
+
depth++;
|
|
9
|
+
else if (ch === "}")
|
|
10
|
+
depth--;
|
|
11
|
+
if (ch === "," && depth === 0) {
|
|
12
|
+
parts.push(current);
|
|
13
|
+
current = "";
|
|
14
|
+
continue;
|
|
23
15
|
}
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
current += ch;
|
|
17
|
+
}
|
|
18
|
+
parts.push(current);
|
|
19
|
+
return parts;
|
|
26
20
|
};
|
|
27
|
-
/**
|
|
28
|
-
* Expands brace alternations (`a.{yaml,yml}` → `a.yaml`, `a.yml`) into concrete
|
|
29
|
-
* globs, cartesian across multiple groups. A group with no top-level comma is
|
|
30
|
-
* left literal (mirroring minimatch), so `{}` in a path does not vanish.
|
|
31
|
-
*/
|
|
32
21
|
const expandBraces = (glob) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
22
|
+
const open = glob.indexOf("{");
|
|
23
|
+
if (open === -1)
|
|
24
|
+
return [glob];
|
|
25
|
+
let depth = 0;
|
|
26
|
+
let close = -1;
|
|
27
|
+
for (let i = open; i < glob.length; i++) {
|
|
28
|
+
if (glob[i] === "{")
|
|
29
|
+
depth++;
|
|
30
|
+
else if (glob[i] === "}") {
|
|
31
|
+
depth--;
|
|
32
|
+
if (depth === 0) {
|
|
33
|
+
close = i;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
48
36
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
}
|
|
38
|
+
if (close === -1)
|
|
39
|
+
return [glob];
|
|
40
|
+
const prefix = glob.slice(0, open);
|
|
41
|
+
const body = glob.slice(open + 1, close);
|
|
42
|
+
const suffix = glob.slice(close + 1);
|
|
43
|
+
const options = splitTopLevel(body);
|
|
44
|
+
if (options.length === 1) {
|
|
45
|
+
return expandBraces(suffix).map((rest) => `${prefix}{${body}}${rest}`);
|
|
46
|
+
}
|
|
47
|
+
const results = [];
|
|
48
|
+
for (const option of options) {
|
|
49
|
+
for (const expandedOption of expandBraces(option)) {
|
|
50
|
+
for (const expandedSuffix of expandBraces(suffix)) {
|
|
51
|
+
results.push(prefix + expandedOption + expandedSuffix);
|
|
52
|
+
}
|
|
58
53
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
for (const expandedOption of expandBraces(option)) {
|
|
62
|
-
for (const expandedSuffix of expandBraces(suffix)) {
|
|
63
|
-
results.push(prefix + expandedOption + expandedSuffix);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return results;
|
|
54
|
+
}
|
|
55
|
+
return results;
|
|
68
56
|
};
|
|
69
|
-
/** Compiles a single (brace-free) glob into an un-anchored RegExp source. */
|
|
70
57
|
const globInnerSource = (glob) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
source += '.*';
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
source += '[^/]*';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else if (char === '?') {
|
|
90
|
-
source += '[^/]';
|
|
91
|
-
}
|
|
92
|
-
else if (char && REGEXP_SPECIAL.test(char)) {
|
|
93
|
-
source += `\\${char}`;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
source += char;
|
|
58
|
+
let source = "";
|
|
59
|
+
for (let i = 0; i < glob.length; i++) {
|
|
60
|
+
const char = glob[i];
|
|
61
|
+
if (char === "*") {
|
|
62
|
+
if (glob[i + 1] === "*") {
|
|
63
|
+
i++;
|
|
64
|
+
if (glob[i + 1] === "/") {
|
|
65
|
+
i++;
|
|
66
|
+
source += "(?:.*/)?";
|
|
67
|
+
} else {
|
|
68
|
+
source += ".*";
|
|
97
69
|
}
|
|
70
|
+
} else {
|
|
71
|
+
source += "[^/]*";
|
|
72
|
+
}
|
|
73
|
+
} else if (char === "?") {
|
|
74
|
+
source += "[^/]";
|
|
75
|
+
} else if (char && REGEXP_SPECIAL.test(char)) {
|
|
76
|
+
source += `\\${char}`;
|
|
77
|
+
} else {
|
|
78
|
+
source += char;
|
|
98
79
|
}
|
|
99
|
-
|
|
80
|
+
}
|
|
81
|
+
return source;
|
|
100
82
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const regex = new RegExp(`^(?:${alternatives.join('|')})$`);
|
|
111
|
-
regexCache.set(glob, regex);
|
|
112
|
-
return regex;
|
|
83
|
+
const regexCache = /* @__PURE__ */ new Map();
|
|
84
|
+
const globToRegExp = (glob) => {
|
|
85
|
+
const cached = regexCache.get(glob);
|
|
86
|
+
if (cached)
|
|
87
|
+
return cached;
|
|
88
|
+
const alternatives = expandBraces(glob).map(globInnerSource);
|
|
89
|
+
const regex = new RegExp(`^(?:${alternatives.join("|")})$`);
|
|
90
|
+
regexCache.set(glob, regex);
|
|
91
|
+
return regex;
|
|
113
92
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
93
|
+
const matchesGlob = (path, patterns) => {
|
|
94
|
+
const basename = path.split("/").pop() ?? path;
|
|
95
|
+
return patterns.some((pattern) => {
|
|
96
|
+
const regex = globToRegExp(pattern);
|
|
97
|
+
if (regex.test(path))
|
|
98
|
+
return true;
|
|
99
|
+
if (!pattern.includes("/"))
|
|
100
|
+
return regex.test(basename);
|
|
101
|
+
if (!pattern.startsWith("/") && !pattern.startsWith("**")) {
|
|
102
|
+
return globToRegExp(`**/${pattern}`).test(path);
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
globToRegExp,
|
|
109
|
+
matchesGlob
|
|
132
110
|
};
|
package/dist/core/index.d.ts
CHANGED
|
@@ -7,5 +7,4 @@ export { type LintPlugin, type LintPluginContext, type LintPluginResult, type Pl
|
|
|
7
7
|
export { pointerToPath, resolveSourceOrigin, resolveSourceOriginFromMap, resolveSourcePath, } from './pointers.js';
|
|
8
8
|
export { type AliasDefinition, createRuleset, type ExtendModifier, type ExtendResolver, type ResolvedExtend, type Ruleset, type RulesetOptions, } from './ruleset.js';
|
|
9
9
|
export { createLinter, type IRunOptions, type Linter } from './runner.js';
|
|
10
|
-
export * from './types.js';
|
|
11
10
|
export { type IRulesetProblem, validateRuleset } from './validate-ruleset.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
1
|
+
import { createDocument } from "./document.js";
|
|
2
|
+
import { detectFormats } from "./formats.js";
|
|
3
|
+
import { globToRegExp, matchesGlob } from "./glob.js";
|
|
4
|
+
import { compileQuery, query, queryCompiled, queryMany } from "./jsonpath.js";
|
|
5
|
+
import { lint, lintWithResult } from "./lint.js";
|
|
6
|
+
import { runPlugins } from "./plugin.js";
|
|
7
|
+
import { pointerToPath, resolveSourceOrigin, resolveSourceOriginFromMap, resolveSourcePath } from "./pointers.js";
|
|
8
|
+
import { createRuleset } from "./ruleset.js";
|
|
9
|
+
import { createLinter } from "./runner.js";
|
|
10
|
+
import { validateRuleset } from "./validate-ruleset.js";
|
|
11
|
+
export {
|
|
12
|
+
compileQuery,
|
|
13
|
+
createDocument,
|
|
14
|
+
createLinter,
|
|
15
|
+
createRuleset,
|
|
16
|
+
detectFormats,
|
|
17
|
+
globToRegExp,
|
|
18
|
+
lint,
|
|
19
|
+
lintWithResult,
|
|
20
|
+
matchesGlob,
|
|
21
|
+
pointerToPath,
|
|
22
|
+
query,
|
|
23
|
+
queryCompiled,
|
|
24
|
+
queryMany,
|
|
25
|
+
resolveSourceOrigin,
|
|
26
|
+
resolveSourceOriginFromMap,
|
|
27
|
+
resolveSourcePath,
|
|
28
|
+
runPlugins,
|
|
29
|
+
validateRuleset
|
|
30
|
+
};
|