Skip to content

Commit 60b602d

Browse files
committed
fix: Precommit
1 parent 6823eb4 commit 60b602d

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ fabric.properties
122122
dist/
123123
node_modules/
124124
.cursorrules
125-
.vscode/
125+
.vscode/

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"printWidth": 110,
55
"singleQuote": true,
66
"trailingComma": "all"
7-
}
7+
}

eslint.config.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import globals from "globals";
2-
import pluginJs from "@eslint/js";
3-
import tseslint from "typescript-eslint";
4-
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
54

65
/** @type {import('eslint').Linter.Config[]} */
76
export default [
8-
{files: ["**/*.{js,mjs,cjs,ts}"]},
9-
{languageOptions: { globals: globals.browser }},
10-
{rules: {
11-
"semi": "off",
12-
"no-unreachable": "error", // Already in ts, but perhaps it catches more cases
13-
"@typescript-eslint/explicit-function-return-type": "off",
14-
"@typescript-eslint/strict-boolean-expressions": "off", // Often works incorrectly
15-
"@typescript-eslint/no-floating-promises": "off",
7+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
8+
{ languageOptions: { globals: globals.browser } },
9+
{
10+
rules: {
11+
semi: 'off',
12+
'no-unreachable': 'error', // Already in ts, but perhaps it catches more cases
13+
'@typescript-eslint/explicit-function-return-type': 'off',
14+
'@typescript-eslint/strict-boolean-expressions': 'off', // Often works incorrectly
15+
'@typescript-eslint/no-floating-promises': 'off',
1616
},
1717
},
1818
pluginJs.configs.recommended,
1919
...tseslint.configs.recommended,
20-
];
20+
];

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
"unused-deps": "npx depcheck --json | jq '.dependencies == []'",
1919
"clean-build": "rm -rf ./dist",
2020
"lint": "npx eslint 'src/**/*.{ts,tsx}' --no-ignore",
21-
"format": "prettier --write \"src/**/*.ts\"",
21+
"format": "prettier --write \"(src|test)/**\" --no-error-on-unmatched-pattern",
2222
"prepare": "npm run build",
2323
"example": "npx tsx src/example.ts",
2424
"circular": "madge --circular --extensions ts src",
25-
"quality": "npm run circular && npm run lint && tsc --noEmit && npm run format && npm run unused-deps"
25+
"quality": "npm run circular && npm run lint && tsc --noEmit && npm run format && npm run unused-deps",
26+
"quality:fix": "npm run circular && npm run lint -- --fix && tsc --noEmit && npm run format"
2627
},
2728
"files": [
2829
"dist"

tsconfig.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"strict": true,
1111
"skipLibCheck": true
1212
},
13-
"include": ["src/**/*"],
14-
"exclude": ["node_modules", "dist"]
15-
}
13+
"include": [
14+
"src/**/*"
15+
],
16+
"exclude": [
17+
"node_modules",
18+
"dist"
19+
]
20+
}

0 commit comments

Comments
 (0)