Skip to content

Commit ba3fbaf

Browse files
committed
chore: add built files
1 parent cd602ed commit ba3fbaf

File tree

7 files changed

+111
-9
lines changed

7 files changed

+111
-9
lines changed

dist/types/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./linter-ui-default/

dist/types/atom.d.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { TextEditor } from 'atom'
2+
3+
// Missing Atom API
4+
declare module 'atom' {
5+
interface CompositeDisposable {
6+
disposed: boolean
7+
}
8+
interface Pane {
9+
getPendingItem(): TextEditor
10+
}
11+
interface Notification {
12+
getOptions(): { detail: string }
13+
}
14+
}

dist/types/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './linter'
2+
export * from './linter-ui-default'

dist/types/linter-ui-default.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as UI } from './linter-ui-default/main'

dist/types/linter-ui-default/index.d.ts

-8
This file was deleted.

dist/types/linter-ui-default/marked.esm.97cb3e07.d.ts

-1
This file was deleted.

dist/types/linter.d.ts

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import { Range, Point, RangeCompatible, PointCompatible, TextEditor } from 'atom'
2+
3+
export type MessageSolution =
4+
| {
5+
title?: string
6+
position: Range
7+
priority?: number
8+
currentText?: string
9+
replaceWith: string
10+
}
11+
| {
12+
title?: string
13+
position: Range
14+
priority?: number
15+
apply: () => any
16+
}
17+
18+
export type Message = {
19+
// Automatically added by linter
20+
key: string
21+
version: 2
22+
linterName: string
23+
24+
// From providers
25+
location: {
26+
file: string
27+
position: Range
28+
}
29+
reference?: {
30+
file: string
31+
position?: Point
32+
}
33+
url?: string
34+
icon?: string
35+
excerpt: string
36+
severity: 'error' | 'warning' | 'info'
37+
solutions?: Array<MessageSolution> | (() => Promise<Array<MessageSolution>>)
38+
description?: string | (() => Promise<string> | string)
39+
}
40+
41+
/** Alias for {Message} */
42+
export type LinterMessage = Message
43+
44+
/**
45+
* @deprecated Wrong but convertible message format which might some providers use by mistake. This is converted to
46+
* MessageSolution by Linter using `normalizeMessages`
47+
*/
48+
export type MessageSolutionLike = Omit<MessageSolution, 'position'> & {
49+
position: RangeCompatible
50+
}
51+
52+
/**
53+
* @deprecated Wrong but convertible message format which some providers might use. This is converted to MessageSolution by
54+
* Linter using `normalizeMessages`
55+
*/
56+
export type MessageLike = Omit<Message, 'location' | 'reference' | 'solutions'> & {
57+
location: {
58+
file: string
59+
position: RangeCompatible
60+
}
61+
reference?: {
62+
file: string
63+
position?: PointCompatible
64+
}
65+
solutions?: Array<MessageSolutionLike> | (() => Promise<Array<MessageSolutionLike>>)
66+
}
67+
68+
export type LinterResult = Array<Message> | null | undefined
69+
export type Linter = {
70+
// Automatically added
71+
__$sb_linter_version: number
72+
__$sb_linter_activated: boolean
73+
__$sb_linter_request_latest: number
74+
__$sb_linter_request_last_received: number
75+
76+
// From providers
77+
name: string
78+
scope: 'file' | 'project'
79+
lintOnFly?: boolean // <-- legacy
80+
lintsOnChange?: boolean
81+
grammarScopes: Array<string>
82+
lint(textEditor: TextEditor): LinterResult | Promise<LinterResult>
83+
}
84+
85+
export type Indie = {
86+
name: string
87+
}
88+
89+
export type MessagesPatch = {
90+
added: Array<Message>
91+
removed: Array<Message>
92+
messages: Array<Message>
93+
}

0 commit comments

Comments
 (0)