适合微信小程序使用的 ESLint 配置文件 普鲁文 2018-05-24 开发 ESLint, 小程序 自己用的最基本的小程序 ESLint 配置文件。基于 Airbnb 风格,仅增加小程序的特殊设置,减少不必要的报错。编辑 .eslintrc.js 文件,替换为以下代码即可。 12345678910111213module.exports = { "extends": "airbnb-base", // Airbnb 风格 rules: { 'no-console': 'off', // 允许在代码中保留 console 命令 }, globals: { wx: null, App: null, Page: null, getApp: null, Component: null, },};