-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
51 lines (49 loc) · 1.27 KB
/
eslint.config.js
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
40
41
42
43
44
45
46
47
48
49
50
51
import path from "path";
import { fileURLToPath } from "url";
import { createRequire } from "module";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url);
export default [
// Ignore build directories
{
ignores: ["dist/**", ".svelte-kit/**"],
},
// Base configuration
{
files: ["*.ts", "*.svelte"],
languageOptions: {
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: "./tsconfig.json",
ecmaVersion: "latest",
sourceType: "module",
},
env: {
browser: true,
es2021: true,
},
},
plugins: {
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
svelte3: require("eslint-plugin-svelte3"),
},
settings: {
"svelte3/typescript": () => require("typescript"),
},
rules: {
// Your custom rules here
"no-unused-vars": "warn",
"no-console": "off",
"prefer-const": "error",
eqeqeq: "error",
"space-before-function-paren": ["error", "never"],
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
// Svelte-specific overrides
{
files: ["*.svelte"],
processor: "svelte3/svelte3",
},
];