@yahoo/uds-create-config 5.61.0 → 5.62.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/dist/configs/react-native-system.d.ts +9 -0
- package/dist/configs/system.js +2 -0
- package/dist/entities/native/NativeSettings.d.ts +9 -0
- package/dist/entities/native/NativeStyleProperty.js +4 -3
- package/dist/entities/system/Settings.d.ts +18 -0
- package/dist/entities/system/Settings.js +35 -16
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/layer-styles.d.ts +11 -1
- package/dist/framework/layer-styles.js +69 -25
- package/dist/framework/prop-surface.js +18 -3
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/color.d.ts +14 -0
- package/dist/framework/utils/color.js +130 -0
- package/dist/framework/utils/css-length.d.ts +12 -0
- package/dist/framework/utils/css-length.js +16 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/lint/context.d.ts +254 -0
- package/dist/lint/context.js +622 -0
- package/dist/lint/edits.d.ts +77 -0
- package/dist/lint/edits.js +121 -0
- package/dist/lint/index.d.ts +5 -0
- package/dist/lint/index.js +5 -0
- package/dist/lint/lint.d.ts +107 -0
- package/dist/lint/lint.js +91 -0
- package/dist/lint/rules.d.ts +337 -0
- package/dist/lint/rules.js +466 -0
- package/dist/migrations/20261027205147_lint_ignore.d.ts +6 -0
- package/dist/migrations/20261027205147_lint_ignore.js +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Settings } from "../entities/system/Settings.js";
|
|
2
|
+
import { styleSetEdits } from "../entities/system/component-style-set.js";
|
|
3
|
+
import "../index.js";
|
|
4
|
+
import { AUTHORING_LINT_GROUPS, AUTHORING_LINT_RULES, ruleSeverity } from "./rules.js";
|
|
5
|
+
//#region src/lint/edits.ts
|
|
6
|
+
/**
|
|
7
|
+
* The lint's settings and fixes as config edits: how loud a rule is, a finding kept on purpose, and
|
|
8
|
+
* the one value a finding suggests, written where the finding's was. Create's Lint page and the
|
|
9
|
+
* sidebars write these; `uds lint` reads the settings they leave.
|
|
10
|
+
*/
|
|
11
|
+
/** The system's `settings.lint.rules`. */
|
|
12
|
+
const lintSeverities = (config) => (config ? Settings.get(config)?.lint?.rules : void 0) ?? {};
|
|
13
|
+
/** The system's `settings.lint.ignore`. */
|
|
14
|
+
const lintIgnores = (config) => (config ? Settings.get(config)?.lint?.ignore : void 0) ?? [];
|
|
15
|
+
const rulesOf = (group) => Object.keys(AUTHORING_LINT_RULES).filter((rule) => AUTHORING_LINT_RULES[rule].group === group);
|
|
16
|
+
/** A group's severity: its rules' when they agree, `mixed` when one is set apart. */
|
|
17
|
+
function groupSeverity(group, severities) {
|
|
18
|
+
const levels = new Set(rulesOf(group).map((rule) => ruleSeverity(rule, severities)));
|
|
19
|
+
return levels.size === 1 ? [...levels][0] ?? "warn" : "mixed";
|
|
20
|
+
}
|
|
21
|
+
const defaultOff = (group) => "defaultSeverity" in AUTHORING_LINT_GROUPS[group];
|
|
22
|
+
function settingsUpdate(config, data) {
|
|
23
|
+
const item = Settings.get(config);
|
|
24
|
+
return [{
|
|
25
|
+
kind: Settings.kind,
|
|
26
|
+
operation: "update",
|
|
27
|
+
path: item?.path ?? Settings.kind,
|
|
28
|
+
data
|
|
29
|
+
}];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The settings edit that sets a rule or a group to `off`, `warn` or `error`: its entry in
|
|
33
|
+
* `settings.lint.rules`, or none where the default already says it.
|
|
34
|
+
*
|
|
35
|
+
* - A rule's own entry wins over its group's, so a rule set to what its group gives it drops its own.
|
|
36
|
+
* - A group sets each rule that has no entry of its own. Setting it also clears its rules' own entries,
|
|
37
|
+
* so the group's choice is the whole answer, the way a "select all" is.
|
|
38
|
+
* - An experimental group's rules are off until each is named, so that group sets each rule by name.
|
|
39
|
+
*/
|
|
40
|
+
function severityEdits({ config, name, severity }) {
|
|
41
|
+
const severities = { ...lintSeverities(config) };
|
|
42
|
+
if (name in AUTHORING_LINT_GROUPS) {
|
|
43
|
+
const group = name;
|
|
44
|
+
for (const rule of rulesOf(group)) delete severities[rule];
|
|
45
|
+
if (defaultOff(group)) {
|
|
46
|
+
for (const rule of rulesOf(group)) if (severity !== "off") severities[rule] = severity;
|
|
47
|
+
} else if (severity === "warn") delete severities[group];
|
|
48
|
+
else severities[group] = severity;
|
|
49
|
+
} else {
|
|
50
|
+
const rule = name;
|
|
51
|
+
delete severities[rule];
|
|
52
|
+
if (ruleSeverity(rule, severities) !== severity) severities[rule] = severity;
|
|
53
|
+
}
|
|
54
|
+
return settingsUpdate(config, { "lint.rules": Object.keys(severities).length > 0 ? severities : null });
|
|
55
|
+
}
|
|
56
|
+
/** A finding's entry in `settings.lint.ignore`: as narrow as the finding says where it is. */
|
|
57
|
+
function ignoreEntry(site, reason) {
|
|
58
|
+
return {
|
|
59
|
+
rule: site.rule,
|
|
60
|
+
...site.component ? { component: site.component } : {},
|
|
61
|
+
...site.token ? { token: site.token } : {},
|
|
62
|
+
...site.layer ? { layer: site.layer } : {},
|
|
63
|
+
...site.prop ? { prop: site.prop } : {},
|
|
64
|
+
...site.when ? { when: site.when } : {},
|
|
65
|
+
reason
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const ignoreUpdate = (config, ignore) => settingsUpdate(config, { "lint.ignore": ignore.length > 0 ? ignore : null });
|
|
69
|
+
/** The settings edit that keeps a finding, with why: `uds lint` and Create both leave it out. */
|
|
70
|
+
function ignoreEdits({ config, site, reason }) {
|
|
71
|
+
return ignoreUpdate(config, [...lintIgnores(config), ignoreEntry(site, reason)]);
|
|
72
|
+
}
|
|
73
|
+
/** The settings edit that puts an ignored finding back. */
|
|
74
|
+
function restoreEdits({ config, entry }) {
|
|
75
|
+
return ignoreUpdate(config, lintIgnores(config).filter((one) => JSON.stringify(one) !== JSON.stringify(entry)));
|
|
76
|
+
}
|
|
77
|
+
/** The rules whose suggestion is the value to write, at the rule and layer the finding names. */
|
|
78
|
+
const WRITES_SUGGESTION = new Set([
|
|
79
|
+
"low-contrast",
|
|
80
|
+
"literal-matches-token",
|
|
81
|
+
"near-token",
|
|
82
|
+
"number-in-brackets"
|
|
83
|
+
]);
|
|
84
|
+
/** The style change a finding's suggestion makes, when it has one answer and is this system's. */
|
|
85
|
+
function changeOf(site) {
|
|
86
|
+
const { component, suggestion } = site;
|
|
87
|
+
if (site.source || !WRITES_SUGGESTION.has(site.rule)) return void 0;
|
|
88
|
+
const at = site.target ?? site;
|
|
89
|
+
if (!component || !at.layer || !at.prop || suggestion === void 0) return;
|
|
90
|
+
return {
|
|
91
|
+
layer: at.layer,
|
|
92
|
+
prop: at.prop,
|
|
93
|
+
value: site.rule === "number-in-brackets" ? Number(suggestion) : suggestion,
|
|
94
|
+
...at.whenProps ? { when: at.whenProps } : {},
|
|
95
|
+
...at.modifiers ? { modifiers: at.modifiers } : {}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Whether a finding has one value to write, which {@link fixEdits} writes. */
|
|
99
|
+
const hasFix = (site) => changeOf(site) !== void 0;
|
|
100
|
+
/**
|
|
101
|
+
* The edit that writes the suggestion of each finding that has one, where the finding's value was: in
|
|
102
|
+
* the same rule, layer and modifiers. Each component's changes go through one `styleSetEdits`, so two
|
|
103
|
+
* fixes on the same rule and layer write together rather than the second replacing the first.
|
|
104
|
+
*/
|
|
105
|
+
function fixEdits(sites) {
|
|
106
|
+
const byComponent = /* @__PURE__ */ new Map();
|
|
107
|
+
for (const site of sites) {
|
|
108
|
+
const change = changeOf(site);
|
|
109
|
+
if (!change || !site.component) continue;
|
|
110
|
+
const changes = byComponent.get(site.component) ?? [];
|
|
111
|
+
changes.push(change);
|
|
112
|
+
byComponent.set(site.component, changes);
|
|
113
|
+
}
|
|
114
|
+
return [...byComponent].flatMap(([path, changes]) => styleSetEdits({
|
|
115
|
+
path,
|
|
116
|
+
changes,
|
|
117
|
+
isInteraction: () => false
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { fixEdits, groupSeverity, hasFix, ignoreEdits, ignoreEntry, lintIgnores, lintSeverities, restoreEdits, rulesOf, severityEdits };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AUTHORING_LINT_GROUPS, AUTHORING_LINT_RULES, AuthoringLintFix, AuthoringLintGroup, AuthoringLintRule, AuthoringLintSeverity, CONFIG_LINT_RULES, ConfigLintCheck, ConfigReadLintRule, LintReads, lintReads, ruleSeverity } from "./rules.js";
|
|
2
|
+
import { ConfigLintFinding, ConfigLintOptions, LintIgnore, ignoredBy } from "./context.js";
|
|
3
|
+
import { LintFixSite, fixEdits, groupSeverity, hasFix, ignoreEdits, ignoreEntry, lintIgnores, lintSeverities, restoreEdits, rulesOf, severityEdits } from "./edits.js";
|
|
4
|
+
import { AuthoringLintEdit, AuthoringLintFinding, AuthoringLintResult, LintIgnoreProblem, LintRun, LintSources, lint, lintConfig } from "./lint.js";
|
|
5
|
+
export { AUTHORING_LINT_GROUPS, AUTHORING_LINT_RULES, AuthoringLintEdit, AuthoringLintFinding, AuthoringLintFix, AuthoringLintGroup, AuthoringLintResult, AuthoringLintRule, AuthoringLintSeverity, CONFIG_LINT_RULES, ConfigLintCheck, type ConfigLintFinding, type ConfigLintOptions, ConfigReadLintRule, LintFixSite, type LintIgnore, LintIgnoreProblem, LintReads, LintRun, LintSources, fixEdits, groupSeverity, hasFix, ignoreEdits, ignoreEntry, ignoredBy, lint, lintConfig, lintIgnores, lintReads, lintSeverities, restoreEdits, ruleSeverity, rulesOf, severityEdits };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ignoredBy } from "./context.js";
|
|
2
|
+
import { AUTHORING_LINT_GROUPS, AUTHORING_LINT_RULES, CONFIG_LINT_RULES, lintReads, ruleSeverity } from "./rules.js";
|
|
3
|
+
import { fixEdits, groupSeverity, hasFix, ignoreEdits, ignoreEntry, lintIgnores, lintSeverities, restoreEdits, rulesOf, severityEdits } from "./edits.js";
|
|
4
|
+
import { lint, lintConfig } from "./lint.js";
|
|
5
|
+
export { AUTHORING_LINT_GROUPS, AUTHORING_LINT_RULES, CONFIG_LINT_RULES, fixEdits, groupSeverity, hasFix, ignoreEdits, ignoreEntry, ignoredBy, lint, lintConfig, lintIgnores, lintReads, lintSeverities, restoreEdits, ruleSeverity, rulesOf, severityEdits };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Config } from "../framework/Config.js";
|
|
2
|
+
import { AuthoringLintFix, AuthoringLintRule, AuthoringLintSeverity } from "./rules.js";
|
|
3
|
+
import { ConfigLintFinding, ConfigLintOptions } from "./context.js";
|
|
4
|
+
|
|
5
|
+
//#region src/lint/lint.d.ts
|
|
6
|
+
/** One text replacement an `auto` fix makes: `text` in place of `[start, end)` in `file`. */
|
|
7
|
+
interface AuthoringLintEdit {
|
|
8
|
+
/** Absolute. */
|
|
9
|
+
readonly file: string;
|
|
10
|
+
readonly start: number;
|
|
11
|
+
readonly end: number;
|
|
12
|
+
readonly text: string;
|
|
13
|
+
}
|
|
14
|
+
/** A finding at a line of the sources. */
|
|
15
|
+
interface AuthoringLintFinding {
|
|
16
|
+
readonly rule: AuthoringLintRule;
|
|
17
|
+
readonly severity: Exclude<AuthoringLintSeverity, 'off'>;
|
|
18
|
+
/** The component whose declaration holds the site, or the file's helper name outside one. */
|
|
19
|
+
readonly owner: string;
|
|
20
|
+
/** Relative to the config's directory. */
|
|
21
|
+
readonly file: string;
|
|
22
|
+
/** 1-based. */
|
|
23
|
+
readonly line: number;
|
|
24
|
+
/** 1-based. */
|
|
25
|
+
readonly column: number;
|
|
26
|
+
/** The site as written, on one line, cut short past 80 characters. */
|
|
27
|
+
readonly snippet: string;
|
|
28
|
+
/** What this site in particular does, beyond the rule's own description. */
|
|
29
|
+
readonly detail?: string;
|
|
30
|
+
/** How it gets fixed. */
|
|
31
|
+
readonly fix: AuthoringLintFix;
|
|
32
|
+
/** The edits that make the fix: `uds lint --fix` makes them for an `auto` fix, and for any other
|
|
33
|
+
* they're what a person or an agent would write, to check first. */
|
|
34
|
+
readonly edits?: readonly AuthoringLintEdit[];
|
|
35
|
+
/**
|
|
36
|
+
* The linked system the site changes something of, by its slug. What a system adds over another's
|
|
37
|
+
* may belong in that system instead, where every system linking it would get it, so a finding says
|
|
38
|
+
* whose it is: the change can be proposed there, or made there by its owners.
|
|
39
|
+
*/
|
|
40
|
+
readonly upstream?: string;
|
|
41
|
+
/** Where {@link upstream} is: a sibling in this repo, which the change can be made in, or a copy
|
|
42
|
+
* installed from its publisher, which the next install overwrites. Relative to the config's
|
|
43
|
+
* directory. */
|
|
44
|
+
readonly upstreamAt?: {
|
|
45
|
+
readonly local: boolean;
|
|
46
|
+
readonly path: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
interface AuthoringLintResult {
|
|
50
|
+
readonly findings: AuthoringLintFinding[];
|
|
51
|
+
/** Names in `settings.lint.rules` that are no rule and no group, which set nothing. */
|
|
52
|
+
readonly unknownRules: string[];
|
|
53
|
+
/** `uds-lint-ignore` comments that quiet nothing: one with no reason, one naming no rule, or one
|
|
54
|
+
* with no finding of its rule on its line or the line below. */
|
|
55
|
+
readonly ignores: LintIgnoreProblem[];
|
|
56
|
+
}
|
|
57
|
+
interface LintIgnoreProblem {
|
|
58
|
+
/** Relative to the config's directory. */
|
|
59
|
+
readonly file: string;
|
|
60
|
+
/** 1-based. */
|
|
61
|
+
readonly line: number;
|
|
62
|
+
readonly rule: string;
|
|
63
|
+
readonly problem: 'malformed' | 'no-reason' | 'unknown-rule' | 'unused';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Where the rules that read the sources run. The config says what each rule is and checks the ones
|
|
67
|
+
* that read it; an adapter reads the source files: codegen's from disk for `uds lint`, Create's
|
|
68
|
+
* server from a branch's sealed sources.
|
|
69
|
+
*/
|
|
70
|
+
interface LintSources {
|
|
71
|
+
/**
|
|
72
|
+
* The config as its renders say, for the config's checks: each component's layer tree and the
|
|
73
|
+
* props its render reads, which a build reads off the sources. An adapter whose config already
|
|
74
|
+
* carries them (a built system's) leaves this out.
|
|
75
|
+
*/
|
|
76
|
+
prepare?(config: Config): Config | Promise<Config>;
|
|
77
|
+
/**
|
|
78
|
+
* Runs the rules that read the sources over `config`'s system, and reports each of
|
|
79
|
+
* `configFindings` at the line that writes it.
|
|
80
|
+
*/
|
|
81
|
+
lint(input: {
|
|
82
|
+
readonly config: Config;
|
|
83
|
+
readonly configFindings: readonly ConfigLintFinding[];
|
|
84
|
+
}): AuthoringLintResult | Promise<AuthoringLintResult>;
|
|
85
|
+
}
|
|
86
|
+
/** The rules that read the config, synchronously: what Create runs in the browser on every edit. */
|
|
87
|
+
declare function lintConfig(config: Config, options?: ConfigLintOptions): ConfigLintFinding[];
|
|
88
|
+
/** What {@link lint} found. */
|
|
89
|
+
interface LintRun {
|
|
90
|
+
/** The config's findings, with what `settings.lint.ignore` keeps left out. With sources, these are
|
|
91
|
+
* in {@link sources} too, at their lines. */
|
|
92
|
+
readonly config: readonly ConfigLintFinding[];
|
|
93
|
+
/** What the sources found, when an adapter ran them. */
|
|
94
|
+
readonly sources?: AuthoringLintResult;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Every rule over `config`: the config's checks here, and the rules that read the sources through
|
|
98
|
+
* `sources`. Without an adapter the source rules don't run, and the rules that read both are checked
|
|
99
|
+
* on the config instead.
|
|
100
|
+
*/
|
|
101
|
+
declare function lint(config: Config, {
|
|
102
|
+
sources
|
|
103
|
+
}?: {
|
|
104
|
+
sources?: LintSources;
|
|
105
|
+
}): Promise<LintRun>;
|
|
106
|
+
//#endregion
|
|
107
|
+
export { AuthoringLintEdit, AuthoringLintFinding, AuthoringLintResult, LintIgnoreProblem, LintRun, LintSources, lint, lintConfig };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Settings } from "../entities/system/Settings.js";
|
|
2
|
+
import "../index.js";
|
|
3
|
+
import { configLintContext, ignoredBy } from "./context.js";
|
|
4
|
+
import { AUTHORING_LINT_RULES, lintReads } from "./rules.js";
|
|
5
|
+
//#region src/lint/lint.ts
|
|
6
|
+
/**
|
|
7
|
+
* Running the lint. `lintConfig` runs the rules that read the config, synchronously, wherever a config
|
|
8
|
+
* is loaded. `lint` runs every rule: the config's own, and the ones that read the sources through a
|
|
9
|
+
* {@link LintSources} adapter when one is given.
|
|
10
|
+
*/
|
|
11
|
+
/** The rules that read the config alone; one that reads both is left to the sources when they run. */
|
|
12
|
+
const READS_CONFIG_ONLY = Object.keys(AUTHORING_LINT_RULES).filter((rule) => lintReads(rule) === "config");
|
|
13
|
+
/** The rules that read the config, synchronously: what Create runs in the browser on every edit. */
|
|
14
|
+
function lintConfig(config, options = {}) {
|
|
15
|
+
const rules = options.rules ?? READS_CONFIG_ONLY;
|
|
16
|
+
const ctx = configLintContext({
|
|
17
|
+
config,
|
|
18
|
+
rules: new Set(rules),
|
|
19
|
+
...options.own ? { own: options.own } : {}
|
|
20
|
+
});
|
|
21
|
+
const checks = rules.map((rule) => ({
|
|
22
|
+
rule,
|
|
23
|
+
check: AUTHORING_LINT_RULES[rule].check
|
|
24
|
+
}));
|
|
25
|
+
const findings = [];
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const reporter = (rule) => ({ at, fixAt, token, prop, value, ...rest }) => {
|
|
28
|
+
const finding = {
|
|
29
|
+
rule,
|
|
30
|
+
...at ? ctx.at(at.component.path, at.site) : {},
|
|
31
|
+
...token !== void 0 ? { token } : {},
|
|
32
|
+
...prop !== void 0 ? { prop } : {},
|
|
33
|
+
...value !== void 0 ? { value } : {},
|
|
34
|
+
...rest,
|
|
35
|
+
...fixAt ? { target: ctx.at(fixAt.component.path, fixAt.site) } : {}
|
|
36
|
+
};
|
|
37
|
+
const key = JSON.stringify([
|
|
38
|
+
finding.rule,
|
|
39
|
+
finding.component,
|
|
40
|
+
finding.token,
|
|
41
|
+
finding.when,
|
|
42
|
+
finding.layer,
|
|
43
|
+
finding.prop,
|
|
44
|
+
finding.modifiers
|
|
45
|
+
]);
|
|
46
|
+
if (seen.has(key)) return;
|
|
47
|
+
seen.add(key);
|
|
48
|
+
findings.push(finding);
|
|
49
|
+
};
|
|
50
|
+
const at = (scope) => checks.flatMap(({ rule, check }) => {
|
|
51
|
+
const run = check[scope];
|
|
52
|
+
return run ? [{
|
|
53
|
+
run,
|
|
54
|
+
report: reporter(rule)
|
|
55
|
+
}] : [];
|
|
56
|
+
});
|
|
57
|
+
const byValue = at("value");
|
|
58
|
+
const byLayer = at("layer");
|
|
59
|
+
const byComponent = at("component");
|
|
60
|
+
const bySystem = at("system");
|
|
61
|
+
for (const component of ctx.components) {
|
|
62
|
+
if (byValue.length > 0) for (const site of component.sites) {
|
|
63
|
+
if (typeof site.value !== "string" && typeof site.value !== "number") continue;
|
|
64
|
+
const value = ctx.value(component, site);
|
|
65
|
+
for (const { run, report } of byValue) run(ctx, value, report);
|
|
66
|
+
}
|
|
67
|
+
if (byLayer.length > 0) for (const layer of ctx.layers(component)) for (const { run, report } of byLayer) run(ctx, layer, report);
|
|
68
|
+
for (const { run, report } of byComponent) run(ctx, component, report);
|
|
69
|
+
}
|
|
70
|
+
for (const { run, report } of bySystem) run(ctx, report);
|
|
71
|
+
return findings;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Every rule over `config`: the config's checks here, and the rules that read the sources through
|
|
75
|
+
* `sources`. Without an adapter the source rules don't run, and the rules that read both are checked
|
|
76
|
+
* on the config instead.
|
|
77
|
+
*/
|
|
78
|
+
async function lint(config, { sources } = {}) {
|
|
79
|
+
const ignores = Settings.get(config)?.lint?.ignore ?? [];
|
|
80
|
+
const found = lintConfig(sources?.prepare ? await sources.prepare(config) : config, sources ? {} : { rules: Object.keys(AUTHORING_LINT_RULES).filter((rule) => lintReads(rule) !== "code") }).filter((finding) => !ignoredBy(ignores, finding));
|
|
81
|
+
if (!sources) return { config: found };
|
|
82
|
+
return {
|
|
83
|
+
config: found,
|
|
84
|
+
sources: await sources.lint({
|
|
85
|
+
config,
|
|
86
|
+
configFindings: found
|
|
87
|
+
})
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { lint, lintConfig };
|