Skip to content

Commit

Permalink
chore: apply format
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 12, 2023
1 parent 4a16b20 commit 4c6176d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
9 changes: 7 additions & 2 deletions .eslintrc.js
Expand Up @@ -6,7 +6,7 @@ module.exports = {
parserOptions: {
sourceType: 'module'
},
plugins: ["jest"],
plugins: ['jest'],
rules: {
'no-debugger': 'error',
'no-unused-vars': [
Expand Down Expand Up @@ -72,7 +72,12 @@ module.exports = {
},
// Node scripts
{
files: ['scripts/**', './*.js', 'packages/**/index.js', 'packages/size-check/**'],
files: [
'scripts/**',
'./*.js',
'packages/**/index.js',
'packages/size-check/**'
],
rules: {
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -9,8 +9,8 @@
"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",
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
"format": "prettier --write --cache --parser typescript \"packages/**/*.ts?(x)\"",
"format-check": "prettier --check --cache --parser typescript \"packages/**/*.ts?(x)\"",
"format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
"format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
"test": "run-s \"test-unit {@}\" \"test-e2e {@}\"",
"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",
Expand Down
14 changes: 7 additions & 7 deletions test-dts/defineComponent.test-d.tsx
Expand Up @@ -1041,13 +1041,13 @@ describe('inject', () => {
},
inject: {
foo: 'foo',
bar: 'bar',
bar: 'bar'
},
created() {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -1059,7 +1059,7 @@ describe('inject', () => {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -1073,13 +1073,13 @@ describe('inject', () => {
bar: {
from: 'pbar',
default: 'bar'
},
}
},
created() {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -1088,9 +1088,9 @@ describe('inject', () => {
props: ['a', 'b'],
created() {
// @ts-expect-error
expectError(this.foo = 1)
expectError((this.foo = 1))
// @ts-expect-error
expectError(this.bar = 1)
expectError((this.bar = 1))
}
})
})
Expand Down
16 changes: 8 additions & 8 deletions test-dts/defineCustomElement.test-d.ts
Expand Up @@ -8,13 +8,13 @@ describe('inject', () => {
},
inject: {
foo: 'foo',
bar: 'bar',
bar: 'bar'
},
created() {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -26,7 +26,7 @@ describe('inject', () => {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -40,13 +40,13 @@ describe('inject', () => {
bar: {
from: 'pfoo',
default: 'bar'
},
}
},
created() {
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
expectError(this.foobar = 1)
expectError((this.foobar = 1))
}
})

Expand All @@ -55,9 +55,9 @@ describe('inject', () => {
props: ['a', 'b'],
created() {
// @ts-expect-error
expectError(this.foo = 1)
expectError((this.foo = 1))
// @ts-expect-error
expectError(this.bar = 1)
expectError((this.bar = 1))
}
})
})
})
2 changes: 1 addition & 1 deletion test-dts/setupHelpers.test-d.ts
Expand Up @@ -70,7 +70,7 @@ describe('defineProps w/ union type declaration + withDefaults', () => {
union1: 123,
union2: () => [123],
union3: () => ({ x: 123 }),
union4: () => 123,
union4: () => 123
}
)
})
Expand Down

0 comments on commit 4c6176d

Please sign in to comment.