Skip to content

Commit deeb1ff

Browse files
committed
properly configure linter
1 parent 5167cc4 commit deeb1ff

18 files changed

Lines changed: 798 additions & 1657 deletions

File tree

.eslintrc

Lines changed: 0 additions & 35 deletions
This file was deleted.

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// eslint-disable-next-line no-undef
2+
module.exports = {
3+
root: true,
4+
extends: ["eslint:recommended"],
5+
plugins: ["@typescript-eslint"],
6+
rules: {
7+
"no-console": "error",
8+
"no-debugger": "error",
9+
"indent": ["error", 4],
10+
"max-len": ["warn", { "code": 120 }],
11+
"object-curly-spacing": ["error", "always"],
12+
"quotes": ["error", "double"],
13+
"space-before-function-paren": ["error", "never"],
14+
"no-inner-declarations": "off",
15+
"brace-style": ["error", "1tbs"],
16+
"keyword-spacing": "error",
17+
"no-async-promise-executor": "off",
18+
"require-atomic-updates": "off",
19+
"no-unused-vars": "off"
20+
},
21+
parser: "@typescript-eslint/parser",
22+
parserOptions: {
23+
"ecmaVersion": 6,
24+
"sourceType": "module",
25+
},
26+
env: {
27+
"browser": true,
28+
"node": true,
29+
"jest": true
30+
}
31+
}

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '14'
14+
- name: Cache node modules
15+
uses: actions/cache@v2
16+
with:
17+
path: node_modules
18+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-node-
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Install ESLint CLI
24+
run: npm i -g eslint
25+
- name: Run ESLint
26+
run: eslint "src/**/*.ts"
27+

0 commit comments

Comments
 (0)