generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.mjs
31 lines (29 loc) · 1.06 KB
/
eslint.config.mjs
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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
export default tseslint.config({
files: ["**/*.ts", "**/*.mjs"],
extends: [
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
stylistic.configs["recommended-flat"],
],
languageOptions: {
parserOptions: { projectService: true, project: true },
},
rules: {
"@typescript-eslint/explicit-function-return-type": [
"error", { allowExpressions: true },
],
// formatting
"@stylistic/indent": ["warn", 4],
"@stylistic/member-delimiter-style": ["warn",
{ multiline: { delimiter: "semi", requireLast: true } },
],
"@stylistic/semi": ["warn", "always"],
"@stylistic/quotes": ["warn", "double", { avoidEscape: true }],
"@stylistic/brace-style": ["warn", "1tbs"],
"@stylistic/arrow-parens": ["warn", "as-needed"],
},
});