.eslintrc.js 939 B

123456789101112131415161718192021222324252627
  1. module.exports = {
  2. extends: ['airbnb'],
  3. rules: {
  4. // 关闭严格模式的提示
  5. strict: 0,
  6. // 强制4个空格缩进
  7. indent: ['error', 4],
  8. // 不允许出现分号
  9. semi: ['error', 'always'],
  10. // 是否检查连续等号赋值
  11. 'no-multi-assign': 0,
  12. // 要求 require() 出现在顶层模块作用域中,禁止它
  13. 'global-require': 0,
  14. // 允许console,覆盖来自airbnb的规则
  15. 'no-console': 'off',
  16. 'no-underscore-dangle': 'off',
  17. 'prefer-rest-params': 'off',
  18. // 禁用对象最后一个属性的逗号
  19. 'comma-dangle': ['error', 'never'],
  20. // 可以使用未定义的变量,因为会全局引用uni对象
  21. 'no-undef': 'off',
  22. // 允许lf和crlf文件行尾
  23. 'linebreak-style': 'off',
  24. // 关闭function的jsdoc校验
  25. 'jsdoc/check-tag-names': 'off'
  26. }
  27. }