Skip to content

Commit ae998b7

Browse files
committed
Add Prettier, refactor ESLint
1 parent ee09aa5 commit ae998b7

File tree

7 files changed

+759
-1380
lines changed

7 files changed

+759
-1380
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist/

.eslintrc.json

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,14 @@
11
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
24
"env": {
3-
"es2020": true,
45
"node": true
56
},
6-
"extends": [
7-
"airbnb-typescript/base"
8-
],
9-
"parser": "@typescript-eslint/parser",
10-
"parserOptions": {
11-
"project": "./tsconfig.json"
12-
},
13-
"plugins": [
14-
"@typescript-eslint",
15-
"typescript-sort-keys",
16-
"sort-keys-fix",
17-
"unused-imports"
18-
],
19-
"root": true,
20-
"overrides": [
21-
{
22-
"files": "docs/api/compiler.ts",
23-
"rules": {
24-
"no-console": "off"
25-
}
26-
}
27-
],
7+
"plugins": ["@typescript-eslint", "typescript-sort-keys", "sort-keys-fix", "unused-imports", "prettier"],
8+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:typescript-sort-keys/recommended"],
289
"rules": {
29-
"@typescript-eslint/no-use-before-define": "off",
30-
"guard-for-in": "off",
31-
"import/no-cycle": "off",
32-
"import/no-default-export": "error",
33-
"import/order": ["warn", {"alphabetize": {"order": "asc", "caseInsensitive": true}}],
34-
"import/prefer-default-export": "off",
35-
"max-classes-per-file": "off",
36-
"max-len": "off",
37-
"newline-after-var": "warn",
38-
"newline-before-return": "warn",
39-
"no-console": "warn",
40-
"no-multiple-empty-lines": ["warn", {"max": 1, "maxBOF": 0, "maxEOF": 0}],
41-
"no-param-reassign": "off",
42-
"no-restricted-syntax": "off",
43-
"padding-line-between-statements": ["warn", {"blankLine": "never", "prev": "import", "next": "import"}],
44-
"sort-keys-fix/sort-keys-fix": ["warn", "asc", {"caseSensitive": true, "natural": false}],
45-
"typescript-sort-keys/interface": "warn",
46-
"unused-imports/no-unused-imports-ts": "warn",
47-
"unused-imports/no-unused-vars-ts": "warn"
10+
"@typescript-eslint/no-explicit-any": "off",
11+
"unused-imports/no-unused-imports": "warn",
12+
"unused-imports/no-unused-vars": "warn"
4813
}
4914
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist/

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "all"
5+
}

0 commit comments

Comments
 (0)