-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
38 lines (36 loc) · 1.26 KB
/
eslint.config.cjs
File metadata and controls
38 lines (36 loc) · 1.26 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
const parser = require("@typescript-eslint/parser");
const eslintPlugin = require("@typescript-eslint/eslint-plugin");
const stylistic = require("@stylistic/eslint-plugin");
const eslintConfig = [
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": eslintPlugin,
"@stylistic": stylistic,
},
rules: {
...eslintPlugin.configs.recommended.rules,
"@stylistic/comma-spacing": ["error", { before: false, after: true }],
"@stylistic/indent": ["error", 4],
"@stylistic/key-spacing": ["error"],
"@stylistic/space-before-blocks": "error",
"@stylistic/quotes": ["error", "double"],
"@stylistic/no-multi-spaces": "error",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/semi": ["error", "never"],
"@stylistic/space-before-function-paren": [
"error",
{ asyncArrow: "ignore" },
],
},
},
];
module.exports = eslintConfig;