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.

162 lines
3.3 KiB

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