mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Run eslint when the project is running to standardize everyone's code #9377 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -3,6 +3,7 @@ import TerserPlugin from 'terser-webpack-plugin';
|
||||
import { defineConfig } from 'umi';
|
||||
import { appName } from './src/conf.json';
|
||||
import routes from './src/routes';
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
|
||||
export default defineConfig({
|
||||
title: appName,
|
||||
@ -52,6 +53,15 @@ export default defineConfig({
|
||||
|
||||
memo.optimization.minimizer('terser').use(TerserPlugin); // Fixed the issue that the page displayed an error after packaging lexical with terser
|
||||
|
||||
memo.plugin('eslint').use(ESLintPlugin, [
|
||||
{
|
||||
extensions: ['js', 'ts', 'tsx'],
|
||||
failOnError: true,
|
||||
exclude: ['**/node_modules/**', '**/mfsu**', '**/mfsu-virtual-entry**'],
|
||||
files: ['src/**/*.{js,ts,tsx}'],
|
||||
},
|
||||
]);
|
||||
|
||||
return memo;
|
||||
},
|
||||
tailwindcss: {},
|
||||
|
||||
Reference in New Issue
Block a user