mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 17:49:02 +08:00
Merge pull request #1132 from palash-signoz/commitlint
feat: commit lint is added in the frontend
This commit is contained in:
commit
ec3fed05bb
4
frontend/.husky/commit-msg
Executable file
4
frontend/.husky/commit-msg
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
cd frontend && npm run commitlint
|
1
frontend/commitlint.config.js
Normal file
1
frontend/commitlint.config.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = { extends: ['@commitlint/config-conventional'] };
|
@ -15,7 +15,8 @@
|
||||
"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/*",
|
||||
"commitlint": "commitlint --edit $1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
@ -109,6 +110,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",
|
||||
|
@ -30,6 +30,9 @@
|
||||
"./__mocks__",
|
||||
"./conf/default.conf",
|
||||
"./public",
|
||||
"./cypress"
|
||||
"./cypress",
|
||||
"./commitlint.config.js",
|
||||
"./webpack.config.js",
|
||||
"./webpack.config.prod.js"
|
||||
]
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
|
4050
frontend/yarn.lock
4050
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user