Skip to content

Commit

Permalink
fix: using eslint (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahradelahi authored May 21, 2024
1 parent df3b02b commit 643c24a
Show file tree
Hide file tree
Showing 8 changed files with 589 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"env": {
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"no-console": "error",
"@typescript-eslint/semi": "off",
"@typescript-eslint/no-explicit-any": "off"
},
"ignorePatterns": ["dist"]
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm format:check

typecheck:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -39,7 +39,7 @@ jobs:
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm type-check
- run: pnpm lint

tests:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ dist

# Project Settings
.idea


tests/output
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules
/build
dist
tests/output
/.svelte-kit
/package
.env
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
"build": "tsup",
"test": "mocha \"**/*.test.ts\"",
"type-check": "tsc --noEmit",
"lint": "pnpm type-check && eslint .",
"lint:fix": "eslint --fix .",
"format:check": "prettier --check .",
"format": "prettier --write .",
"ci:publish": "pnpm build && changeset publish",
"prepublishOnly": "pnpm test && pnpm format:check && pnpm type-check && pnpm build"
"prepublishOnly": "pnpm test && pnpm lint && pnpm format:check && pnpm build"
},
"packageManager": "pnpm@8.15.7",
"dependencies": {
Expand All @@ -57,7 +59,9 @@
"@types/chai": "^4.3.16",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"chai": "^5.1.1",
"eslint": "^8.57.0",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
Expand Down
Loading

0 comments on commit 643c24a

Please sign in to comment.