-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfea41a
commit 98b46c8
Showing
7 changed files
with
509 additions
and
1,475 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint-staged | ||
yarn lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import eslintJs from "@eslint/js"; | ||
import pluginSecurity from "eslint-plugin-security"; | ||
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort"; | ||
import globals from "globals"; | ||
import path from "path"; | ||
import eslintTs from "typescript-eslint"; | ||
import tseslint from "typescript-eslint"; | ||
import { fileURLToPath } from "url"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: eslintJs.configs.recommended | ||
}); | ||
|
||
export default eslintTs.config( | ||
eslintJs.configs.recommended, | ||
...eslintTs.configs.recommendedTypeChecked, | ||
...compat.extends( | ||
"prettier" | ||
), | ||
{ | ||
ignores: ["**/types.d.ts", "**/*.js", "**/node_modules/"] | ||
}, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.es2020, | ||
...globals.node, | ||
Atomics: "readonly", | ||
SharedArrayBuffer: "readonly" | ||
}, | ||
parserOptions: { | ||
project: "tsconfig.json" | ||
} | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
} | ||
}, | ||
|
||
plugins: { | ||
"@typescript-eslint": tseslint.plugin, | ||
"simple-import-sort": simpleImportSortPlugin, | ||
security: pluginSecurity.configs.recommended, | ||
}, | ||
rules: { | ||
"no-empty-pattern": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
semi: "error" | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,9 @@ | |
"prettier": "prettier --write --config .prettierrc \"{src,test}/**/*.ts\"", | ||
"build": "tsc", | ||
"prebuild": "rimraf ./dist", | ||
"preinstall": "husky install", | ||
"pre-commit": "lint-staged" | ||
"install": "husky init", | ||
"pre-commit": "lint-staged", | ||
"prepare": "husky" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,tsx,js,jsx}": [ | ||
|
@@ -40,27 +41,26 @@ | |
"devDependencies": { | ||
"@commitlint/cli": "^19.3.0", | ||
"@commitlint/config-conventional": "^19.2.2", | ||
"@swc/core": "1.5.25", | ||
"@swc/helpers": "^0.5.11", | ||
"@eslint/js": "^9.8.0", | ||
"@swc/core": "1.7.3", | ||
"@swc/helpers": "^0.5.12", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/jest": "29.5.12", | ||
"@types/node": "^20.14.2", | ||
"@typescript-eslint/eslint-plugin": "^7.12.0", | ||
"@typescript-eslint/parser": "^7.12.0", | ||
"eslint": "8.56.0", | ||
"@types/node": "^22.0.0", | ||
"eslint": "^9.8.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-security": "^3.0.0", | ||
"eslint-plugin-simple-import-sort": "^12.1.0", | ||
"husky": "9.0.11", | ||
"eslint-plugin-security": "^3.0.1", | ||
"eslint-plugin-simple-import-sort": "^12.1.1", | ||
"husky": "9.1.4", | ||
"jest": "29.7.0", | ||
"lint-staged": "^15.2.5", | ||
"prettier": "^3.3.1", | ||
"rimraf": "^5.0.7", | ||
"ts-jest": "29.1.4", | ||
"lint-staged": "^15.2.7", | ||
"prettier": "^3.3.3", | ||
"rimraf": "^6.0.1", | ||
"ts-jest": "29.2.3", | ||
"ts-node": "^10.9.2", | ||
"ts-node-dev": "^2.0.0", | ||
"typescript": "^5.4.5" | ||
"typescript": "5.4.5", | ||
"typescript-eslint": "8.0.0-alpha.10" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
describe("1+1 Test", () => { | ||
test("1+1 is 2", async () => { | ||
test("1+1 is 2", () => { | ||
expect(1 + 1).toBe(2); | ||
}); | ||
}); |
Oops, something went wrong.