feat: commit lint is added in the frontend

This commit is contained in:
Palash gupta
2022-05-11 01:12:29 +05:30
parent e56e42c5b2
commit 8f83afba34
7 changed files with 2671 additions and 1768 deletions
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
cd frontend && yarn commitlint --edit $1
+1
View File
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
+3 -1
View File
@@ -15,7 +15,7 @@
"jest:coverage": "jest --coverage",
"jest:watch": "jest --watch",
"postinstall": "yarn husky:configure",
"husky:configure": "cd .. && husky install frontend/.husky"
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*"
},
"engines": {
"node": ">=12.13.0"
@@ -109,6 +109,8 @@
"@babel/preset-env": "^7.12.17",
"@babel/preset-react": "^7.12.13",
"@babel/preset-typescript": "^7.12.17",
"@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4",
"@jest/globals": "^27.5.1",
"@testing-library/cypress": "^8.0.0",
"@testing-library/react-hooks": "^7.0.2",
+4 -1
View File
@@ -30,6 +30,9 @@
"./__mocks__",
"./conf/default.conf",
"./public",
"./cypress"
"./cypress",
"./commitlint.config.js",
"./webpack.config.js",
"./webpack.config.prod.js"
]
}
+3 -3
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// shared config (dev and prod)
const { resolve } = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -5,8 +6,7 @@ const portFinderSync = require('portfinder-sync');
const dotenv = require('dotenv');
const webpack = require('webpack');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
dotenv.config();
@@ -106,7 +106,7 @@ const config = {
},
],
},
plugins: plugins,
plugins,
performance: {
hints: false,
},
+4 -4
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/explicit-function-return-type */
// shared config (dev and prod)
const { resolve } = require('path');
@@ -9,8 +10,7 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const Critters = require('critters-webpack-plugin');
const plugins = [
@@ -119,13 +119,13 @@ const config = {
},
],
},
plugins: plugins,
plugins,
optimization: {
chunkIds: 'named',
concatenateModules: false,
emitOnErrors: true,
flagIncludedChunks: true,
innerGraph: true, //tells webpack whether to conduct inner graph analysis for unused exports.
innerGraph: true, // tells webpack whether to conduct inner graph analysis for unused exports.
mangleWasmImports: true,
mergeDuplicateChunks: true,
minimize: true,
+2652 -1759
View File
File diff suppressed because it is too large Load Diff