[筆記] 在使用 Vite 創建的 Vue 3 專案中加入 Eslint(使用 Airbnb 規範)


Posted by Calon on 2022-06-18

安裝所需插件:

$ yarn add -D eslint eslint-plugin-vue eslint-config-airbnb-base

執行完後新增 .eslintrc.js 檔,並加入以下設定:

module.exports = {
  root: true,
  env: {
    browser: true,
    es2021: true,
  },
  extends: [
    'plugin:vue/vue3-recommended',
    'airbnb-base',
  ],
};

#Vite #ESLint #vue3







Related Posts

[ 筆記 ] 交換資料 - XMLHttpRequest、CORS、JSONP

[ 筆記 ] 交換資料 - XMLHttpRequest、CORS、JSONP

[ 紀錄 ] 部屬 AWS EC2 雲端主機 + LAMP Server + phpMyAdmin

[ 紀錄 ] 部屬 AWS EC2 雲端主機 + LAMP Server + phpMyAdmin

MTR04_0720

MTR04_0720


Comments