mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 05:55:59 +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:coverage": "jest --coverage",
|
||||||
"jest:watch": "jest --watch",
|
"jest:watch": "jest --watch",
|
||||||
"postinstall": "yarn husky:configure",
|
"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": {
|
"engines": {
|
||||||
"node": ">=12.13.0"
|
"node": ">=12.13.0"
|
||||||
@ -109,6 +110,8 @@
|
|||||||
"@babel/preset-env": "^7.12.17",
|
"@babel/preset-env": "^7.12.17",
|
||||||
"@babel/preset-react": "^7.12.13",
|
"@babel/preset-react": "^7.12.13",
|
||||||
"@babel/preset-typescript": "^7.12.17",
|
"@babel/preset-typescript": "^7.12.17",
|
||||||
|
"@commitlint/cli": "^16.2.4",
|
||||||
|
"@commitlint/config-conventional": "^16.2.4",
|
||||||
"@jest/globals": "^27.5.1",
|
"@jest/globals": "^27.5.1",
|
||||||
"@testing-library/cypress": "^8.0.0",
|
"@testing-library/cypress": "^8.0.0",
|
||||||
"@testing-library/react-hooks": "^7.0.2",
|
"@testing-library/react-hooks": "^7.0.2",
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
"./__mocks__",
|
"./__mocks__",
|
||||||
"./conf/default.conf",
|
"./conf/default.conf",
|
||||||
"./public",
|
"./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)
|
// shared config (dev and prod)
|
||||||
const { resolve } = require('path');
|
const { resolve } = require('path');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
@ -5,8 +6,7 @@ const portFinderSync = require('portfinder-sync');
|
|||||||
const dotenv = require('dotenv');
|
const dotenv = require('dotenv');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||||
.BundleAnalyzerPlugin;
|
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ const config = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: plugins,
|
plugins,
|
||||||
performance: {
|
performance: {
|
||||||
hints: false,
|
hints: false,
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||||
// shared config (dev and prod)
|
// shared config (dev and prod)
|
||||||
const { resolve } = require('path');
|
const { resolve } = require('path');
|
||||||
@ -9,8 +10,7 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|||||||
const TerserPlugin = require('terser-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||||
.BundleAnalyzerPlugin;
|
|
||||||
const Critters = require('critters-webpack-plugin');
|
const Critters = require('critters-webpack-plugin');
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
@ -119,13 +119,13 @@ const config = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: plugins,
|
plugins,
|
||||||
optimization: {
|
optimization: {
|
||||||
chunkIds: 'named',
|
chunkIds: 'named',
|
||||||
concatenateModules: false,
|
concatenateModules: false,
|
||||||
emitOnErrors: true,
|
emitOnErrors: true,
|
||||||
flagIncludedChunks: 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,
|
mangleWasmImports: true,
|
||||||
mergeDuplicateChunks: true,
|
mergeDuplicateChunks: true,
|
||||||
minimize: 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