parserOptions: {
sourceType: 'module'
},
- plugins: ["jest"],
+ plugins: ['jest'],
rules: {
'no-debugger': 'error',
'no-unused-vars': [
},
// 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'
"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",
},
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))
}
})
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
- expectError(this.foobar = 1)
+ expectError((this.foobar = 1))
}
})
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))
}
})
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))
}
})
})
},
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))
}
})
expectType<unknown>(this.foo)
expectType<unknown>(this.bar)
// @ts-expect-error
- expectError(this.foobar = 1)
+ expectError((this.foobar = 1))
}
})
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))
}
})
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))
}
})
-})
\ No newline at end of file
+})
union1: 123,
union2: () => [123],
union3: () => ({ x: 123 }),
- union4: () => 123,
+ union4: () => 123
}
)
})