A lightly modified copy of Mastodon, the canonical repository for Chinwag Social's live code. https://social.chinwag.org/
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.

.eslintrc.yml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. react:
  24. version: detect
  25. import/extensions:
  26. - .js
  27. import/ignore:
  28. - node_modules
  29. - \\.(css|scss|json)$
  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/anchor-is-valid:
  110. - warn
  111. - components:
  112. - Link
  113. - NavLink
  114. specialLink:
  115. - to
  116. aspect:
  117. - noHref
  118. - invalidHref
  119. - preferButton
  120. jsx-a11y/aria-activedescendant-has-tabindex: warn
  121. jsx-a11y/aria-props: warn
  122. jsx-a11y/aria-proptypes: warn
  123. jsx-a11y/aria-role: warn
  124. jsx-a11y/aria-unsupported-elements: warn
  125. jsx-a11y/heading-has-content: warn
  126. jsx-a11y/html-has-lang: warn
  127. jsx-a11y/iframe-has-title: warn
  128. jsx-a11y/img-redundant-alt: warn
  129. jsx-a11y/interactive-supports-focus: warn
  130. jsx-a11y/label-has-for: off
  131. jsx-a11y/mouse-events-have-key-events: warn
  132. jsx-a11y/no-access-key: warn
  133. jsx-a11y/no-distracting-elements: warn
  134. jsx-a11y/no-noninteractive-element-interactions:
  135. - warn
  136. - handlers:
  137. - onClick
  138. jsx-a11y/no-onchange: warn
  139. jsx-a11y/no-redundant-roles: warn
  140. jsx-a11y/no-static-element-interactions:
  141. - warn
  142. - handlers:
  143. - onClick
  144. jsx-a11y/role-has-required-aria-props: warn
  145. jsx-a11y/role-supports-aria-props: off
  146. jsx-a11y/scope: warn
  147. jsx-a11y/tabindex-no-positive: warn
  148. import/extensions:
  149. - error
  150. - always
  151. - js: never
  152. import/newline-after-import: error
  153. import/no-extraneous-dependencies:
  154. - error
  155. - devDependencies:
  156. - "config/webpack/**"
  157. - "app/javascript/mastodon/test_setup.js"
  158. - "app/javascript/**/__tests__/**"
  159. import/no-unresolved: error
  160. import/no-webpack-loader-syntax: error
  161. promise/catch-or-return: error