Skip to content

Commit 10f85c2

Browse files
committed
chore: add ESLint configuration file and update CI workflow to copy it during setup
1 parent adcb4ca commit 10f85c2

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
run: |
2929
if [ "${{ matrix.node-version }}" = "16" ]; then
3030
31+
cp ./assets/.eslintrc ./.eslintrc
3132
fi
3233
npm install
3334
- run: npm run lint

assets/.eslintrc

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"rules": {
3+
"indent": [
4+
2,
5+
2,
6+
{
7+
"SwitchCase": 1
8+
}
9+
],
10+
"quotes": [2, "single"],
11+
"linebreak-style": [2, "unix"],
12+
"semi": [2, "always"],
13+
"curly": 2,
14+
"eqeqeq": 2,
15+
"no-eval": 2,
16+
"guard-for-in": 2,
17+
"no-caller": 2,
18+
"no-else-return": 2,
19+
"no-eq-null": 2,
20+
"no-extend-native": 2,
21+
"no-extra-bind": 2,
22+
"no-floating-decimal": 2,
23+
"no-implied-eval": 2,
24+
"no-labels": 2,
25+
"no-with": 2,
26+
"no-loop-func": 2,
27+
"no-native-reassign": 2,
28+
"no-redeclare": [
29+
2,
30+
{
31+
"builtinGlobals": true
32+
}
33+
],
34+
"no-delete-var": 2,
35+
"no-shadow-restricted-names": 2,
36+
"no-undef-init": 2,
37+
"no-use-before-define": 2,
38+
"no-unused-vars": [
39+
2,
40+
{
41+
"args": "none"
42+
}
43+
],
44+
"no-undefined": 2,
45+
"no-undef": 2,
46+
"global-require": 0,
47+
"no-console": 2,
48+
"key-spacing": [
49+
2,
50+
{
51+
"beforeColon": false,
52+
"afterColon": true
53+
}
54+
],
55+
"eol-last": [2, "always"],
56+
"no-inner-declarations": [1],
57+
"no-case-declarations": [1],
58+
"no-multiple-empty-lines": [
59+
2,
60+
{
61+
"max": 1,
62+
"maxBOF": 1
63+
}
64+
],
65+
"space-in-parens": [2, "never"],
66+
"no-multi-spaces": [
67+
2,
68+
{
69+
"ignoreEOLComments": true
70+
}
71+
]
72+
},
73+
"env": {
74+
"es6": true,
75+
"node": true,
76+
"browser": true
77+
},
78+
"globals": {
79+
"describe": true,
80+
"it": true,
81+
"before": true,
82+
"after": true,
83+
"beforeEach": true
84+
},
85+
"parserOptions": {
86+
"ecmaVersion": 2018,
87+
"sourceType": "script",
88+
"ecmaFeatures": {}
89+
},
90+
"extends": "eslint:recommended"
91+
}

0 commit comments

Comments
 (0)