Skip to content

Commit 53e262b

Browse files
Replace eslint and prettier rules
1 parent 5099e50 commit 53e262b

File tree

6 files changed

+59
-80
lines changed

6 files changed

+59
-80
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.json

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {},
5-
"plugins": ["@typescript-eslint", "prettier"],
6-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier"],
7-
"rules": {
8-
"prettier/prettier": [
9-
"error",
10-
{
11-
"endOfLine": "auto"
12-
},
13-
{
14-
"singleQuote": true,
15-
"parser": "flow"
16-
}
2+
"env": {
3+
"commonjs": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended"
1710
],
18-
"no-console": "warn",
19-
"eol-last": "error",
20-
"object-curly-spacing": "error",
21-
"array-bracket-spacing": "error",
22-
"block-spacing": "error"
23-
},
24-
"space-in-parens": [
25-
"error",
26-
"always",
27-
{
28-
"exceptions": ["{}"]
29-
}
30-
],
31-
"no-multiple-empty-lines": [
32-
"error",
33-
{
34-
"max": 2,
35-
"maxEOF": 1
36-
}
37-
],
38-
"max-len": [
39-
"error",
40-
{
41-
"ignoreStrings": true,
42-
"ignoreTemplateLiterals": true
11+
"parser": "@typescript-eslint/parser",
12+
"parserOptions": {
13+
"ecmaVersion": 12
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
"indent": [
20+
"error",
21+
4
22+
],
23+
"linebreak-style": [
24+
"error",
25+
"unix"
26+
],
27+
"quotes": [
28+
"error",
29+
"double"
30+
],
31+
"semi": [
32+
"error",
33+
"always"
34+
],
35+
"strict" :"error",
36+
"no-var":"error",
37+
"no-console": ["warn", {"allow": ["info", "error", "warn"]}],
38+
"array-callback-return":"error",
39+
"yoda":"error",
40+
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_", "argsIgnorePattern": "^_"}],
41+
"@typescript-eslint/ban-ts-comment": "off",
42+
"@typescript-eslint/no-non-null-assertion": "off"
4343
}
44-
]
4544
}

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"endOfLine": "lf",
5+
"semi": true,
6+
"singleQuote": false,
7+
"arrowParens": "always",
8+
"trailingComma": "all",
9+
"bracketSpacing": true,
10+
"printWidth": 120,
11+
"proseWrap": "always",
12+
"embeddedLanguageFormatting": "auto"
13+
}

package-lock.json

Lines changed: 1 addition & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@
2525
},
2626
"devDependencies": {
2727
"@types/glob": "^7.2.0",
28-
"@types/ms": "^0.7.31",
2928
"@types/node": "^16.11.11",
30-
"@types/node-fetch": "^3.0.2",
3129
"@typescript-eslint/eslint-plugin": "^5.5.0",
3230
"@typescript-eslint/parser": "^5.5.0",
3331
"eslint": "^8.3.0",
34-
"node-fetch": "^2.6.6",
3532
"prettier": "^2.5.0",
3633
"ts-node-dev": "^1.1.8",
3734
"typescript": "^4.5.2"
3835
}
39-
}
36+
}

0 commit comments

Comments
 (0)