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.

154 lines
3.1 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. arrowFunctions: true
  17. jsx: true
  18. destructuring: true
  19. modules: true
  20. spread: true
  21. settings:
  22. import/extensions:
  23. - .js
  24. import/ignore:
  25. - node_modules
  26. - \\.(css|scss|json)$
  27. import/resolver:
  28. node:
  29. moduleDirectory:
  30. - node_modules
  31. - app/javascript
  32. rules:
  33. brace-style: warn
  34. comma-dangle:
  35. - error
  36. - always-multiline
  37. comma-spacing:
  38. - warn
  39. - before: false
  40. after: true
  41. comma-style:
  42. - warn
  43. - last
  44. consistent-return: error
  45. dot-notation: error
  46. eqeqeq: error
  47. indent:
  48. - warn
  49. - 2
  50. jsx-quotes:
  51. - error
  52. - prefer-single
  53. no-catch-shadow: error
  54. no-cond-assign: error
  55. no-console:
  56. - warn
  57. - allow:
  58. - error
  59. - warn
  60. no-fallthrough: error
  61. no-irregular-whitespace: error
  62. no-mixed-spaces-and-tabs: warn
  63. no-nested-ternary: warn
  64. no-trailing-spaces: warn
  65. no-undef: error
  66. no-unreachable: error
  67. no-unused-expressions: error
  68. no-unused-vars:
  69. - error
  70. - vars: all
  71. args: after-used
  72. ignoreRestSiblings: true
  73. object-curly-spacing:
  74. - error
  75. - always
  76. padded-blocks:
  77. - error
  78. - classes: always
  79. quotes:
  80. - error
  81. - single
  82. semi: error
  83. strict: off
  84. valid-typeof: error
  85. react/jsx-boolean-value: error
  86. react/jsx-closing-bracket-location:
  87. - error
  88. - line-aligned
  89. react/jsx-curly-spacing: error
  90. react/jsx-equals-spacing: error
  91. react/jsx-first-prop-new-line:
  92. - error
  93. - multiline-multiprop
  94. react/jsx-indent:
  95. - error
  96. - 2
  97. react/jsx-no-bind: error
  98. react/jsx-no-duplicate-props: error
  99. react/jsx-no-undef: error
  100. react/jsx-tag-spacing: error
  101. react/jsx-uses-react: error
  102. react/jsx-uses-vars: error
  103. react/jsx-wrap-multilines: error
  104. react/no-multi-comp: off
  105. react/no-string-refs: error
  106. react/prop-types: error
  107. react/self-closing-comp: error
  108. jsx-a11y/accessible-emoji: 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-has-alt: warn
  120. jsx-a11y/img-redundant-alt: 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-onchange: warn
  126. jsx-a11y/no-redundant-roles: warn
  127. jsx-a11y/onclick-has-focus: warn
  128. jsx-a11y/onclick-has-role: warn
  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