-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.mjs
More file actions
39 lines (36 loc) · 1.08 KB
/
eslint.config.mjs
File metadata and controls
39 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
/** @type {import('eslint').Linter.Config[]} */
export default [
// Use the `ignores` property instead of a separate .eslintignore file
{
ignores: [
"src/spice.ts",
"src/spice.d.ts",
// ignore build artifacts and bundled output
"dist/**",
"build/**",
// ignore Docker build artifacts
"Docker/**",
// compiled/generated JS (from Emscripten/emsdk or similar)
"src/spice.js",
// temp/test artifacts
"temp/**",
".venv/**",
"node_modules/**",
],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
// Source code runs in the browser (via Vite) by default.
{ files: ["src/**/*.ts"], languageOptions: { globals: globals.browser } },
// Playwright tests run in Node but execute browser callbacks too.
{
files: [
"test/**/*.{ts,mts,cts,js}",
"test/**/*.{spec,test}.{ts,mts,cts,js}",
],
languageOptions: { globals: { ...globals.node, ...globals.browser } },
},
];