build: type-check worker with isolated globals
This commit is contained in:
@@ -27,6 +27,7 @@ export default tseslint.config(
|
||||
})),
|
||||
{
|
||||
files: ["src/**/*.ts", "tests/**/*.ts"],
|
||||
ignores: ["src/decode-history-worker.ts"],
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
parserOptions: {
|
||||
@@ -40,4 +41,19 @@ export default tseslint.config(
|
||||
"@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["src/decode-history-worker.ts"],
|
||||
languageOptions: {
|
||||
globals: globals.worker,
|
||||
parserOptions: {
|
||||
project: "./tsconfig.worker.json",
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"no-undef": "off",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/restrict-template-expressions": ["error", { allowNumber: true }],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user