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.

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