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.

165 lines
3.3 KiB

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