pickier 0.0.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/cli/run-format.d.ts +11 -0
- package/dist/cli/run-lint.d.ts +27 -0
- package/dist/config.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +7330 -0
- package/dist/types.d.ts +30 -0
- package/dist/utils.d.ts +9 -0
- package/package.json +82 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare interface FormatOptions {
|
|
2
|
+
write?: boolean
|
|
3
|
+
check?: boolean
|
|
4
|
+
config?: string
|
|
5
|
+
ignorePath?: string
|
|
6
|
+
ext?: string
|
|
7
|
+
verbose?: boolean
|
|
8
|
+
}
|
|
9
|
+
declare function expandPatterns(patterns: string[]): string[];
|
|
10
|
+
declare function normalizeWhitespace(src: string): string;
|
|
11
|
+
export declare function runFormat(globs: string[], options: FormatOptions): Promise<number>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PickierConfig } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare interface LintOptions {
|
|
4
|
+
fix?: boolean
|
|
5
|
+
dryRun?: boolean
|
|
6
|
+
maxWarnings?: number
|
|
7
|
+
reporter?: 'stylish' | 'json' | 'compact'
|
|
8
|
+
config?: string
|
|
9
|
+
ignorePath?: string
|
|
10
|
+
ext?: string
|
|
11
|
+
cache?: boolean
|
|
12
|
+
verbose?: boolean
|
|
13
|
+
}
|
|
14
|
+
declare interface LintIssue {
|
|
15
|
+
filePath: string
|
|
16
|
+
line: number
|
|
17
|
+
column: number
|
|
18
|
+
ruleId: string
|
|
19
|
+
message: string
|
|
20
|
+
severity: 'warning' | 'error'
|
|
21
|
+
}
|
|
22
|
+
declare function loadConfigFromPath(pathLike: string | undefined): Promise<PickierConfig>;
|
|
23
|
+
declare function expandPatterns(patterns: string[]): string[];
|
|
24
|
+
declare function isCodeFile(file: string, allowedExts: Set<string>): boolean;
|
|
25
|
+
declare function scanContent(filePath: string, content: string, cfg: PickierConfig): LintIssue[];
|
|
26
|
+
declare function applyFixes(filePath: string, content: string, cfg: PickierConfig): string;
|
|
27
|
+
declare function formatStylish(issues: LintIssue[]): string;
|
package/dist/config.d.ts
ADDED
package/dist/index.d.ts
ADDED