You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.eslintrc.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. module.exports = {
  2. 'env': {
  3. 'browser': true,
  4. 'commonjs': true,
  5. 'es6': true,
  6. 'jasmine': true
  7. },
  8. 'extends': [
  9. 'eslint:recommended',
  10. 'plugin:flowtype/recommended'
  11. ],
  12. 'globals': {
  13. // The globals that (1) are accessed but not defined within many of our
  14. // files, (2) are certainly defined, and (3) we would like to use
  15. // without explicitly specifying them (using a comment) inside of our
  16. // files.
  17. '__filename': false
  18. },
  19. 'parser': 'babel-eslint',
  20. 'parserOptions': {
  21. 'ecmaFeatures': {
  22. 'experimentalObjectRestSpread': true
  23. },
  24. 'sourceType': 'module'
  25. },
  26. 'plugins': [
  27. 'flowtype',
  28. // ESLint's rule no-duplicate-imports does not understand Flow's import
  29. // type. Fortunately, eslint-plugin-import understands Flow's import
  30. // type.
  31. 'import'
  32. ],
  33. 'rules': {
  34. 'new-cap': 2,
  35. 'no-console': 0,
  36. 'semi': [ 'error', 'always' ],
  37. 'no-cond-assign': 2,
  38. 'no-constant-condition': 2,
  39. 'no-control-regex': 2,
  40. 'no-debugger': 2,
  41. 'no-dupe-args': 2,
  42. 'no-duplicate-case': 2,
  43. 'no-empty': 2,
  44. 'no-empty-character-class': 2,
  45. 'no-ex-assign': 2,
  46. 'no-extra-boolean-cast': 2,
  47. 'no-extra-parens': [
  48. 'error',
  49. 'all',
  50. { 'nestedBinaryExpressions': false }
  51. ],
  52. 'prefer-const': 2,
  53. 'prefer-reflect': 0,
  54. 'prefer-spread': 2,
  55. 'require-yield': 2,
  56. 'rest-spread-spacing': 2,
  57. 'sort-imports': 0,
  58. 'template-curly-spacing': 2,
  59. 'yield-star-spacing': 2,
  60. 'import/no-duplicates': 2
  61. }
  62. };