Skip to content

Commit 772b4be

Browse files
authored
Add eslint validation (#33)
1 parent 6e26cf3 commit 772b4be

File tree

4 files changed

+5670
-264
lines changed

4 files changed

+5670
-264
lines changed

Diff for: .eslintrc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:security/recommended"
10+
],
11+
"plugins": [
12+
"security"
13+
],
14+
"rules": {
15+
"quotes": ["warn", "double"], // Enabled for auto fixing
16+
"prefer-const": "off",
17+
"prefer-spread": "off",
18+
"no-var": "off",
19+
"no-extra-boolean-cast": "off",
20+
"prefer-rest-params": "off",
21+
"no-case-declarations": "off",
22+
"no-prototype-builtins": "off",
23+
"no-useless-escape": "off", // Suppressing Error -- need to Review Later
24+
"no-trailing-spaces": [ "warn", { "skipBlankLines": true }],// Enabled for auto fixing
25+
"no-const-assign": "error",
26+
"comma-dangle": [ "error", "never" ], // Enabled for auto fixing
27+
"security/detect-object-injection": "off", // Suppress Warning -- need to Review Later
28+
"@typescript-eslint/ban-types": "off",
29+
"@typescript-eslint/no-unused-vars": [ "warn", { "vars": "all", "args": "none", "argsIgnorePattern": "^_", "ignoreRestSiblings": true } ],
30+
"@typescript-eslint/triple-slash-reference": "off",
31+
"@typescript-eslint/no-inferrable-types": "off",
32+
"@typescript-eslint/no-this-alias": "off",
33+
"@typescript-eslint/no-explicit-any": "off",
34+
"@typescript-eslint/no-empty-function": "off",
35+
"@typescript-eslint/no-empty-interface": "off",
36+
"@typescript-eslint/no-var-requires": "off",
37+
"@typescript-eslint/explicit-module-boundary-types": "off",
38+
"@typescript-eslint/no-extra-semi": "error", // Enabled for auto fixing
39+
"@typescript-eslint/no-non-null-assertion": "error"
40+
}
41+
}

Diff for: .github/workflows/linux.yml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- run: npm ci
2121
- run: npm run build:ts
2222
- run: npm run build
23+
- run: if [[ ${{ matrix.node-version }} == 14 ]]; then npm run lint; fi;
2324
- run: npm test
2425
- run: npm run package
2526
- uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)