Skip to content

Commit bdced18

Browse files
Release shadow version 0.8.2025112538
1 parent 33f6116 commit bdced18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4719
-3
lines changed

dist/Linter.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { BsLintConfig } from './index';
2+
import { ProgramBuilder } from 'brighterscript';
3+
export declare function addJob(job: Promise<void>): Promise<void>;
4+
export default class Linter {
5+
builder: ProgramBuilder;
6+
constructor();
7+
run(config: BsLintConfig): Promise<import("brighterscript").BsDiagnostic[]>;
8+
}

dist/Linter.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Linter.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cli.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
export {};

dist/cli.js

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cli.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/createColorValidator.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { BsLintRules } from './index';
2+
export declare function createColorValidator(severity: Readonly<BsLintRules>): (text: any, range: any, diagnostics: any) => void;

dist/createColorValidator.js

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/createColorValidator.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import { BsConfig, DiagnosticSeverity, CompilerPlugin } from 'brighterscript';
2+
import Linter from './Linter';
3+
export type RuleSeverity = 'error' | 'warn' | 'info' | 'off';
4+
export type RuleInlineIf = 'never' | 'no-then' | 'then' | 'off';
5+
export type RuleBlockIf = 'no-then' | 'then' | 'off';
6+
export type RuleCondition = 'no-group' | 'group' | 'off';
7+
export type RuleFunction = 'no-function' | 'no-sub' | 'auto' | 'off';
8+
export type RuleAAComma = 'always' | 'no-dangling' | 'never' | 'off';
9+
export type RuleTypeAnnotations = 'all' | 'return' | 'args' | 'off';
10+
export type RuleEolLast = 'always' | 'never' | 'off';
11+
export type RuleColorFormat = 'hash-hex' | 'quoted-numeric-hex' | 'never' | 'off';
12+
export type RuleColorCase = 'upper' | 'lower' | 'off';
13+
export type RuleColorAlpha = 'always' | 'allowed' | 'never' | 'off';
14+
export type RuleColorAlphaDefaults = 'allowed' | 'only-hidden' | 'never' | 'off';
15+
export type RuleColorCertCompliant = 'always' | 'off';
16+
export type BsLintConfig = Pick<BsConfig, 'project' | 'rootDir' | 'files' | 'cwd' | 'watch'> & {
17+
lintConfig?: string;
18+
rules?: {
19+
'assign-all-paths'?: RuleSeverity;
20+
'unsafe-path-loop'?: RuleSeverity;
21+
'unsafe-iterators'?: RuleSeverity;
22+
'unreachable-code'?: RuleSeverity;
23+
'case-sensitivity'?: RuleSeverity;
24+
'unused-variable'?: RuleSeverity;
25+
'unused-parameter'?: RuleSeverity;
26+
'consistent-return'?: RuleSeverity;
27+
'no-stop'?: RuleSeverity;
28+
'inline-if-style'?: RuleInlineIf;
29+
'block-if-style'?: RuleBlockIf;
30+
'condition-style'?: RuleCondition;
31+
'named-function-style'?: RuleFunction;
32+
'anon-function-style'?: RuleFunction;
33+
'aa-comma-style'?: RuleAAComma;
34+
'type-annotations'?: RuleTypeAnnotations;
35+
'no-print'?: RuleSeverity;
36+
'no-todo'?: RuleSeverity;
37+
'todo-pattern'?: string;
38+
'eol-last'?: RuleEolLast;
39+
'color-format'?: RuleColorFormat;
40+
'color-case'?: RuleColorCase;
41+
'color-alpha'?: RuleColorAlpha;
42+
'color-alpha-defaults'?: RuleColorAlphaDefaults;
43+
'color-cert'?: RuleColorCertCompliant;
44+
'no-assocarray-component-field-type'?: RuleSeverity;
45+
'no-array-component-field-type'?: RuleSeverity;
46+
'no-regex-duplicates'?: RuleSeverity;
47+
};
48+
globals?: string[];
49+
ignores?: string[];
50+
fix?: boolean;
51+
fixAll?: boolean;
52+
checkUsage?: boolean;
53+
};
54+
export type BsLintSeverity = DiagnosticSeverity;
55+
export interface BsLintRules {
56+
assignAllPath: BsLintSeverity;
57+
unsafePathLoop: BsLintSeverity;
58+
unsafeIterators: BsLintSeverity;
59+
unreachableCode: BsLintSeverity;
60+
caseSensitivity: BsLintSeverity;
61+
unusedVariable: BsLintSeverity;
62+
unusedParameter: BsLintSeverity;
63+
consistentReturn: BsLintSeverity;
64+
inlineIfStyle: RuleInlineIf;
65+
blockIfStyle: RuleBlockIf;
66+
conditionStyle: RuleCondition;
67+
namedFunctionStyle: RuleFunction;
68+
anonFunctionStyle: RuleFunction;
69+
aaCommaStyle: RuleAAComma;
70+
typeAnnotations: RuleTypeAnnotations;
71+
noPrint: BsLintSeverity;
72+
noTodo: BsLintSeverity;
73+
noStop: BsLintSeverity;
74+
eolLast: RuleEolLast;
75+
colorFormat: RuleColorFormat;
76+
colorCase: RuleColorCase;
77+
colorAlpha: RuleColorAlpha;
78+
colorAlphaDefaults: RuleColorAlphaDefaults;
79+
colorCertCompliant: RuleColorCertCompliant;
80+
noAssocarrayComponentFieldType: BsLintSeverity;
81+
noArrayComponentFieldType: BsLintSeverity;
82+
noRegexDuplicates: BsLintSeverity;
83+
}
84+
export { Linter };
85+
export default function factory(): CompilerPlugin;

0 commit comments

Comments
 (0)