Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: lint

on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]

jobs:
eslint:
runs-on: ubuntu-latest
name: ESLint

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm install

- name: Lint
run: npm run lint
14 changes: 14 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import tseslint from 'typescript-eslint'

export default tseslint.config(
{
ignores: ['build/**', 'node_modules/**'],
},
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
}
)
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"scripts": {
"build": "tsc",
"lint": "eslint .",
"test": "npx tsx --test tests/**/*.test.ts",
"prepublishOnly": "npm run build"
},
Expand All @@ -27,8 +28,10 @@
},
"devDependencies": {
"@types/node": "^20.19.37",
"eslint": "^9.0.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
"typescript": "^5.9.3",
"typescript-eslint": "^8.0.0"
},
"license": "MIT"
}
Loading