Skip to content

Commit 1613064

Browse files
committed
chore: properly config eslint for plugin
1 parent 1a8ab82 commit 1613064

6 files changed

+485
-81
lines changed

.eslintrc

-23
This file was deleted.

.eslintrc.js

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
env: {
5+
node: true,
6+
browser: true
7+
},
8+
plugins: [
9+
"@typescript-eslint"
10+
],
11+
extends: [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/eslint-recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
// NOTE: `project: "./tsconfig.json"` does not work well together with svelte override plugin (TS parser singleton and yadayada)
16+
// If svelte file checking is desired, comment project variables in parserOptions (and deprecation plugin)
17+
// "plugin:deprecation/recommended",
18+
"plugin:svelte/recommended"
19+
],
20+
parserOptions: {
21+
sourceType: "module",
22+
// project: "./tsconfig.json",
23+
extraFileExtensions: [".svelte"],
24+
},
25+
rules: {
26+
"no-unused-vars": "off",
27+
"@typescript-eslint/no-unused-vars": [
28+
"error",
29+
{"args": "none"}
30+
],
31+
"@typescript-eslint/no-explicit-any": [
32+
"error",
33+
{"ignoreRestArgs": true}
34+
],
35+
"@typescript-eslint/ban-ts-comment": "off",
36+
"no-prototype-builtins": "off",
37+
"@typescript-eslint/no-empty-function": "off",
38+
// Ignore A11y rules
39+
"svelte/valid-compile": "off",
40+
},
41+
overrides: [
42+
{
43+
files: ["*.svelte"],
44+
parser: "svelte-eslint-parser",
45+
parserOptions: {
46+
// project: "./tsconfig.json",
47+
parser: "@typescript-eslint/parser",
48+
}
49+
}
50+
],
51+
ignorePatterns: [
52+
"**/*.js",
53+
// "**/*.svelte",
54+
]
55+
}

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@ styles.css
1616
# Exclude sourcemaps
1717
*.map
1818

19-
# obsidian
20-
data.json
21-
2219
# Exclude macOS Finder (System Explorer) View States
2320
.DS_Store

0 commit comments

Comments
 (0)