Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

.eslintrc.js 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. 'object-shorthand': [
  53. 'error',
  54. 'always',
  55. { 'avoidQuotes': true }
  56. ],
  57. 'prefer-const': 2,
  58. 'prefer-reflect': 0,
  59. 'prefer-spread': 2,
  60. 'require-yield': 2,
  61. 'rest-spread-spacing': 2,
  62. 'sort-imports': 0,
  63. 'template-curly-spacing': 2,
  64. 'yield-star-spacing': 2,
  65. 'import/no-duplicates': 2
  66. }
  67. };