Skip to content

Commit 2bf74d4

Browse files
committed
Add eslint
Steps to reproduce: - Run `npm init @eslint/config` - Add custom rules - Add parserOptions.project - Add lint script - Add eslintignore - Run `npm install --save-dev prettier` - Run `npm install --save-dev eslint-config-prettier` - Run `npm install --save-dev eslint-plugin-prettier` - Add include option to `tsconfig.json` Add eslintignore
1 parent 48fe6e2 commit 2bf74d4

File tree

5 files changed

+4893
-1
lines changed

5 files changed

+4893
-1
lines changed

.eslintignore

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

.eslintrc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"plugin:react/recommended",
9+
"standard-with-typescript"
10+
],
11+
"overrides": [],
12+
"parserOptions": {
13+
"project": "./tsconfig.json"
14+
},
15+
"plugins": [
16+
"react",
17+
"prettier"
18+
],
19+
"rules": {
20+
"prettier/prettier": [
21+
"error",
22+
{
23+
"singleQuote": true,
24+
"semi": false,
25+
"bracketSpacing": true,
26+
"trailingComma": "all",
27+
"bracketSameLine": true
28+
}
29+
],
30+
"react/prop-types": "off",
31+
"comma-dangle": "off",
32+
"@typescript-eslint/comma-dangle": [
33+
"error",
34+
{
35+
"arrays": "always-multiline",
36+
"objects": "always-multiline",
37+
"imports": "always-multiline",
38+
"exports": "always-multiline",
39+
"functions": "always-multiline"
40+
}
41+
],
42+
"space-before-function-paren": "off",
43+
"@typescript-eslint/space-before-function-paren": "off",
44+
"@typescript-eslint/strict-boolean-expressions": "off",
45+
"@typescript-eslint/indent": "off",
46+
"multiline-ternary": "off",
47+
"react/jsx-closing-bracket-location": [
48+
1,
49+
{
50+
"selfClosing": "tag-aligned",
51+
"nonEmpty": "after-props"
52+
}
53+
]
54+
}
55+
}

0 commit comments

Comments
 (0)