Skip to content

Commit

Permalink
added prettier, eslint-config-prettier, and plugin:react/recommended …
Browse files Browse the repository at this point in the history
…to extends
  • Loading branch information
AlexVCS authored and miguelgrc committed Jan 16, 2024
1 parent 64a37e6 commit 39cb311
Show file tree
Hide file tree
Showing 5 changed files with 800 additions and 53 deletions.
23 changes: 9 additions & 14 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
env: {browser: true, es2020: true},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"prettier",
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
};
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink",
"test:unit": "vitest",
"coverage": "vitest run --coverage",
"build:watch": "vite build --watch --config vite.config.local.ts"
"build:watch": "vite build --watch --config vite.config.local.ts",
"prepare": "husky install"
},
"dependencies": {
"@ant-design/pro-layout": "^7.16.4",
Expand Down Expand Up @@ -68,12 +69,17 @@
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.45.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"happy-dom": "^12.2.1",
"husky": ">=6",
"less": "^4.1.3",
"lint-staged": ">=10",
"lodash-es": "^4.17.21",
"prettier": "3.1.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -86,5 +92,9 @@
"peerDependencies": {
"react": ">=18.2.0",
"react-dom": ">=18.2.0"
},
"lint-staged": {
"*.{ts,tsx}": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
}
}
Loading

0 comments on commit 39cb311

Please sign in to comment.