-
Notifications
You must be signed in to change notification settings - Fork 95
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
c8c85cf
commit d91b3a6
Showing
17 changed files
with
649 additions
and
3,572 deletions.
There are no files selected for viewing
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,6 +1,7 @@ | ||
// Skip Husky install in production and CI | ||
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { | ||
process.exit(0) | ||
} | ||
const husky = (await import('husky')).default | ||
console.log(husky()) | ||
if (process.env.NODE_ENV === "production" || process.env.CI === "true") { | ||
process.exit(0); | ||
} | ||
const husky = (await import("husky")).default; | ||
// eslint-disable-next-line no-console | ||
console.log(husky()); |
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,3 +1,2 @@ | ||
|
||
npx --no -- 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
"*.{js,ts,vue}": | ||
- cspell lint --no-must-find-files --files | ||
- eslint --max-warnings=0 | ||
- prettier --write --ignore-unknown | ||
- eslint --fix --max-warnings=0 | ||
"*.ts": | ||
- tsc-files --noEmit | ||
"*.md": | ||
- cspell lint --no-must-find-files --files | ||
|
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,9 @@ | ||
node_modules | ||
.github | ||
.idea | ||
public | ||
**/*.md | ||
bin | ||
dist | ||
coverage | ||
build |
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,12 @@ | ||
{ | ||
"bracketSameLine": false, | ||
"printWidth": 80, | ||
"useTabs": false, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": false, | ||
"bracketSpacing": true, | ||
"vueIndentScriptAndStyle": false, | ||
"singleAttributePerLine": true | ||
} |
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,35 @@ | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import eslintConfigPrettier from "eslint-config-prettier"; | ||
import { includeIgnoreFile } from "@eslint/compat"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const gitignorePath = path.resolve(__dirname, ".gitignore"); | ||
|
||
export default [ | ||
includeIgnoreFile(gitignorePath), | ||
{ ignores: ["node_modules", "dist", "bin", "build"] }, | ||
{ files: ["./src/*.{js,mjs,cjs,ts}"] }, | ||
{ languageOptions: { globals: globals.node } }, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "error" : "warn", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
prefer: "type-imports", | ||
disallowTypeAnnotations: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
eslintConfigPrettier, | ||
]; |
Oops, something went wrong.