Skip to content

Commit eaf2365

Browse files
committed
update linting rules and format
1 parent 53549d0 commit eaf2365

28 files changed

+3342
-1069
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
*.log
1+
**/trace/
2+
.next/*.log
23
.DS_Store
34
node_modules
45
.cache

.eslintrc.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,45 @@
11
module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
4-
plugins: ['@typescript-eslint'],
54
extends: [
65
'react-app',
76
'eslint:recommended',
87
'plugin:@typescript-eslint/recommended',
98
'plugin:react-hooks/recommended',
109
'prettier',
1110
],
11+
rules: {
12+
'@typescript-eslint/no-explicit-any': 'off',
13+
'@typescript-eslint/explicit-module-boundary-types': 'off',
14+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
15+
'@typescript-eslint/no-empty-object-type': 'off',
16+
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
17+
'import/no-anonymous-default-export': 'off',
18+
'@typescript-eslint/ban-ts-comment': 'off',
19+
'no-unused-expressions': 'off',
20+
'@typescript-eslint/no-unused-expressions': 'off',
21+
'@typescript-eslint/no-this-alias': 'off',
22+
'no-empty': 'off',
23+
'@typescript-eslint/no-empty-function': 'off',
24+
'no-sequences': 'off',
25+
'no-restricted-globals': 'off',
26+
'no-fallthrough': 'off',
27+
'default-case': 'off',
28+
'eqeqeq': ['warn', 'smart'],
29+
},
1230
settings: {
1331
react: {
1432
version: 'detect',
1533
},
1634
},
35+
env: {
36+
browser: true,
37+
node: true,
38+
es2021: true,
39+
},
40+
globals: {
41+
globalThis: 'readonly',
42+
self: 'readonly',
43+
location: 'readonly',
44+
},
1745
};

.vscode/settings.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"editor.formatOnSave": false,
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports": "explicit",
5+
"source.fixAll.eslint": "explicit"
6+
},
7+
"eslint.lintTask.options": "-c ./web/.eslintrc.json --ignore-path ./web/.eslintignore .",
8+
"eslint.validate": [
9+
"javascript",
10+
"javascriptreact",
11+
"typescript",
12+
"typescriptreact"
13+
],
14+
"[json]": {
15+
"editor.formatOnSave": true,
16+
"editor.defaultFormatter": "esbenp.prettier-vscode"
17+
},
18+
"[typescriptreact]": {
19+
"editor.formatOnSave": true,
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
21+
},
22+
"[typescript]": {
23+
"editor.formatOnSave": true,
24+
"editor.defaultFormatter": "esbenp.prettier-vscode"
25+
},
26+
"[javascript]": {
27+
"editor.formatOnSave": true,
28+
"editor.defaultFormatter": "esbenp.prettier-vscode"
29+
},
30+
"[javascriptreact]": {
31+
"editor.formatOnSave": true,
32+
"editor.defaultFormatter": "esbenp.prettier-vscode"
33+
},
34+
"[css]": {
35+
"editor.formatOnSave": true,
36+
"editor.defaultFormatter": "esbenp.prettier-vscode"
37+
},
38+
"[scss]": {
39+
"editor.formatOnSave": true,
40+
"editor.defaultFormatter": "esbenp.prettier-vscode"
41+
}
42+
}

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)