.eslintrc.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. ---
  2. root: true
  3. env:
  4. browser: true
  5. node: true
  6. es6: true
  7. jest: true
  8. parser: babel-eslint
  9. plugins:
  10. - react
  11. - jsx-a11y
  12. - import
  13. parserOptions:
  14. sourceType: module
  15. ecmaFeatures:
  16. experimentalObjectRestSpread: true
  17. jsx: true
  18. ecmaVersion: 2018
  19. settings:
  20. import/extensions:
  21. - .js
  22. import/ignore:
  23. - node_modules
  24. - \\.(css|scss|json)$
  25. rules:
  26. brace-style: warn
  27. comma-dangle:
  28. - error
  29. - always-multiline
  30. comma-spacing:
  31. - warn
  32. - before: false
  33. after: true
  34. comma-style:
  35. - warn
  36. - last
  37. consistent-return: error
  38. dot-notation: error
  39. eqeqeq: error
  40. indent:
  41. - warn
  42. - 2
  43. jsx-quotes:
  44. - error
  45. - prefer-single
  46. no-catch-shadow: error
  47. no-cond-assign: error
  48. no-console:
  49. - warn
  50. - allow:
  51. - error
  52. - warn
  53. no-fallthrough: error
  54. no-irregular-whitespace: error
  55. no-mixed-spaces-and-tabs: warn
  56. no-nested-ternary: warn
  57. no-trailing-spaces: warn
  58. no-undef: error
  59. no-unreachable: error
  60. no-unused-expressions: error
  61. no-unused-vars:
  62. - error
  63. - vars: all
  64. args: after-used
  65. ignoreRestSiblings: true
  66. object-curly-spacing:
  67. - error
  68. - always
  69. padded-blocks:
  70. - error
  71. - classes: always
  72. quotes:
  73. - error
  74. - single
  75. semi: error
  76. strict: off
  77. valid-typeof: error
  78. react/jsx-boolean-value: error
  79. react/jsx-closing-bracket-location:
  80. - error
  81. - line-aligned
  82. react/jsx-curly-spacing: error
  83. react/jsx-equals-spacing: error
  84. react/jsx-first-prop-new-line:
  85. - error
  86. - multiline-multiprop
  87. react/jsx-indent:
  88. - error
  89. - 2
  90. react/jsx-no-bind: error
  91. react/jsx-no-duplicate-props: error
  92. react/jsx-no-undef: error
  93. react/jsx-tag-spacing: error
  94. react/jsx-uses-react: error
  95. react/jsx-uses-vars: error
  96. react/jsx-wrap-multilines: error
  97. react/no-multi-comp: off
  98. react/no-string-refs: error
  99. react/prop-types: error
  100. react/self-closing-comp: error
  101. jsx-a11y/accessible-emoji: warn
  102. jsx-a11y/alt-text: warn
  103. jsx-a11y/anchor-has-content: warn
  104. jsx-a11y/aria-activedescendant-has-tabindex: warn
  105. jsx-a11y/aria-props: warn
  106. jsx-a11y/aria-proptypes: warn
  107. jsx-a11y/aria-role: warn
  108. jsx-a11y/aria-unsupported-elements: warn
  109. jsx-a11y/heading-has-content: warn
  110. jsx-a11y/href-no-hash: warn
  111. jsx-a11y/html-has-lang: warn
  112. jsx-a11y/iframe-has-title: warn
  113. jsx-a11y/img-redundant-alt: warn
  114. jsx-a11y/interactive-supports-focus: warn
  115. jsx-a11y/label-has-for: off
  116. jsx-a11y/mouse-events-have-key-events: warn
  117. jsx-a11y/no-access-key: warn
  118. jsx-a11y/no-distracting-elements: warn
  119. jsx-a11y/no-noninteractive-element-interactions:
  120. - warn
  121. - handlers:
  122. - onClick
  123. jsx-a11y/no-onchange: warn
  124. jsx-a11y/no-redundant-roles: warn
  125. jsx-a11y/no-static-element-interactions:
  126. - warn
  127. - handlers:
  128. - onClick
  129. jsx-a11y/role-has-required-aria-props: warn
  130. jsx-a11y/role-supports-aria-props: off
  131. jsx-a11y/scope: warn
  132. jsx-a11y/tabindex-no-positive: warn
  133. import/extensions:
  134. - error
  135. - always
  136. - js: never
  137. import/newline-after-import: error
  138. import/no-extraneous-dependencies:
  139. - error
  140. - devDependencies:
  141. - "config/webpack/**"
  142. - "app/javascript/mastodon/test_setup.js"
  143. - "app/javascript/**/__tests__/**"
  144. import/no-unresolved: error
  145. import/no-webpack-loader-syntax: error