Skip to content

Commit

Permalink
removed react as it is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
faizjamil committed Jun 2, 2023
1 parent 4c50ae9 commit e0f58ff
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 374 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
"presets": ["@babel/preset-env"]
}
14 changes: 2 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"parserOptions": {
"requireConfigFile": false,
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module",
"babelOptions": {
"presets": ["@babel/preset-react"]
}
},
"env": {
Expand All @@ -20,11 +16,10 @@
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:proposal/recommended",
"airbnb"
"airbnb-base"
],
"plugins": ["import", "node", "promise", "proposal", "react", "react-hooks"],
"plugins": ["import", "node", "promise", "proposal"],
"globals": {
"document": "readonly",
"navigator": "readonly",
Expand Down Expand Up @@ -368,11 +363,6 @@
"allowTemplateLiterals": true
}
],
"react/jsx-uses-vars": 1,
"react/react-in-jsx-scope": 0,
"react/jsx-filename-extension": "warn",
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"rest-spread-spacing": ["error", "never"],
"semi": ["warn", "always"],
"semi-spacing": [
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"version": "2.1.0",
"private": true,
"scripts": {
"dev": "npx eslint --fix --ext 'js,jsx' .; npx webpack watch --mode development",
"build": "echo 'Building production pack'; npx eslint --fix --ext 'js,jsx' .; npx webpack --mode production",
"dev": "npx eslint --fix --ext 'js' .; npx webpack watch --mode development",
"build": "echo 'Building production pack'; npx eslint --fix --ext 'js' .; npx webpack --mode production",
"start": "node ./bin/server.js"
},
"dependencies": {
"cookie-parser": "^1.4.4",
"debug": "^2.6.9",
"eslint-config-airbnb-base": "^15.0.0",
"express": "^4.16.1",
"http-errors": "^2.0.0",
"morgan": "^1.9.1",
Expand All @@ -19,17 +20,12 @@
"@babel/core": "^7.18.0",
"@babel/eslint-parser": "^7.17.0",
"@babel/preset-env": "^7.18.0",
"@babel/preset-react": "^7.17.12",
"babel-loader": "^8.2.5",
"eslint": "^8.16.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-proposal": "^2.3.3",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-webpack-plugin": "^3.1.1",
"nodemon-webpack-plugin": "^4.8.0",
"terser-webpack-plugin": "^5.3.3",
Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
module: {
rules: [
{
test: /\.(js|jsx)$/,
test: /\.(js)$/,
exclude: /node_modules/,
use: ['babel-loader']
}
Expand All @@ -38,7 +38,7 @@ module.exports = {
minimize: true,
minimizer: [
new TerserPlugin({
test: /\.(js|jsx)$/,
test: /\.(js)$/,
extractComments: true,
parallel: true,
terserOptions: {
Expand All @@ -52,7 +52,7 @@ module.exports = {
plugins: [
new ESLintLoader({
fix: true,
files: ['**/*.jsx', '**/*.js']
files: ['**/*.js']
}),
new NodemonPlugin({
// If using more than one entry, you can specify
Expand Down Expand Up @@ -92,6 +92,6 @@ module.exports = {
})
],
resolve: {
extensions: ['*', '.js', '.jsx']
extensions: ['*', '.js']
}
};
Loading

0 comments on commit e0f58ff

Please sign in to comment.