Skip to content

Commit ae9451f

Browse files
committed
add linting
1 parent 2c1cea2 commit ae9451f

File tree

6 files changed

+6617
-5337
lines changed

6 files changed

+6617
-5337
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
cache: npm
21+
22+
- run: npm ci
23+
- run: npm test
24+
- run: npm run lint

.prettierrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"printWidth": 140,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"bracketSameLine": false,
10+
"proseWrap": "always",
11+
"arrowParens": "avoid",
12+
"overrides": [
13+
{
14+
"files": "**/*.md",
15+
"options": {
16+
"printWidth": 280
17+
}
18+
}
19+
]
20+
}

eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
...tseslint.configs.recommended,
10+
{
11+
linterOptions: {
12+
reportUnusedDisableDirectives: false
13+
},
14+
rules: {
15+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
16+
'@typescript-eslint/no-explicit-any': 'off'
17+
}
18+
},
19+
eslintConfigPrettier
20+
);

0 commit comments

Comments
 (0)