项目作者: jd-smart-fe

项目描述 :
一套基于eslint-config-airbnb-base的eslint代码规范配置
高级语言: JavaScript
项目地址: git://github.com/jd-smart-fe/eslint-config-jd.git
创建时间: 2018-07-30T05:45:57Z
项目社区:https://github.com/jd-smart-fe/eslint-config-jd

开源协议:MIT License

下载


eslint-config-jd

简介

本项目以eslint-config-airbnb-base为基础,定制出了符合团队现状的ESLint 配置。

添加的规则

  1. {
  2. 'no-restricted-syntax': ['off', "BinaryExpression[operator = 'in']"],
  3. // don't require .vue extension when importing
  4. 'import/extensions': ['error', 'always', {
  5. js: 'never',
  6. vue: 'never',
  7. }],
  8. 'import/imports-first': 0,
  9. 'import/no-dynamic-require': 0,
  10. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  11. 'no-use-before-define': ['error', { functions: false, }],
  12. 'no-unused-vars': 0,
  13. 'no-console': 0,
  14. 'no-underscore-dangle': 0,
  15. 'arrow-parens': 0,
  16. 'no-param-reassign': 0,
  17. 'no-unused-expressions': 0,
  18. 'padded-blocks': 0,
  19. 'prefer-const': 1,
  20. 'linebreak-style': 0,
  21. 'max-len': 0,
  22. 'import/no-extraneous-dependencies': 0,
  23. }