1. pnpm add eslint -D
  2. pnpm create @eslint/config
# 初始化期间会进行多次进行配置询问,可参考下方配置

    ? How would you like to use ESLint? … 
      To check syntax only
    ❯ To check syntax and find problems

    ? What type of modules does your project use? … 
    ❯ JavaScript modules (import/export)
      CommonJS (require/exports)
      None of these

    ? Which framework does your project use? … 
      React
    ❯ Vue.js
      None of these

    ? Does your project use TypeScript? … 
      No
    ❯ Yes

    ? Where does your code run? …  (Press <space> to select, <a> to toggle all, <i> to invert selection)
    ✔ Browser
      Node

    eslint, globals, @eslint/js, typescript-eslint, eslint-plugin-vue
    ? Would you like to install them now? › No / >Yes

    ? Which package manager do you want to use? … 
      npm
      yarn
    ❯ pnpm
      bun
Last Updated:
Contributors: haizhiguang