-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
35 lines (35 loc) · 947 Bytes
/
.eslintrc.cjs
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
module.exports = {
env: {
es6: true,
node: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
ignorePatterns: ["/*", "!/src"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["prettier", "@typescript-eslint", "simple-import-sort"],
rules: {
// Prettier conflict resolution
"prettier/prettier": "error",
// Sort imports + exports using a consistent format
"simple-import-sort/exports": "error",
"simple-import-sort/imports": [
"error",
{
groups: [["^\\u0000"], ["^node:"], ["^@?\\w"], ["^"], ["^\\.\\."], ["^\\."]],
},
],
// Allow only underscores to be unused
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_+$",
varsIgnorePattern: "^_+$",
caughtErrorsIgnorePattern: "^_+$",
},
],
},
};