Skip to content

Commit d5dc931

Browse files
KyrylRArvolear
andauthored
Add linter + stabilize version (#29)
* Updated package.json * Stabilized version + Linting * Added CI * Added CI --------- Co-authored-by: Artem Chystiakov <[email protected]>
1 parent f1ed313 commit d5dc931

File tree

10 files changed

+1856
-100
lines changed

10 files changed

+1856
-100
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
- dev
10+
11+
jobs:
12+
test:
13+
name: 'Node.js v${{ matrix.node }}'
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node:
18+
- 22
19+
20+
steps:
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: '${{ matrix.node }}'
24+
25+
- uses: actions/checkout@v4
26+
27+
- name: 'Cache node_modules'
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-v${{ matrix.node }}-
34+
35+
- name: Install Dependencies
36+
run: npm install
37+
38+
- name: Run eslint
39+
run: npm run eslint-check

eslint.config.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import js from "@eslint/js";
2+
3+
import { defineConfig } from "eslint/config";
4+
import globals from "globals";
5+
import tseslint from "typescript-eslint";
6+
7+
export default defineConfig(
8+
{
9+
ignores: ["dist/**", "node_modules/**", "generated-types/**", "artifacts/**", "coverage/**"],
10+
},
11+
js.configs.recommended,
12+
...tseslint.configs.recommended,
13+
{
14+
files: ["**/*.ts"],
15+
languageOptions: {
16+
parser: tseslint.parser,
17+
parserOptions: {
18+
project: "./tsconfig.json",
19+
tsconfigRootDir: process.cwd(),
20+
},
21+
globals: {
22+
...globals.node,
23+
},
24+
},
25+
plugins: {
26+
"@typescript-eslint": tseslint.plugin,
27+
},
28+
rules: {
29+
"@typescript-eslint/ban-ts-comment": "off",
30+
"@typescript-eslint/no-explicit-any": "off",
31+
"@typescript-eslint/no-unused-expressions": "off",
32+
"@typescript-eslint/no-floating-promises": "error",
33+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }],
34+
},
35+
},
36+
);

0 commit comments

Comments
 (0)