-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: remove eslint, apply prettier
- Loading branch information
Showing
261 changed files
with
6,858 additions
and
5,809 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
semi: false | ||
singleQuote: true | ||
printWidth: 80 | ||
trailingComma: 'none' | ||
arrowParens: 'avoid' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { WebpackPlugin } from './types/plugin'; | ||
declare const Plugin: WebpackPlugin; | ||
export = Plugin; | ||
import { WebpackPlugin } from './types/plugin' | ||
declare const Plugin: WebpackPlugin | ||
export = Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { WebpackPlugin } from './types/plugin'; | ||
declare const Plugin: WebpackPlugin; | ||
export = Plugin; | ||
import { WebpackPlugin } from './types/plugin' | ||
declare const Plugin: WebpackPlugin | ||
export = Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,53 @@ | ||
import Vue, { VNode, VNodeDirective } from 'vue'; | ||
import { Readable } from 'stream'; | ||
import Vue, { VNode, VNodeDirective } from 'vue' | ||
import { Readable } from 'stream' | ||
|
||
export declare function createRenderer(options?: RendererOptions): Renderer; | ||
export declare function createRenderer(options?: RendererOptions): Renderer | ||
|
||
export declare function createBundleRenderer(bundle: string | object, options?: BundleRendererOptions): BundleRenderer; | ||
export declare function createBundleRenderer( | ||
bundle: string | object, | ||
options?: BundleRendererOptions | ||
): BundleRenderer | ||
|
||
type RenderCallback = (err: Error | null, html: string) => void; | ||
type RenderCallback = (err: Error | null, html: string) => void | ||
|
||
interface Renderer { | ||
renderToString(vm: Vue, callback: RenderCallback): void; | ||
renderToString(vm: Vue, context: object, callback: RenderCallback): void; | ||
renderToString(vm: Vue): Promise<string>; | ||
renderToString(vm: Vue, context: object): Promise<string>; | ||
renderToString(vm: Vue, callback: RenderCallback): void | ||
renderToString(vm: Vue, context: object, callback: RenderCallback): void | ||
renderToString(vm: Vue): Promise<string> | ||
renderToString(vm: Vue, context: object): Promise<string> | ||
|
||
renderToStream(vm: Vue, context?: object): Readable; | ||
renderToStream(vm: Vue, context?: object): Readable | ||
} | ||
|
||
interface BundleRenderer { | ||
renderToString(callback: RenderCallback): void; | ||
renderToString(context: object, callback: RenderCallback): void; | ||
renderToString(): Promise<string>; | ||
renderToString(context: object): Promise<string>; | ||
renderToString(callback: RenderCallback): void | ||
renderToString(context: object, callback: RenderCallback): void | ||
renderToString(): Promise<string> | ||
renderToString(context: object): Promise<string> | ||
|
||
renderToStream(context?: object): Readable; | ||
renderToStream(context?: object): Readable | ||
} | ||
|
||
interface RendererOptions { | ||
template?: string; | ||
inject?: boolean; | ||
shouldPreload?: (file: string, type: string) => boolean; | ||
shouldPrefetch?: (file: string, type: string) => boolean; | ||
cache?: RenderCache; | ||
template?: string | ||
inject?: boolean | ||
shouldPreload?: (file: string, type: string) => boolean | ||
shouldPrefetch?: (file: string, type: string) => boolean | ||
cache?: RenderCache | ||
directives?: { | ||
[key: string]: (vnode: VNode, dir: VNodeDirective) => void | ||
}; | ||
} | ||
} | ||
|
||
interface BundleRendererOptions extends RendererOptions { | ||
clientManifest?: object; | ||
serializer?: (state: object) => string; | ||
runInNewContext?: boolean | 'once'; | ||
basedir?: string; | ||
clientManifest?: object | ||
serializer?: (state: object) => string | ||
runInNewContext?: boolean | 'once' | ||
basedir?: string | ||
} | ||
|
||
interface RenderCache { | ||
get: (key: string, cb?: (res: string) => void) => string | void; | ||
set: (key: string, val: string) => void; | ||
has?: (key: string, cb?: (hit: boolean) => void) => boolean | void; | ||
get: (key: string, cb?: (res: string) => void) => string | void | ||
set: (key: string, val: string) => void | ||
has?: (key: string, cb?: (hit: boolean) => void) => boolean | void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { DefinePlugin } from 'webpack'; | ||
import { DefinePlugin } from 'webpack' | ||
|
||
interface WebpackPluginOptions { | ||
filename?: string; | ||
filename?: string | ||
} | ||
|
||
export interface WebpackPlugin { | ||
// NOTE NOT SURE ABOUT THIS | ||
// TODO DOUBLE CHECK HERE | ||
new (options?: WebpackPluginOptions): DefinePlugin; | ||
new (options?: WebpackPluginOptions): DefinePlugin | ||
} |
Oops, something went wrong.