Skip to content

Commit 72aed6a

Browse files
committed
workflow: remove eslint, apply prettier
1 parent 6f8fb22 commit 72aed6a

File tree

261 files changed

+6858
-5809
lines changed

Some content is hidden

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

261 files changed

+6858
-5809
lines changed

.babelrc.js

-13
This file was deleted.

.eslintignore

-3
This file was deleted.

.eslintrc.js

-39
This file was deleted.

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semi: false
2+
singleQuote: true
3+
printWidth: 80
4+
trailingComma: 'none'
5+
arrowParens: 'avoid'

examples/.eslintrc.json

-6
This file was deleted.

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"test:e2e": "npm run build -- web-full-prod,web-server-renderer-basic && vitest run test/e2e",
2929
"test:transition": "karma start test/transition/karma.conf.js",
3030
"test:types": "tsc -p ./types/tsconfig.json",
31-
"lint": "eslint src scripts test",
31+
"format": "prettier --write --parser typescript \"(src|test|packages)/**/*.ts\"",
3232
"ts-check": "tsc -p tsconfig.json --noEmit",
3333
"ts-check:test": "tsc -p test/tsconfig.json --noEmit",
3434
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
@@ -42,7 +42,10 @@
4242
},
4343
"lint-staged": {
4444
"*.js": [
45-
"eslint --fix"
45+
"prettier --write"
46+
],
47+
"*.ts": [
48+
"prettier --parser=typescript --write"
4649
]
4750
},
4851
"repository": {
@@ -65,8 +68,6 @@
6568
"@rollup/plugin-replace": "^4.0.0",
6669
"@types/he": "^1.1.2",
6770
"@types/node": "^17.0.30",
68-
"@typescript-eslint/eslint-plugin": "^5.21.0",
69-
"@typescript-eslint/parser": "^5.21.0",
7071
"acorn": "^8.7.1",
7172
"acorn-walk": "^8.2.0",
7273
"chalk": "^4.0.0",
@@ -77,7 +78,6 @@
7778
"de-indent": "^1.0.2",
7879
"esbuild": "^0.14.39",
7980
"escodegen": "^2.0.0",
80-
"eslint": "^8.14.0",
8181
"file-loader": "^3.0.1",
8282
"hash-sum": "^2.0.0",
8383
"he": "^1.2.0",
@@ -95,6 +95,7 @@
9595
"lru-cache": "^7.8.1",
9696
"marked": "^3.0.8",
9797
"memory-fs": "^0.5.0",
98+
"prettier": "^2.6.2",
9899
"puppeteer": "^14.1.1",
99100
"resolve": "^1.22.0",
100101
"rollup": "^2.70.2",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { WebpackPlugin } from './types/plugin';
2-
declare const Plugin: WebpackPlugin;
3-
export = Plugin;
1+
import { WebpackPlugin } from './types/plugin'
2+
declare const Plugin: WebpackPlugin
3+
export = Plugin
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { WebpackPlugin } from './types/plugin';
2-
declare const Plugin: WebpackPlugin;
3-
export = Plugin;
1+
import { WebpackPlugin } from './types/plugin'
2+
declare const Plugin: WebpackPlugin
3+
export = Plugin
+31-28
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,53 @@
1-
import Vue, { VNode, VNodeDirective } from 'vue';
2-
import { Readable } from 'stream';
1+
import Vue, { VNode, VNodeDirective } from 'vue'
2+
import { Readable } from 'stream'
33

4-
export declare function createRenderer(options?: RendererOptions): Renderer;
4+
export declare function createRenderer(options?: RendererOptions): Renderer
55

6-
export declare function createBundleRenderer(bundle: string | object, options?: BundleRendererOptions): BundleRenderer;
6+
export declare function createBundleRenderer(
7+
bundle: string | object,
8+
options?: BundleRendererOptions
9+
): BundleRenderer
710

8-
type RenderCallback = (err: Error | null, html: string) => void;
11+
type RenderCallback = (err: Error | null, html: string) => void
912

1013
interface Renderer {
11-
renderToString(vm: Vue, callback: RenderCallback): void;
12-
renderToString(vm: Vue, context: object, callback: RenderCallback): void;
13-
renderToString(vm: Vue): Promise<string>;
14-
renderToString(vm: Vue, context: object): Promise<string>;
14+
renderToString(vm: Vue, callback: RenderCallback): void
15+
renderToString(vm: Vue, context: object, callback: RenderCallback): void
16+
renderToString(vm: Vue): Promise<string>
17+
renderToString(vm: Vue, context: object): Promise<string>
1518

16-
renderToStream(vm: Vue, context?: object): Readable;
19+
renderToStream(vm: Vue, context?: object): Readable
1720
}
1821

1922
interface BundleRenderer {
20-
renderToString(callback: RenderCallback): void;
21-
renderToString(context: object, callback: RenderCallback): void;
22-
renderToString(): Promise<string>;
23-
renderToString(context: object): Promise<string>;
23+
renderToString(callback: RenderCallback): void
24+
renderToString(context: object, callback: RenderCallback): void
25+
renderToString(): Promise<string>
26+
renderToString(context: object): Promise<string>
2427

25-
renderToStream(context?: object): Readable;
28+
renderToStream(context?: object): Readable
2629
}
2730

2831
interface RendererOptions {
29-
template?: string;
30-
inject?: boolean;
31-
shouldPreload?: (file: string, type: string) => boolean;
32-
shouldPrefetch?: (file: string, type: string) => boolean;
33-
cache?: RenderCache;
32+
template?: string
33+
inject?: boolean
34+
shouldPreload?: (file: string, type: string) => boolean
35+
shouldPrefetch?: (file: string, type: string) => boolean
36+
cache?: RenderCache
3437
directives?: {
3538
[key: string]: (vnode: VNode, dir: VNodeDirective) => void
36-
};
39+
}
3740
}
3841

3942
interface BundleRendererOptions extends RendererOptions {
40-
clientManifest?: object;
41-
serializer?: (state: object) => string;
42-
runInNewContext?: boolean | 'once';
43-
basedir?: string;
43+
clientManifest?: object
44+
serializer?: (state: object) => string
45+
runInNewContext?: boolean | 'once'
46+
basedir?: string
4447
}
4548

4649
interface RenderCache {
47-
get: (key: string, cb?: (res: string) => void) => string | void;
48-
set: (key: string, val: string) => void;
49-
has?: (key: string, cb?: (hit: boolean) => void) => boolean | void;
50+
get: (key: string, cb?: (res: string) => void) => string | void
51+
set: (key: string, val: string) => void
52+
has?: (key: string, cb?: (hit: boolean) => void) => boolean | void
5053
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { DefinePlugin } from 'webpack';
1+
import { DefinePlugin } from 'webpack'
22

33
interface WebpackPluginOptions {
4-
filename?: string;
4+
filename?: string
55
}
66

77
export interface WebpackPlugin {
88
// NOTE NOT SURE ABOUT THIS
99
// TODO DOUBLE CHECK HERE
10-
new (options?: WebpackPluginOptions): DefinePlugin;
10+
new (options?: WebpackPluginOptions): DefinePlugin
1111
}

0 commit comments

Comments
 (0)