Skip to content

Commit

Permalink
chore: make eslint v9 + husky work
Browse files Browse the repository at this point in the history
  • Loading branch information
vobu committed Oct 24, 2024
1 parent 334360b commit 1b2f27a
Show file tree
Hide file tree
Showing 6 changed files with 8,310 additions and 5,774 deletions.
2 changes: 0 additions & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ""
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
...compat.extends("plugin:@typescript-eslint/recommended", "prettier", "plugin:prettier/recommended"),
{
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module"
},

rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-ts-comment": "warn"
}
}
]
Loading

0 comments on commit 1b2f27a

Please sign in to comment.