chore: apply format

This commit is contained in:
Anthony Fu 2023-01-12 13:02:33 +01:00
parent 4a16b204be
commit 4c6176d1c4
5 changed files with 25 additions and 20 deletions

View File

@ -6,7 +6,7 @@ module.exports = {
parserOptions: { parserOptions: {
sourceType: 'module' sourceType: 'module'
}, },
plugins: ["jest"], plugins: ['jest'],
rules: { rules: {
'no-debugger': 'error', 'no-debugger': 'error',
'no-unused-vars': [ 'no-unused-vars': [
@ -72,7 +72,12 @@ module.exports = {
}, },
// Node scripts // Node scripts
{ {
files: ['scripts/**', './*.js', 'packages/**/index.js', 'packages/size-check/**'], files: [
'scripts/**',
'./*.js',
'packages/**/index.js',
'packages/size-check/**'
],
rules: { rules: {
'no-restricted-globals': 'off', 'no-restricted-globals': 'off',
'no-restricted-syntax': 'off' 'no-restricted-syntax': 'off'

View File

@ -9,8 +9,8 @@
"size-global": "node scripts/build.js vue runtime-dom -f global -p", "size-global": "node scripts/build.js vue runtime-dom -f global -p",
"size-baseline": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler && cd packages/size-check && vite build && node brotli", "size-baseline": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler && cd packages/size-check && vite build && node brotli",
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts", "lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
"format": "prettier --write --cache --parser typescript \"packages/**/*.ts?(x)\"", "format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
"format-check": "prettier --check --cache --parser typescript \"packages/**/*.ts?(x)\"", "format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
"test": "run-s \"test-unit {@}\" \"test-e2e {@}\"", "test": "run-s \"test-unit {@}\" \"test-e2e {@}\"",
"test-unit": "jest --filter ./scripts/filter-unit.js", "test-unit": "jest --filter ./scripts/filter-unit.js",
"test-e2e": "node scripts/build.js vue -f global -d && jest --filter ./scripts/filter-e2e.js --runInBand", "test-e2e": "node scripts/build.js vue -f global -d && jest --filter ./scripts/filter-e2e.js --runInBand",

View File

@ -1041,13 +1041,13 @@ describe('inject', () => {
}, },
inject: { inject: {
foo: 'foo', foo: 'foo',
bar: 'bar', bar: 'bar'
}, },
created() { created() {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -1059,7 +1059,7 @@ describe('inject', () => {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -1073,13 +1073,13 @@ describe('inject', () => {
bar: { bar: {
from: 'pbar', from: 'pbar',
default: 'bar' default: 'bar'
}, }
}, },
created() { created() {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -1088,9 +1088,9 @@ describe('inject', () => {
props: ['a', 'b'], props: ['a', 'b'],
created() { created() {
// @ts-expect-error // @ts-expect-error
expectError(this.foo = 1) expectError((this.foo = 1))
// @ts-expect-error // @ts-expect-error
expectError(this.bar = 1) expectError((this.bar = 1))
} }
}) })
}) })

View File

@ -8,13 +8,13 @@ describe('inject', () => {
}, },
inject: { inject: {
foo: 'foo', foo: 'foo',
bar: 'bar', bar: 'bar'
}, },
created() { created() {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -26,7 +26,7 @@ describe('inject', () => {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -40,13 +40,13 @@ describe('inject', () => {
bar: { bar: {
from: 'pfoo', from: 'pfoo',
default: 'bar' default: 'bar'
}, }
}, },
created() { created() {
expectType<unknown>(this.foo) expectType<unknown>(this.foo)
expectType<unknown>(this.bar) expectType<unknown>(this.bar)
// @ts-expect-error // @ts-expect-error
expectError(this.foobar = 1) expectError((this.foobar = 1))
} }
}) })
@ -55,9 +55,9 @@ describe('inject', () => {
props: ['a', 'b'], props: ['a', 'b'],
created() { created() {
// @ts-expect-error // @ts-expect-error
expectError(this.foo = 1) expectError((this.foo = 1))
// @ts-expect-error // @ts-expect-error
expectError(this.bar = 1) expectError((this.bar = 1))
} }
}) })
}) })

View File

@ -70,7 +70,7 @@ describe('defineProps w/ union type declaration + withDefaults', () => {
union1: 123, union1: 123,
union2: () => [123], union2: () => [123],
union3: () => ({ x: 123 }), union3: () => ({ x: 123 }),
union4: () => 123, union4: () => 123
} }
) )
}) })