lint
This commit is contained in:
@@ -1,3 +1,38 @@
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
extends: ["@/build-config/eslintrc-vite"],
|
||||
root: true,
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/strict-type-checked",
|
||||
"plugin:@typescript-eslint/stylistic-type-checked",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:react/jsx-runtime",
|
||||
],
|
||||
plugins: ["@typescript-eslint", "react-refresh"],
|
||||
parserOptions: { project: true },
|
||||
parser: "@typescript-eslint/parser",
|
||||
ignorePatterns: [".eslintrc.cjs", "vite.config.ts", "dist"],
|
||||
settings: { react: { version: "18.2" } },
|
||||
rules: {
|
||||
/* Allow numbers to be used in template literals */
|
||||
"@typescript-eslint/restrict-template-expressions": [
|
||||
"error",
|
||||
{
|
||||
allowNumber: true,
|
||||
},
|
||||
],
|
||||
/* Allow void expressions as the entire body of an arrow function */
|
||||
"@typescript-eslint/no-confusing-void-expression": [
|
||||
"error",
|
||||
{
|
||||
ignoreArrowShorthand: true,
|
||||
},
|
||||
],
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
8
infra/staff/.prettierrc.json
Normal file
8
infra/staff/.prettierrc.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"proseWrap": "always",
|
||||
"plugins": [
|
||||
"prettier-plugin-organize-imports",
|
||||
"prettier-plugin-packagejson"
|
||||
]
|
||||
}
|
||||
@@ -6,7 +6,9 @@
|
||||
"scripts": {
|
||||
"build": "tsc && vite build",
|
||||
"dev": "vite",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"lint": "yarn prettier --check --log-level warn . && yarn eslint && yarn tsc",
|
||||
"lint-fix": "yarn prettier --write --log-level warn . && yarn eslint --fix && yarn tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
@@ -14,10 +16,20 @@
|
||||
"zod": "^3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@/build-config": "*",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"@vitejs/plugin-react": "^4.2",
|
||||
"vite": "^5.2"
|
||||
}
|
||||
"vite": "^5.2",
|
||||
"eslint": "^8",
|
||||
"prettier": "^3",
|
||||
"typescript": "^5",
|
||||
"@typescript-eslint/eslint-plugin": "^7",
|
||||
"@typescript-eslint/parser": "^7",
|
||||
"eslint-plugin-react": "^7.34",
|
||||
"eslint-plugin-react-hooks": "^4.6",
|
||||
"eslint-plugin-react-refresh": "^0.4.7",
|
||||
"prettier-plugin-organize-imports": "^3.2",
|
||||
"prettier-plugin-packagejson": "^2.5"
|
||||
},
|
||||
"packageManager": "yarn@1.22.21"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user