lisonge / vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat
MIT License
1.31k stars 70 forks source link

能否向产物里自动加 /* eslint-disable */ #105

Closed wdssmq closed 11 months ago

wdssmq commented 11 months ago

虽然可以打包后自动执行 eslint,能直接关掉可以省一次操作。

lisonge commented 11 months ago
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
import monkey from 'vite-plugin-monkey';

export default defineConfig({
  plugins: [
    vue(),
    monkey({
      entry: './src/main.ts',
      format: {
        generate(uOptions) {
          return `/* eslint-disable */\n` + uOptions.userscript;
        },
      },
    }),
  ],
});