Skip to content

Commit

Permalink
enhance: refractor, update, add eslint react-hook
Browse files Browse the repository at this point in the history
update eslint
- add "plugin:react-hooks/recommended"
- update ignorePatterns to only lint files in src
update .gitignore
- add local .env* files
update jsconfig.json
update package.json
- update packages
- remove packages (cross-env, acorn)
- update author,name,description,main fields
refractor react-min config
- split config.js into files: wm-config.js, wm-helper.js
- update config object
- update webpack config: commom, dev, prod accordingly

BREAKING CHANGE: .gitignore .env.*.local files, split config.js into wm-config.js & wm-helper.js.
  • Loading branch information
nikhilnayyar002 committed Sep 14, 2021
1 parent 5efc8d8 commit bb33d10
Show file tree
Hide file tree
Showing 10 changed files with 307 additions and 363 deletions.
14 changes: 9 additions & 5 deletions .eslintrc.js → .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
{
"env": {
"browser": true,
"es2021": true,
Expand All @@ -7,7 +7,8 @@ module.exports = {
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"sourceType": "module",
Expand All @@ -21,8 +22,7 @@ module.exports = {
}
],
"no-unused-vars": "warn",
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
"react/react-in-jsx-scope": "off"
},
"globals": {
"process": "readonly"
Expand All @@ -31,5 +31,9 @@ module.exports = {
"react": {
"version": "detect"
}
}
},
"ignorePatterns": [
"/**/*.*",
"!src/**/*.*"
]
}
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
dist
node_modules
build
node_modules

# local .env* files
.env.local
.env.*.local
14 changes: 8 additions & 6 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"compilerOptions": {
"baseUrl": "./",
"baseUrl": ".",
"paths": {
"@assets/*": [
"src/assets/*"
],
"@styles/*": [
"src/styles/*"
]
}
}
},
"module": "ESNext",
"target": "ES6"
},
"include": [
"src"
]
}
Loading

0 comments on commit bb33d10

Please sign in to comment.