index.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. "use strict";
  2. const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
  3. module.exports = {
  4. rules: {
  5. // The following rules can be used in some cases. See the README for more
  6. // information. (These are marked with `0` instead of `"off"` so that a
  7. // script can distinguish them.)
  8. "curly": 0,
  9. "lines-around-comment": 0,
  10. "max-len": 0,
  11. "no-confusing-arrow": 0,
  12. "no-mixed-operators": 0,
  13. "no-tabs": 0,
  14. "no-unexpected-multiline": 0,
  15. "quotes": 0,
  16. "@typescript-eslint/lines-around-comment": 0,
  17. "@typescript-eslint/quotes": 0,
  18. "babel/quotes": 0,
  19. "vue/html-self-closing": 0,
  20. "vue/max-len": 0,
  21. // The rest are rules that you never need to enable when using Prettier.
  22. "array-bracket-newline": "off",
  23. "array-bracket-spacing": "off",
  24. "array-element-newline": "off",
  25. "arrow-parens": "off",
  26. "arrow-spacing": "off",
  27. "block-spacing": "off",
  28. "brace-style": "off",
  29. "comma-dangle": "off",
  30. "comma-spacing": "off",
  31. "comma-style": "off",
  32. "computed-property-spacing": "off",
  33. "dot-location": "off",
  34. "eol-last": "off",
  35. "func-call-spacing": "off",
  36. "function-call-argument-newline": "off",
  37. "function-paren-newline": "off",
  38. "generator-star-spacing": "off",
  39. "implicit-arrow-linebreak": "off",
  40. "indent": "off",
  41. "jsx-quotes": "off",
  42. "key-spacing": "off",
  43. "keyword-spacing": "off",
  44. "linebreak-style": "off",
  45. "multiline-ternary": "off",
  46. "newline-per-chained-call": "off",
  47. "new-parens": "off",
  48. "no-extra-parens": "off",
  49. "no-extra-semi": "off",
  50. "no-floating-decimal": "off",
  51. "no-mixed-spaces-and-tabs": "off",
  52. "no-multi-spaces": "off",
  53. "no-multiple-empty-lines": "off",
  54. "no-trailing-spaces": "off",
  55. "no-whitespace-before-property": "off",
  56. "nonblock-statement-body-position": "off",
  57. "object-curly-newline": "off",
  58. "object-curly-spacing": "off",
  59. "object-property-newline": "off",
  60. "one-var-declaration-per-line": "off",
  61. "operator-linebreak": "off",
  62. "padded-blocks": "off",
  63. "quote-props": "off",
  64. "rest-spread-spacing": "off",
  65. "semi": "off",
  66. "semi-spacing": "off",
  67. "semi-style": "off",
  68. "space-before-blocks": "off",
  69. "space-before-function-paren": "off",
  70. "space-in-parens": "off",
  71. "space-infix-ops": "off",
  72. "space-unary-ops": "off",
  73. "switch-colon-spacing": "off",
  74. "template-curly-spacing": "off",
  75. "template-tag-spacing": "off",
  76. "unicode-bom": "off",
  77. "wrap-iife": "off",
  78. "wrap-regex": "off",
  79. "yield-star-spacing": "off",
  80. "@babel/object-curly-spacing": "off",
  81. "@babel/semi": "off",
  82. "@typescript-eslint/block-spacing": "off",
  83. "@typescript-eslint/brace-style": "off",
  84. "@typescript-eslint/comma-dangle": "off",
  85. "@typescript-eslint/comma-spacing": "off",
  86. "@typescript-eslint/func-call-spacing": "off",
  87. "@typescript-eslint/indent": "off",
  88. "@typescript-eslint/key-spacing": "off",
  89. "@typescript-eslint/keyword-spacing": "off",
  90. "@typescript-eslint/member-delimiter-style": "off",
  91. "@typescript-eslint/no-extra-parens": "off",
  92. "@typescript-eslint/no-extra-semi": "off",
  93. "@typescript-eslint/object-curly-spacing": "off",
  94. "@typescript-eslint/semi": "off",
  95. "@typescript-eslint/space-before-blocks": "off",
  96. "@typescript-eslint/space-before-function-paren": "off",
  97. "@typescript-eslint/space-infix-ops": "off",
  98. "@typescript-eslint/type-annotation-spacing": "off",
  99. "babel/object-curly-spacing": "off",
  100. "babel/semi": "off",
  101. "flowtype/boolean-style": "off",
  102. "flowtype/delimiter-dangle": "off",
  103. "flowtype/generic-spacing": "off",
  104. "flowtype/object-type-curly-spacing": "off",
  105. "flowtype/object-type-delimiter": "off",
  106. "flowtype/quotes": "off",
  107. "flowtype/semi": "off",
  108. "flowtype/space-after-type-colon": "off",
  109. "flowtype/space-before-generic-bracket": "off",
  110. "flowtype/space-before-type-colon": "off",
  111. "flowtype/union-intersection-spacing": "off",
  112. "react/jsx-child-element-spacing": "off",
  113. "react/jsx-closing-bracket-location": "off",
  114. "react/jsx-closing-tag-location": "off",
  115. "react/jsx-curly-newline": "off",
  116. "react/jsx-curly-spacing": "off",
  117. "react/jsx-equals-spacing": "off",
  118. "react/jsx-first-prop-new-line": "off",
  119. "react/jsx-indent": "off",
  120. "react/jsx-indent-props": "off",
  121. "react/jsx-max-props-per-line": "off",
  122. "react/jsx-newline": "off",
  123. "react/jsx-one-expression-per-line": "off",
  124. "react/jsx-props-no-multi-spaces": "off",
  125. "react/jsx-tag-spacing": "off",
  126. "react/jsx-wrap-multilines": "off",
  127. "standard/array-bracket-even-spacing": "off",
  128. "standard/computed-property-even-spacing": "off",
  129. "standard/object-curly-even-spacing": "off",
  130. "unicorn/empty-brace-spaces": "off",
  131. "unicorn/no-nested-ternary": "off",
  132. "unicorn/number-literal-case": "off",
  133. "vue/array-bracket-newline": "off",
  134. "vue/array-bracket-spacing": "off",
  135. "vue/array-element-newline": "off",
  136. "vue/arrow-spacing": "off",
  137. "vue/block-spacing": "off",
  138. "vue/block-tag-newline": "off",
  139. "vue/brace-style": "off",
  140. "vue/comma-dangle": "off",
  141. "vue/comma-spacing": "off",
  142. "vue/comma-style": "off",
  143. "vue/dot-location": "off",
  144. "vue/func-call-spacing": "off",
  145. "vue/html-closing-bracket-newline": "off",
  146. "vue/html-closing-bracket-spacing": "off",
  147. "vue/html-end-tags": "off",
  148. "vue/html-indent": "off",
  149. "vue/html-quotes": "off",
  150. "vue/key-spacing": "off",
  151. "vue/keyword-spacing": "off",
  152. "vue/max-attributes-per-line": "off",
  153. "vue/multiline-html-element-content-newline": "off",
  154. "vue/multiline-ternary": "off",
  155. "vue/mustache-interpolation-spacing": "off",
  156. "vue/no-extra-parens": "off",
  157. "vue/no-multi-spaces": "off",
  158. "vue/no-spaces-around-equal-signs-in-attribute": "off",
  159. "vue/object-curly-newline": "off",
  160. "vue/object-curly-spacing": "off",
  161. "vue/object-property-newline": "off",
  162. "vue/operator-linebreak": "off",
  163. "vue/quote-props": "off",
  164. "vue/script-indent": "off",
  165. "vue/singleline-html-element-content-newline": "off",
  166. "vue/space-in-parens": "off",
  167. "vue/space-infix-ops": "off",
  168. "vue/space-unary-ops": "off",
  169. "vue/template-curly-spacing": "off",
  170. ...(includeDeprecated && {
  171. // Removed in version 1.0.0.
  172. // https://eslint.org/docs/latest/rules/generator-star
  173. "generator-star": "off",
  174. // Deprecated since version 4.0.0.
  175. // https://github.com/eslint/eslint/pull/8286
  176. "indent-legacy": "off",
  177. // Removed in version 2.0.0.
  178. // https://eslint.org/docs/latest/rules/no-arrow-condition
  179. "no-arrow-condition": "off",
  180. // Removed in version 1.0.0.
  181. // https://eslint.org/docs/latest/rules/no-comma-dangle
  182. "no-comma-dangle": "off",
  183. // Removed in version 1.0.0.
  184. // https://eslint.org/docs/latest/rules/no-reserved-keys
  185. "no-reserved-keys": "off",
  186. // Removed in version 1.0.0.
  187. // https://eslint.org/docs/latest/rules/no-space-before-semi
  188. "no-space-before-semi": "off",
  189. // Deprecated since version 3.3.0.
  190. // https://eslint.org/docs/rules/no-spaced-func
  191. "no-spaced-func": "off",
  192. // Removed in version 1.0.0.
  193. // https://eslint.org/docs/latest/rules/no-wrap-func
  194. "no-wrap-func": "off",
  195. // Removed in version 1.0.0.
  196. // https://eslint.org/docs/latest/rules/space-after-function-name
  197. "space-after-function-name": "off",
  198. // Removed in version 2.0.0.
  199. // https://eslint.org/docs/latest/rules/space-after-keywords
  200. "space-after-keywords": "off",
  201. // Removed in version 1.0.0.
  202. // https://eslint.org/docs/latest/rules/space-before-function-parentheses
  203. "space-before-function-parentheses": "off",
  204. // Removed in version 2.0.0.
  205. // https://eslint.org/docs/latest/rules/space-before-keywords
  206. "space-before-keywords": "off",
  207. // Removed in version 1.0.0.
  208. // https://eslint.org/docs/latest/rules/space-in-brackets
  209. "space-in-brackets": "off",
  210. // Removed in version 2.0.0.
  211. // https://eslint.org/docs/latest/rules/space-return-throw-case
  212. "space-return-throw-case": "off",
  213. // Removed in version 0.10.0.
  214. // https://eslint.org/docs/latest/rules/space-unary-word-ops
  215. "space-unary-word-ops": "off",
  216. // Deprecated since version 7.0.0.
  217. // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
  218. "react/jsx-space-before-closing": "off",
  219. }),
  220. },
  221. };