闭社主体 forked from https://github.com/tootsuite/mastodon
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.

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