Skip to content

Commit 40f1137

Browse files
committed
add eslint
1 parent 1ca1388 commit 40f1137

27 files changed

Lines changed: 4985 additions & 1002 deletions

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ jobs:
5858
- name: npm run build
5959
working-directory: ./client/webserver/site
6060
run: npm run build
61+
62+
- name: npm clean-install
63+
working-directory: ./client/webserver/newui
64+
run: npm ci
65+
- name: npm run lint
66+
working-directory: ./client/webserver/newui
67+
run: npm run lint
68+
- name: npm run build
69+
working-directory: ./client/webserver/newui
70+
run: npm run build
6171

6272
lint-docs:
6373
name: Lint Markdown
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
node_modules/
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
warnOnUnsupportedTypeScriptVersion: false,
5+
ecmaFeatures: {
6+
jsx: true
7+
}
8+
},
9+
extends: [
10+
'standard',
11+
'plugin:@typescript-eslint/recommended',
12+
'plugin:react/recommended'
13+
],
14+
env: {
15+
browser: true,
16+
node: true,
17+
es2021: true
18+
},
19+
settings: {
20+
react: {
21+
version: 'detect'
22+
}
23+
},
24+
plugins: [
25+
'@typescript-eslint',
26+
'react'
27+
],
28+
rules: {
29+
'@typescript-eslint/no-use-before-define': 'off',
30+
'@typescript-eslint/no-explicit-any': 'off',
31+
'@typescript-eslint/indent': 'off',
32+
'no-use-before-define': 'off',
33+
'no-trailing-spaces': 'error',
34+
'no-console': ['off'],
35+
'no-alert': 'error',
36+
'no-eval': 'error',
37+
'no-implied-eval': 'error',
38+
'object-shorthand': 'off',
39+
'quote-props': ['error', 'consistent'],
40+
'object-property-newline': 'off',
41+
'react/react-in-jsx-scope': 'off',
42+
'react/prop-types': 'off'
43+
}
44+
}

0 commit comments

Comments
 (0)