Skip to content

Commit b55eb79

Browse files
committed
Linting and prettier changes
1 parent fca0288 commit b55eb79

File tree

3 files changed

+124
-117
lines changed

3 files changed

+124
-117
lines changed

.eslintrc.json

Lines changed: 117 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,119 @@
11
{
2-
"root": true,
3-
"env": {
4-
"browser": true,
5-
"commonjs": true,
6-
"es2021": true,
7-
"node": true
8-
},
9-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
10-
"parser": "@typescript-eslint/parser",
11-
"parserOptions": {
12-
"ecmaVersion": 12
13-
},
14-
"plugins": ["@typescript-eslint"],
15-
"rules": {
16-
"@typescript-eslint/naming-convention": [
17-
"warn",
18-
{
19-
"selector": "function",
20-
"format": ["camelCase"]
21-
}
22-
],
23-
"@typescript-eslint/no-this-alias": [
24-
"error",
25-
{
26-
"allowedNames": ["that"]
27-
}
28-
],
29-
"@typescript-eslint/semi": "warn",
30-
"semi": "off",
31-
"getter-return": "warn",
32-
"no-dupe-args": "warn",
33-
"no-dupe-else-if": "warn",
34-
"no-dupe-keys": "warn",
35-
"no-duplicate-case": "warn",
36-
"no-empty": "warn",
37-
"accessor-pairs": "warn",
38-
"array-callback-return": "warn",
39-
"block-scoped-var": "warn",
40-
"class-methods-use-this": "warn",
41-
"complexity": "warn",
42-
"consistent-return": "warn",
43-
"curly": "warn",
44-
"default-case": "warn",
45-
"default-case-last": "warn",
46-
"default-param-last": "warn",
47-
"dot-location": "off",
48-
"dot-notation": "warn",
49-
"eqeqeq": "warn",
50-
"grouped-accessor-pairs": "warn",
51-
"guard-for-in": "off",
52-
"max-classes-per-file": ["warn", 2],
53-
"no-alert": "warn",
54-
"no-caller": "warn",
55-
"no-case-declarations": "off",
56-
"no-constructor-return": "warn",
57-
"no-div-regex": "warn",
58-
"no-else-return": "warn",
59-
"no-empty-function": "warn",
60-
"no-empty-pattern": "warn",
61-
"no-eq-null": "warn",
62-
"no-eval": "warn",
63-
"no-extend-native": "off",
64-
"no-extra-bind": "warn",
65-
"no-extra-label": "warn",
66-
"no-fallthrough": "warn",
67-
"no-floating-decimal": "warn",
68-
"no-global-assign": "warn",
69-
"no-implicit-coercion": "warn",
70-
"no-implicit-globals": "warn",
71-
"no-implied-eval": "warn",
72-
"no-invalid-this": "off",
73-
"no-iterator": "warn",
74-
"no-labels": "warn",
75-
"no-lone-blocks": "warn",
76-
"no-loop-func": "warn",
77-
"no-magic-numbers": "off",
78-
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
79-
"no-multi-spaces": "warn",
80-
"no-multi-str": "warn",
81-
"no-new": "warn",
82-
"no-new-func": "warn",
83-
"no-new-wrappers": "warn",
84-
"no-octal": "warn",
85-
"no-octal-escape": "warn",
86-
"no-param-reassign": "warn",
87-
"no-proto": "warn",
88-
"no-redeclare": "off",
89-
"no-restricted-properties": "warn",
90-
"no-return-assign": "warn",
91-
"no-return-await": "warn",
92-
"no-script-url": "warn",
93-
"no-self-assign": "warn",
94-
"no-self-compare": "warn",
95-
"no-sequences": "warn",
96-
"no-throw-literal": "warn",
97-
"no-unmodified-loop-condition": "warn",
98-
"no-unused-expressions": "warn",
99-
"no-unused-labels": "warn",
100-
"no-useless-call": "warn",
101-
"no-useless-catch": "warn",
102-
"no-useless-concat": "warn",
103-
"no-useless-escape": "warn",
104-
"no-useless-return": "warn",
105-
"no-void": "warn",
106-
"no-warning-comments": "warn",
107-
"no-with": "warn",
108-
"prefer-named-capture-group": "warn",
109-
"prefer-promise-reject-errors": "off",
110-
"prefer-regex-literals": "warn",
111-
"radix": "warn",
112-
"require-await": "warn",
113-
"require-unicode-regexp": "off",
114-
"vars-on-top": "warn",
115-
"wrap-iife": "warn"
116-
}
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"commonjs": true,
6+
"es2021": true,
7+
"node": true
8+
},
9+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": 12
13+
},
14+
"plugins": ["@typescript-eslint"],
15+
"rules": {
16+
"@typescript-eslint/no-non-null-assertion": "off",
17+
"@typescript-eslint/ban-ts-comment": "off",
18+
"@typescript-eslint/naming-convention": [
19+
"warn",
20+
{
21+
"selector": "function",
22+
"format": ["camelCase"]
23+
}
24+
],
25+
"@typescript-eslint/no-this-alias": [
26+
"error",
27+
{
28+
"allowedNames": ["that"]
29+
}
30+
],
31+
"@typescript-eslint/semi": "warn",
32+
"semi": "off",
33+
"getter-return": "warn",
34+
"no-dupe-args": "warn",
35+
"no-dupe-else-if": "warn",
36+
"no-dupe-keys": "warn",
37+
"no-duplicate-case": "warn",
38+
"no-empty": "warn",
39+
"accessor-pairs": "warn",
40+
"array-callback-return": "warn",
41+
"block-scoped-var": "warn",
42+
"class-methods-use-this": "warn",
43+
"complexity": "warn",
44+
"consistent-return": "warn",
45+
"curly": "warn",
46+
"default-case": "warn",
47+
"default-case-last": "warn",
48+
"default-param-last": "warn",
49+
"dot-location": "off",
50+
"dot-notation": "warn",
51+
"eqeqeq": "warn",
52+
"grouped-accessor-pairs": "warn",
53+
"guard-for-in": "off",
54+
"max-classes-per-file": ["warn", 2],
55+
"no-alert": "warn",
56+
"no-caller": "warn",
57+
"no-case-declarations": "off",
58+
"no-constructor-return": "warn",
59+
"no-div-regex": "warn",
60+
"no-else-return": "warn",
61+
"no-empty-function": "warn",
62+
"no-empty-pattern": "warn",
63+
"no-eq-null": "warn",
64+
"no-eval": "warn",
65+
"no-extend-native": "off",
66+
"no-extra-bind": "warn",
67+
"no-extra-label": "warn",
68+
"no-fallthrough": "warn",
69+
"no-floating-decimal": "warn",
70+
"no-global-assign": "warn",
71+
"no-implicit-coercion": "warn",
72+
"no-implicit-globals": "warn",
73+
"no-implied-eval": "warn",
74+
"no-invalid-this": "off",
75+
"no-iterator": "warn",
76+
"no-labels": "warn",
77+
"no-lone-blocks": "warn",
78+
"no-loop-func": "warn",
79+
"no-magic-numbers": "off",
80+
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
81+
"no-multi-spaces": "warn",
82+
"no-multi-str": "warn",
83+
"no-new": "warn",
84+
"no-new-func": "warn",
85+
"no-new-wrappers": "warn",
86+
"no-octal": "warn",
87+
"no-octal-escape": "warn",
88+
"no-param-reassign": "warn",
89+
"no-proto": "warn",
90+
"no-redeclare": "off",
91+
"no-restricted-properties": "warn",
92+
"no-return-assign": "warn",
93+
"no-return-await": "warn",
94+
"no-script-url": "warn",
95+
"no-self-assign": "warn",
96+
"no-self-compare": "warn",
97+
"no-sequences": "warn",
98+
"no-throw-literal": "warn",
99+
"no-unmodified-loop-condition": "warn",
100+
"no-unused-expressions": "warn",
101+
"no-unused-labels": "warn",
102+
"no-useless-call": "warn",
103+
"no-useless-catch": "warn",
104+
"no-useless-concat": "warn",
105+
"no-useless-escape": "warn",
106+
"no-useless-return": "warn",
107+
"no-void": "warn",
108+
"no-warning-comments": "warn",
109+
"no-with": "warn",
110+
"prefer-named-capture-group": "warn",
111+
"prefer-promise-reject-errors": "off",
112+
"prefer-regex-literals": "warn",
113+
"radix": "warn",
114+
"require-await": "warn",
115+
"require-unicode-regexp": "off",
116+
"vars-on-top": "warn",
117+
"wrap-iife": "warn"
118+
}
117119
}

.prettierrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"printWidth": 120,
2+
"printWidth": 80,
33
"trailingComma": "all",
44
"singleQuote": true,
5-
"useTabs": true,
5+
"useTabs": false,
66
"tabWidth": 4
77
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.formatOnPaste": true,
4+
"editor.formatOnType": true
5+
}

0 commit comments

Comments
 (0)