mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 03:11:49 +08:00
Chore: Introduce yarn start:noLint (#64430)
chore(webpack): introduce start:noLint to bypass typecheck and lint plugins during dev
This commit is contained in:
@ -36,6 +36,7 @@
|
|||||||
"prettier:write": "prettier --list-different \"**/*.{js,ts,tsx,scss,md,mdx}\" --write",
|
"prettier:write": "prettier --list-different \"**/*.{js,ts,tsx,scss,md,mdx}\" --write",
|
||||||
"start": "yarn themes:generate && yarn dev --watch",
|
"start": "yarn themes:generate && yarn dev --watch",
|
||||||
"start:noTsCheck": "yarn start --env noTsCheck=1",
|
"start:noTsCheck": "yarn start --env noTsCheck=1",
|
||||||
|
"start:noLint": "yarn start --env noTsCheck=1 --env noLint=1",
|
||||||
"stats": "webpack --mode production --config scripts/webpack/webpack.prod.js --profile --json > compilation-stats.json",
|
"stats": "webpack --mode production --config scripts/webpack/webpack.prod.js --profile --json > compilation-stats.json",
|
||||||
"storybook": "yarn workspace @grafana/ui storybook --ci",
|
"storybook": "yarn workspace @grafana/ui storybook --ci",
|
||||||
"storybook:build": "yarn workspace @grafana/ui storybook:build",
|
"storybook:build": "yarn workspace @grafana/ui storybook:build",
|
||||||
|
@ -91,11 +91,13 @@ module.exports = (env = {}) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new ESLintPlugin({
|
parseInt(env.noLint, 10)
|
||||||
cache: true,
|
? new DefinePlugin({}) // bogus plugin to satisfy webpack API
|
||||||
lintDirtyModulesOnly: true, // don't lint on start, only lint changed files
|
: new ESLintPlugin({
|
||||||
extensions: ['.ts', '.tsx'],
|
cache: true,
|
||||||
}),
|
lintDirtyModulesOnly: true, // don't lint on start, only lint changed files
|
||||||
|
extensions: ['.ts', '.tsx'],
|
||||||
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'grafana.[name].[contenthash].css',
|
filename: 'grafana.[name].[contenthash].css',
|
||||||
}),
|
}),
|
||||||
|
Reference in New Issue
Block a user