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.

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