Skip to content

Commit

Permalink
feat!: add eslLint & adapt all components
Browse files Browse the repository at this point in the history
  • Loading branch information
fafa-a committed Jul 14, 2022
1 parent a011e4d commit 79dbb1c
Show file tree
Hide file tree
Showing 34 changed files with 3,444 additions and 833 deletions.
23 changes: 23 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"settings": { "react": { "version": "detect" } },
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"plugin:react-perf/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "react-perf"],
"rules": {}
}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"lint": "eslint \"src/**/*.{js,jsx}\"",
"lint:fix": "eslint \"src/**/*.{js,jsx}\" --fix"
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
Expand All @@ -25,6 +27,7 @@
"leaflet.markercluster": "^1.5.3",
"papaparse": "^5.3.2",
"path": "^0.12.7",
"prop-types": "^15.8.1",
"rc-util": "^5.21.0",
"react": "^17.0.2",
"react-chartjs-2": "^4.1.0",
Expand All @@ -41,6 +44,10 @@
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@vitejs/plugin-react": "^1.3.0",
"eslint": "^8.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"unplugin-auto-import": "^0.8.8",
"unplugin-icons": "^0.14.6",
"vite": "^2.9.9"
Expand Down
Loading

0 comments on commit 79dbb1c

Please sign in to comment.