mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 08:42:19 +08:00
Chore: use fork-ts-checker plugin for eslint check (#25631)
* Use fork-ts-checker for eslint check * Fix lint issue * Add packages to lint * Add comments to webpack configs
This commit is contained in:
@ -73,13 +73,6 @@ module.exports = (env = {}) =>
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'eslint-loader',
|
||||
options: {
|
||||
emitError: true,
|
||||
emitWarning: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
require('./sass.rule.js')({
|
||||
@ -94,7 +87,28 @@ module.exports = (env = {}) =>
|
||||
env.noTsCheck
|
||||
? new webpack.DefinePlugin({}) // bogus plugin to satisfy webpack API
|
||||
: new ForkTsCheckerWebpackPlugin({
|
||||
checkSyntacticErrors: true,
|
||||
eslint: {
|
||||
enabled: true,
|
||||
files: [
|
||||
'public/app/**/*.{ts,tsx}',
|
||||
// this can't be written like this packages/**/src/**/*.ts because it throws an error
|
||||
'packages/grafana-ui/src/**/*.{ts,tsx}',
|
||||
'packages/grafana-data/src/**/*.{ts,tsx}',
|
||||
'packages/grafana-runtime/src/**/*.{ts,tsx}',
|
||||
'packages/grafana-e2e-selectors/src/**/*.{ts,tsx}',
|
||||
'packages/jaeger-ui-components/src/**/*.{ts,tsx}',
|
||||
],
|
||||
options: {
|
||||
cache: true,
|
||||
},
|
||||
},
|
||||
typescript: {
|
||||
mode: 'write-references',
|
||||
diagnosticOptions: {
|
||||
semantic: true,
|
||||
syntactic: true,
|
||||
},
|
||||
},
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'grafana.[name].[hash].css',
|
||||
|
Reference in New Issue
Block a user