@anolilab/eslint-config 5.0.9 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +226 -73
  3. package/dist/chunk-3XUVOUJE.mjs +5 -0
  4. package/dist/chunk-3XUVOUJE.mjs.map +1 -0
  5. package/dist/chunk-6E2RGUNG.js +7 -0
  6. package/dist/chunk-6E2RGUNG.js.map +1 -0
  7. package/dist/chunk-ARKJLBXP.js +7 -0
  8. package/dist/chunk-ARKJLBXP.js.map +1 -0
  9. package/dist/chunk-B7GQAMYJ.js +9 -0
  10. package/dist/chunk-B7GQAMYJ.js.map +1 -0
  11. package/dist/chunk-DJDHW6UR.mjs +5 -0
  12. package/dist/chunk-DJDHW6UR.mjs.map +1 -0
  13. package/dist/chunk-F6JHPR4L.mjs +7 -0
  14. package/dist/chunk-F6JHPR4L.mjs.map +1 -0
  15. package/dist/chunk-G7JIJH44.mjs +5 -0
  16. package/dist/chunk-G7JIJH44.mjs.map +1 -0
  17. package/dist/chunk-NO36P4BR.js +9 -0
  18. package/dist/chunk-NO36P4BR.js.map +1 -0
  19. package/dist/chunk-PCIKFIV2.js +7 -0
  20. package/dist/chunk-PCIKFIV2.js.map +1 -0
  21. package/dist/chunk-RWRS63WY.mjs +7 -0
  22. package/dist/chunk-RWRS63WY.mjs.map +1 -0
  23. package/dist/chunk-SV64EPVP.js +7 -0
  24. package/dist/chunk-SV64EPVP.js.map +1 -0
  25. package/dist/chunk-UJAIXHCQ.js +13 -0
  26. package/dist/chunk-UJAIXHCQ.js.map +1 -0
  27. package/dist/chunk-WDMF75TJ.mjs +5 -0
  28. package/dist/chunk-WDMF75TJ.mjs.map +1 -0
  29. package/dist/chunk-WSETOOIE.mjs +5 -0
  30. package/dist/chunk-WSETOOIE.mjs.map +1 -0
  31. package/dist/chunk-XND2BWC4.mjs +7 -0
  32. package/dist/chunk-XND2BWC4.mjs.map +1 -0
  33. package/dist/chunk-YMWD4DNM.js +8 -0
  34. package/dist/chunk-YMWD4DNM.js.map +1 -0
  35. package/dist/config/best-practices.d.ts +5 -0
  36. package/dist/config/best-practices.js +9 -0
  37. package/dist/config/best-practices.js.map +1 -0
  38. package/dist/config/best-practices.mjs +3 -0
  39. package/dist/config/best-practices.mjs.map +1 -0
  40. package/dist/config/errors.d.ts +5 -0
  41. package/dist/config/errors.js +9 -0
  42. package/dist/config/errors.js.map +1 -0
  43. package/dist/config/errors.mjs +3 -0
  44. package/dist/config/errors.mjs.map +1 -0
  45. package/dist/config/es6.d.ts +5 -0
  46. package/dist/config/es6.js +9 -0
  47. package/dist/config/es6.js.map +1 -0
  48. package/dist/config/es6.mjs +3 -0
  49. package/dist/config/es6.mjs.map +1 -0
  50. package/dist/config/plugins/antfu.d.ts +5 -0
  51. package/dist/config/plugins/antfu.js +10 -0
  52. package/dist/config/plugins/antfu.js.map +1 -0
  53. package/dist/config/plugins/antfu.mjs +8 -0
  54. package/dist/config/plugins/antfu.mjs.map +1 -0
  55. package/dist/config/plugins/array-func.d.ts +5 -0
  56. package/dist/config/plugins/array-func.js +9 -0
  57. package/dist/config/plugins/array-func.js.map +1 -0
  58. package/dist/config/plugins/array-func.mjs +7 -0
  59. package/dist/config/plugins/array-func.mjs.map +1 -0
  60. package/dist/config/plugins/ava.d.ts +5 -0
  61. package/dist/config/plugins/ava.js +7 -0
  62. package/dist/config/plugins/ava.js.map +1 -0
  63. package/dist/config/plugins/ava.mjs +5 -0
  64. package/dist/config/plugins/ava.mjs.map +1 -0
  65. package/dist/config/plugins/babel.d.ts +5 -0
  66. package/dist/config/plugins/babel.js +12 -0
  67. package/dist/config/plugins/babel.js.map +1 -0
  68. package/dist/config/plugins/babel.mjs +10 -0
  69. package/dist/config/plugins/babel.mjs.map +1 -0
  70. package/dist/config/plugins/compat.d.ts +5 -0
  71. package/dist/config/plugins/compat.js +7 -0
  72. package/dist/config/plugins/compat.js.map +1 -0
  73. package/dist/config/plugins/compat.mjs +5 -0
  74. package/dist/config/plugins/compat.mjs.map +1 -0
  75. package/dist/config/plugins/cypress.d.ts +5 -0
  76. package/dist/config/plugins/cypress.js +7 -0
  77. package/dist/config/plugins/cypress.js.map +1 -0
  78. package/dist/config/plugins/cypress.mjs +5 -0
  79. package/dist/config/plugins/cypress.mjs.map +1 -0
  80. package/dist/config/plugins/es.d.ts +5 -0
  81. package/dist/config/plugins/es.js +7 -0
  82. package/dist/config/plugins/es.js.map +1 -0
  83. package/dist/config/plugins/es.mjs +5 -0
  84. package/dist/config/plugins/es.mjs.map +1 -0
  85. package/dist/config/plugins/eslint-comments.d.ts +5 -0
  86. package/dist/config/plugins/eslint-comments.js +7 -0
  87. package/dist/config/plugins/eslint-comments.js.map +1 -0
  88. package/dist/config/plugins/eslint-comments.mjs +5 -0
  89. package/dist/config/plugins/eslint-comments.mjs.map +1 -0
  90. package/dist/config/plugins/html.d.ts +5 -0
  91. package/dist/config/plugins/html.js +7 -0
  92. package/dist/config/plugins/html.js.map +1 -0
  93. package/dist/config/plugins/html.mjs +5 -0
  94. package/dist/config/plugins/html.mjs.map +1 -0
  95. package/dist/config/plugins/import.d.ts +5 -0
  96. package/dist/config/plugins/import.js +9 -0
  97. package/dist/config/plugins/import.js.map +1 -0
  98. package/dist/config/plugins/import.mjs +3 -0
  99. package/dist/config/plugins/import.mjs.map +1 -0
  100. package/dist/config/plugins/jest-async.d.ts +5 -0
  101. package/dist/config/plugins/jest-async.js +7 -0
  102. package/dist/config/plugins/jest-async.js.map +1 -0
  103. package/dist/config/plugins/jest-async.mjs +5 -0
  104. package/dist/config/plugins/jest-async.mjs.map +1 -0
  105. package/dist/config/plugins/jest-dom.d.ts +5 -0
  106. package/dist/config/plugins/jest-dom.js +7 -0
  107. package/dist/config/plugins/jest-dom.js.map +1 -0
  108. package/dist/config/plugins/jest-dom.mjs +5 -0
  109. package/dist/config/plugins/jest-dom.mjs.map +1 -0
  110. package/dist/config/plugins/jest-formatting.d.ts +5 -0
  111. package/dist/config/plugins/jest-formatting.js +7 -0
  112. package/dist/config/plugins/jest-formatting.js.map +1 -0
  113. package/dist/config/plugins/jest-formatting.mjs +5 -0
  114. package/dist/config/plugins/jest-formatting.mjs.map +1 -0
  115. package/dist/config/plugins/jest.d.ts +5 -0
  116. package/dist/config/plugins/jest.js +7 -0
  117. package/dist/config/plugins/jest.js.map +1 -0
  118. package/dist/config/plugins/jest.mjs +5 -0
  119. package/dist/config/plugins/jest.mjs.map +1 -0
  120. package/dist/config/plugins/jsdoc.d.ts +5 -0
  121. package/dist/config/plugins/jsdoc.js +11 -0
  122. package/dist/config/plugins/jsdoc.js.map +1 -0
  123. package/dist/config/plugins/jsdoc.mjs +9 -0
  124. package/dist/config/plugins/jsdoc.mjs.map +1 -0
  125. package/dist/config/plugins/jsonc.d.ts +5 -0
  126. package/dist/config/plugins/jsonc.js +11 -0
  127. package/dist/config/plugins/jsonc.js.map +1 -0
  128. package/dist/config/plugins/jsonc.mjs +9 -0
  129. package/dist/config/plugins/jsonc.mjs.map +1 -0
  130. package/dist/config/plugins/jsx-a11y.d.ts +5 -0
  131. package/dist/config/plugins/jsx-a11y.js +7 -0
  132. package/dist/config/plugins/jsx-a11y.js.map +1 -0
  133. package/dist/config/plugins/jsx-a11y.mjs +5 -0
  134. package/dist/config/plugins/jsx-a11y.mjs.map +1 -0
  135. package/dist/config/plugins/lodash-fp.d.ts +5 -0
  136. package/dist/config/plugins/lodash-fp.js +7 -0
  137. package/dist/config/plugins/lodash-fp.js.map +1 -0
  138. package/dist/config/plugins/lodash-fp.mjs +5 -0
  139. package/dist/config/plugins/lodash-fp.mjs.map +1 -0
  140. package/dist/config/plugins/lodash.d.ts +5 -0
  141. package/dist/config/plugins/lodash.js +7 -0
  142. package/dist/config/plugins/lodash.js.map +1 -0
  143. package/dist/config/plugins/lodash.mjs +5 -0
  144. package/dist/config/plugins/lodash.mjs.map +1 -0
  145. package/dist/config/plugins/markdown.d.ts +5 -0
  146. package/dist/config/plugins/markdown.js +7 -0
  147. package/dist/config/plugins/markdown.js.map +1 -0
  148. package/dist/config/plugins/markdown.mjs +5 -0
  149. package/dist/config/plugins/markdown.mjs.map +1 -0
  150. package/dist/config/plugins/mdx.d.ts +5 -0
  151. package/dist/config/plugins/mdx.js +7 -0
  152. package/dist/config/plugins/mdx.js.map +1 -0
  153. package/dist/config/plugins/mdx.mjs +5 -0
  154. package/dist/config/plugins/mdx.mjs.map +1 -0
  155. package/dist/config/plugins/no-extend-native.d.ts +5 -0
  156. package/dist/config/plugins/no-extend-native.js +7 -0
  157. package/dist/config/plugins/no-extend-native.js.map +1 -0
  158. package/dist/config/plugins/no-extend-native.mjs +5 -0
  159. package/dist/config/plugins/no-extend-native.mjs.map +1 -0
  160. package/dist/config/plugins/no-loops.d.ts +5 -0
  161. package/dist/config/plugins/no-loops.js +7 -0
  162. package/dist/config/plugins/no-loops.js.map +1 -0
  163. package/dist/config/plugins/no-loops.mjs +5 -0
  164. package/dist/config/plugins/no-loops.mjs.map +1 -0
  165. package/dist/config/plugins/no-secrets.d.ts +5 -0
  166. package/dist/config/plugins/no-secrets.js +7 -0
  167. package/dist/config/plugins/no-secrets.js.map +1 -0
  168. package/dist/config/plugins/no-secrets.mjs +5 -0
  169. package/dist/config/plugins/no-secrets.mjs.map +1 -0
  170. package/dist/config/plugins/no-unsanitized.d.ts +5 -0
  171. package/dist/config/plugins/no-unsanitized.js +7 -0
  172. package/dist/config/plugins/no-unsanitized.js.map +1 -0
  173. package/dist/config/plugins/no-unsanitized.mjs +5 -0
  174. package/dist/config/plugins/no-unsanitized.mjs.map +1 -0
  175. package/dist/config/plugins/node.d.ts +5 -0
  176. package/dist/config/plugins/node.js +9 -0
  177. package/dist/config/plugins/node.js.map +1 -0
  178. package/dist/config/plugins/node.mjs +7 -0
  179. package/dist/config/plugins/node.mjs.map +1 -0
  180. package/dist/config/plugins/optimize-regex.d.ts +5 -0
  181. package/dist/config/plugins/optimize-regex.js +7 -0
  182. package/dist/config/plugins/optimize-regex.js.map +1 -0
  183. package/dist/config/plugins/optimize-regex.mjs +5 -0
  184. package/dist/config/plugins/optimize-regex.mjs.map +1 -0
  185. package/dist/config/plugins/promise.d.ts +5 -0
  186. package/dist/config/plugins/promise.js +7 -0
  187. package/dist/config/plugins/promise.js.map +1 -0
  188. package/dist/config/plugins/promise.mjs +5 -0
  189. package/dist/config/plugins/promise.mjs.map +1 -0
  190. package/dist/config/plugins/react-hooks.d.ts +5 -0
  191. package/dist/config/plugins/react-hooks.js +7 -0
  192. package/dist/config/plugins/react-hooks.js.map +1 -0
  193. package/dist/config/plugins/react-hooks.mjs +5 -0
  194. package/dist/config/plugins/react-hooks.mjs.map +1 -0
  195. package/dist/config/plugins/react-redux.d.ts +5 -0
  196. package/dist/config/plugins/react-redux.js +7 -0
  197. package/dist/config/plugins/react-redux.js.map +1 -0
  198. package/dist/config/plugins/react-redux.mjs +5 -0
  199. package/dist/config/plugins/react-redux.mjs.map +1 -0
  200. package/dist/config/plugins/react.d.ts +5 -0
  201. package/dist/config/plugins/react.js +21 -0
  202. package/dist/config/plugins/react.js.map +1 -0
  203. package/dist/config/plugins/react.mjs +15 -0
  204. package/dist/config/plugins/react.mjs.map +1 -0
  205. package/dist/config/plugins/security.d.ts +5 -0
  206. package/dist/config/plugins/security.js +7 -0
  207. package/dist/config/plugins/security.js.map +1 -0
  208. package/dist/config/plugins/security.mjs +5 -0
  209. package/dist/config/plugins/security.mjs.map +1 -0
  210. package/dist/config/plugins/simple-import-sort.d.ts +5 -0
  211. package/dist/config/plugins/simple-import-sort.js +7 -0
  212. package/dist/config/plugins/simple-import-sort.js.map +1 -0
  213. package/dist/config/plugins/simple-import-sort.mjs +5 -0
  214. package/dist/config/plugins/simple-import-sort.mjs.map +1 -0
  215. package/dist/config/plugins/sonarjs.d.ts +5 -0
  216. package/dist/config/plugins/sonarjs.js +7 -0
  217. package/dist/config/plugins/sonarjs.js.map +1 -0
  218. package/dist/config/plugins/sonarjs.mjs +5 -0
  219. package/dist/config/plugins/sonarjs.mjs.map +1 -0
  220. package/dist/config/plugins/sort-keys-fix.d.ts +5 -0
  221. package/dist/config/plugins/sort-keys-fix.js +7 -0
  222. package/dist/config/plugins/sort-keys-fix.js.map +1 -0
  223. package/dist/config/plugins/sort-keys-fix.mjs +5 -0
  224. package/dist/config/plugins/sort-keys-fix.mjs.map +1 -0
  225. package/dist/config/plugins/tailwindcss.d.ts +5 -0
  226. package/dist/config/plugins/tailwindcss.js +7 -0
  227. package/dist/config/plugins/tailwindcss.js.map +1 -0
  228. package/dist/config/plugins/tailwindcss.mjs +5 -0
  229. package/dist/config/plugins/tailwindcss.mjs.map +1 -0
  230. package/dist/config/plugins/testing-library.d.ts +5 -0
  231. package/dist/config/plugins/testing-library.js +10 -0
  232. package/dist/config/plugins/testing-library.js.map +1 -0
  233. package/dist/config/plugins/testing-library.mjs +8 -0
  234. package/dist/config/plugins/testing-library.mjs.map +1 -0
  235. package/dist/config/plugins/toml.d.ts +5 -0
  236. package/dist/config/plugins/toml.js +7 -0
  237. package/dist/config/plugins/toml.js.map +1 -0
  238. package/dist/config/plugins/toml.mjs +5 -0
  239. package/dist/config/plugins/toml.mjs.map +1 -0
  240. package/dist/config/plugins/tsdoc.d.ts +5 -0
  241. package/dist/config/plugins/tsdoc.js +9 -0
  242. package/dist/config/plugins/tsdoc.js.map +1 -0
  243. package/dist/config/plugins/tsdoc.mjs +7 -0
  244. package/dist/config/plugins/tsdoc.mjs.map +1 -0
  245. package/dist/config/plugins/typescript-sort-keys.d.ts +5 -0
  246. package/dist/config/plugins/typescript-sort-keys.js +7 -0
  247. package/dist/config/plugins/typescript-sort-keys.js.map +1 -0
  248. package/dist/config/plugins/typescript-sort-keys.mjs +5 -0
  249. package/dist/config/plugins/typescript-sort-keys.mjs.map +1 -0
  250. package/dist/config/plugins/typescript.d.ts +5 -0
  251. package/dist/config/plugins/typescript.js +18 -0
  252. package/dist/config/plugins/typescript.js.map +1 -0
  253. package/dist/config/plugins/typescript.mjs +16 -0
  254. package/dist/config/plugins/typescript.mjs.map +1 -0
  255. package/dist/config/plugins/unicorn.d.ts +5 -0
  256. package/dist/config/plugins/unicorn.js +15 -0
  257. package/dist/config/plugins/unicorn.js.map +1 -0
  258. package/dist/config/plugins/unicorn.mjs +9 -0
  259. package/dist/config/plugins/unicorn.mjs.map +1 -0
  260. package/dist/config/plugins/vitest.d.ts +5 -0
  261. package/dist/config/plugins/vitest.js +7 -0
  262. package/dist/config/plugins/vitest.js.map +1 -0
  263. package/dist/config/plugins/vitest.mjs +5 -0
  264. package/dist/config/plugins/vitest.mjs.map +1 -0
  265. package/dist/config/plugins/yml.d.ts +5 -0
  266. package/dist/config/plugins/yml.js +7 -0
  267. package/dist/config/plugins/yml.js.map +1 -0
  268. package/dist/config/plugins/yml.mjs +5 -0
  269. package/dist/config/plugins/yml.mjs.map +1 -0
  270. package/dist/config/plugins/you-dont-need-lodash-underscore.d.ts +5 -0
  271. package/dist/config/plugins/you-dont-need-lodash-underscore.js +7 -0
  272. package/dist/config/plugins/you-dont-need-lodash-underscore.js.map +1 -0
  273. package/dist/config/plugins/you-dont-need-lodash-underscore.mjs +5 -0
  274. package/dist/config/plugins/you-dont-need-lodash-underscore.mjs.map +1 -0
  275. package/dist/config/plugins/you-dont-need-momentjs.d.ts +5 -0
  276. package/dist/config/plugins/you-dont-need-momentjs.js +7 -0
  277. package/dist/config/plugins/you-dont-need-momentjs.js.map +1 -0
  278. package/dist/config/plugins/you-dont-need-momentjs.mjs +5 -0
  279. package/dist/config/plugins/you-dont-need-momentjs.mjs.map +1 -0
  280. package/dist/config/plugins/zod.d.ts +5 -0
  281. package/dist/config/plugins/zod.js +7 -0
  282. package/dist/config/plugins/zod.js.map +1 -0
  283. package/dist/config/plugins/zod.mjs +5 -0
  284. package/dist/config/plugins/zod.mjs.map +1 -0
  285. package/dist/config/style.d.ts +5 -0
  286. package/dist/config/style.js +9 -0
  287. package/dist/config/style.js.map +1 -0
  288. package/dist/config/style.mjs +3 -0
  289. package/dist/config/style.mjs.map +1 -0
  290. package/dist/config/variables.d.ts +5 -0
  291. package/dist/config/variables.js +9 -0
  292. package/dist/config/variables.js.map +1 -0
  293. package/dist/config/variables.mjs +3 -0
  294. package/dist/config/variables.mjs.map +1 -0
  295. package/dist/index.d.ts +5 -0
  296. package/dist/index.js +22 -0
  297. package/dist/index.js.map +1 -0
  298. package/dist/index.mjs +16 -0
  299. package/dist/index.mjs.map +1 -0
  300. package/dist/postinstall.d.ts +2 -0
  301. package/dist/postinstall.js +65 -0
  302. package/dist/postinstall.js.map +1 -0
  303. package/dist/postinstall.mjs +63 -0
  304. package/dist/postinstall.mjs.map +1 -0
  305. package/dist/typescript-type-checking.d.ts +5 -0
  306. package/dist/typescript-type-checking.js +10 -0
  307. package/dist/typescript-type-checking.js.map +1 -0
  308. package/dist/typescript-type-checking.mjs +8 -0
  309. package/dist/typescript-type-checking.mjs.map +1 -0
  310. package/package.json +106 -50
  311. package/config.cjs +0 -88
  312. package/index.cjs +0 -58
  313. package/lib/check-missing.cjs +0 -57
  314. package/lib/is-module-available.cjs +0 -8
  315. package/lib/loggers.cjs +0 -12
  316. package/lib/postinstall.cjs +0 -115
  317. package/lib/show-loaded.cjs +0 -21
  318. package/lib/utils.cjs +0 -90
  319. package/rules/best-practices.cjs +0 -395
  320. package/rules/errors.cjs +0 -177
  321. package/rules/es6.cjs +0 -217
  322. package/rules/plugins/array-func.cjs +0 -13
  323. package/rules/plugins/babel.cjs +0 -36
  324. package/rules/plugins/compat.cjs +0 -3
  325. package/rules/plugins/cypress.cjs +0 -13
  326. package/rules/plugins/eslint-comments.cjs +0 -11
  327. package/rules/plugins/html.cjs +0 -3
  328. package/rules/plugins/import.cjs +0 -265
  329. package/rules/plugins/jest-async.cjs +0 -6
  330. package/rules/plugins/jest-dom.cjs +0 -3
  331. package/rules/plugins/jest-formatting.cjs +0 -3
  332. package/rules/plugins/jest.cjs +0 -43
  333. package/rules/plugins/jsdoc.cjs +0 -4
  334. package/rules/plugins/json.cjs +0 -40
  335. package/rules/plugins/jsonc.cjs +0 -70
  336. package/rules/plugins/jsx-a11y.cjs +0 -261
  337. package/rules/plugins/lodash-fp.cjs +0 -7
  338. package/rules/plugins/lodash.cjs +0 -52
  339. package/rules/plugins/markdown.cjs +0 -32
  340. package/rules/plugins/mdx.cjs +0 -4
  341. package/rules/plugins/no-loops.cjs +0 -7
  342. package/rules/plugins/no-secrets.cjs +0 -20
  343. package/rules/plugins/no-unsanitized.cjs +0 -8
  344. package/rules/plugins/node.cjs +0 -44
  345. package/rules/plugins/optimize-regex.cjs +0 -6
  346. package/rules/plugins/promise.cjs +0 -9
  347. package/rules/plugins/react-hooks.cjs +0 -20
  348. package/rules/plugins/react-redux.cjs +0 -9
  349. package/rules/plugins/react.cjs +0 -659
  350. package/rules/plugins/simple-import-sort.cjs +0 -10
  351. package/rules/plugins/sonarjs.cjs +0 -5
  352. package/rules/plugins/sort-keys-fix.cjs +0 -6
  353. package/rules/plugins/tailwindcss.cjs +0 -4
  354. package/rules/plugins/testing-library.cjs +0 -34
  355. package/rules/plugins/toml.cjs +0 -9
  356. package/rules/plugins/typescript-sort-keys.cjs +0 -19
  357. package/rules/plugins/typescript.cjs +0 -427
  358. package/rules/plugins/unicorn.cjs +0 -20
  359. package/rules/plugins/yml.cjs +0 -12
  360. package/rules/plugins/you-dont-need-lodash-underscore.cjs +0 -3
  361. package/rules/plugins/you-dont-need-momentjs.cjs +0 -3
  362. package/rules/style.cjs +0 -629
  363. package/rules/variables.cjs +0 -54
package/rules/style.cjs DELETED
@@ -1,629 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- // enforce line breaks after opening and before closing array brackets
4
- // https://eslint.org/docs/rules/array-bracket-newline
5
- // TODO: enable? semver-major
6
- "array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
7
-
8
- // enforce line breaks between array elements
9
- // https://eslint.org/docs/rules/array-element-newline
10
- // TODO: enable? semver-major
11
- "array-element-newline": ["off", { multiline: true, minItems: 3 }],
12
-
13
- // enforce spacing inside array brackets
14
- "array-bracket-spacing": ["error", "never"],
15
-
16
- // enforce spacing inside single-line blocks
17
- // https://eslint.org/docs/rules/block-spacing
18
- "block-spacing": ["error", "always"],
19
-
20
- // enforce one true brace style
21
- "brace-style": ["error", "1tbs", { allowSingleLine: true }],
22
-
23
- // require camel case names
24
- camelcase: ["error", { properties: "never", ignoreDestructuring: false }],
25
-
26
- // enforce or disallow capitalization of the first letter of a comment
27
- // https://eslint.org/docs/rules/capitalized-comments
28
- "capitalized-comments": [
29
- "off",
30
- "never",
31
- {
32
- line: {
33
- ignorePattern: ".*",
34
- ignoreInlineComments: true,
35
- ignoreConsecutiveComments: true,
36
- },
37
- block: {
38
- ignorePattern: ".*",
39
- ignoreInlineComments: true,
40
- ignoreConsecutiveComments: true,
41
- },
42
- },
43
- ],
44
-
45
- // require trailing commas in multiline object literals
46
- "comma-dangle": [
47
- "error",
48
- {
49
- // eslint-disable-next-line sonarjs/no-duplicate-string
50
- arrays: "always-multiline",
51
- objects: "always-multiline",
52
- imports: "always-multiline",
53
- exports: "always-multiline",
54
- functions: "always-multiline",
55
- },
56
- ],
57
-
58
- // enforce spacing before and after comma
59
- "comma-spacing": ["error", { before: false, after: true }],
60
-
61
- // enforce one true comma style
62
- "comma-style": [
63
- "error",
64
- "last",
65
- {
66
- exceptions: {
67
- ArrayExpression: false,
68
- ArrayPattern: false,
69
- ArrowFunctionExpression: false,
70
- CallExpression: false,
71
- FunctionDeclaration: false,
72
- FunctionExpression: false,
73
- ImportDeclaration: false,
74
- ObjectExpression: false,
75
- ObjectPattern: false,
76
- VariableDeclaration: false,
77
- NewExpression: false,
78
- },
79
- },
80
- ],
81
-
82
- // disallow padding inside computed properties
83
- "computed-property-spacing": ["error", "never"],
84
-
85
- // enforces consistent naming when capturing the current execution context
86
- "consistent-this": "off",
87
-
88
- // enforce that default parameters should come last
89
- "default-param-last": ["error"],
90
-
91
- // enforce newline at the end of file, with no multiple empty lines
92
- "eol-last": ["error", "always"],
93
-
94
- // https://eslint.org/docs/rules/function-call-argument-newline
95
- // TODO: enable, semver-minor, once eslint v6.2 is required (which is a major)
96
- "function-call-argument-newline": ["off", "consistent"],
97
-
98
- // enforce spacing between functions and their invocations
99
- // https://eslint.org/docs/rules/func-call-spacing
100
- "func-call-spacing": ["error", "never"],
101
-
102
- // requires function names to match the name of the variable or property to which they are
103
- // assigned
104
- // https://eslint.org/docs/rules/func-name-matching
105
- "func-name-matching": [
106
- "off",
107
- "always",
108
- {
109
- includeCommonJSModuleExports: false,
110
- considerPropertyDescriptor: true,
111
- },
112
- ],
113
-
114
- // require function expressions to have a name
115
- // https://eslint.org/docs/rules/func-names
116
- "func-names": "warn",
117
-
118
- // enforces use of function declarations or expressions
119
- // https://eslint.org/docs/rules/func-style
120
- // TODO: enable
121
- "func-style": ["off", "expression"],
122
-
123
- // enforce consistent line breaks inside function parentheses
124
- // https://eslint.org/docs/rules/function-paren-newline
125
- "function-paren-newline": ["error", "consistent"],
126
-
127
- // Blacklist certain identifiers to prevent them being used
128
- // https://eslint.org/docs/rules/id-blacklist
129
- // TODO: semver-major, remove once eslint v7.4+ is required
130
- "id-blacklist": "off",
131
-
132
- // disallow specified identifiers
133
- // https://eslint.org/docs/rules/id-denylist
134
- "id-denylist": "off",
135
-
136
- // this option enforces minimum and maximum identifier lengths
137
- // (variable names, property names etc.)
138
- "id-length": "off",
139
-
140
- // require identifiers to match the provided regular expression
141
- "id-match": "off",
142
-
143
- // Enforce the location of arrow function bodies with implicit returns
144
- // https://eslint.org/docs/rules/implicit-arrow-linebreak
145
- "implicit-arrow-linebreak": ["error", "beside"],
146
-
147
- // this option sets a specific tab width for your code
148
- // https://eslint.org/docs/rules/indent
149
- indent: [
150
- "error",
151
- 4,
152
- {
153
- SwitchCase: 1,
154
- VariableDeclarator: 1,
155
- outerIIFEBody: 1,
156
- // MemberExpression: null,
157
- FunctionDeclaration: {
158
- parameters: 1,
159
- body: 1,
160
- },
161
- FunctionExpression: {
162
- parameters: 1,
163
- body: 1,
164
- },
165
- CallExpression: {
166
- arguments: 1,
167
- },
168
- ArrayExpression: 1,
169
- ObjectExpression: 1,
170
- ImportDeclaration: 1,
171
- flatTernaryExpressions: false,
172
- // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
173
- ignoredNodes: [
174
- "JSXElement",
175
- "JSXElement > *",
176
- "JSXAttribute",
177
- "JSXIdentifier",
178
- "JSXNamespacedName",
179
- "JSXMemberExpression",
180
- "JSXSpreadAttribute",
181
- "JSXExpressionContainer",
182
- "JSXOpeningElement",
183
- "JSXClosingElement",
184
- "JSXFragment",
185
- "JSXOpeningFragment",
186
- "JSXClosingFragment",
187
- "JSXText",
188
- "JSXEmptyExpression",
189
- "JSXSpreadChild",
190
- ],
191
- ignoreComments: false,
192
- },
193
- ],
194
-
195
- // specify whether double or single quotes should be used in JSX attributes
196
- // https://eslint.org/docs/rules/jsx-quotes
197
- "jsx-quotes": ["off", "prefer-double"],
198
-
199
- // enforces spacing between keys and values in object literal properties
200
- "key-spacing": ["error", { beforeColon: false, afterColon: true }],
201
-
202
- // require a space before & after certain keywords
203
- "keyword-spacing": [
204
- "error",
205
- {
206
- before: true,
207
- after: true,
208
- overrides: {
209
- return: { after: true },
210
- throw: { after: true },
211
- case: { after: true },
212
- },
213
- },
214
- ],
215
-
216
- // enforce position of line comments
217
- // https://eslint.org/docs/rules/line-comment-position
218
- // TODO: enable?
219
- "line-comment-position": [
220
- "off",
221
- {
222
- position: "above",
223
- ignorePattern: "",
224
- applyDefaultPatterns: true,
225
- },
226
- ],
227
-
228
- // disallow mixed 'LF' and 'CRLF' as linebreaks
229
- // https://eslint.org/docs/rules/linebreak-style
230
- "linebreak-style": ["error", "unix"],
231
-
232
- // require or disallow an empty line between class members
233
- // https://eslint.org/docs/rules/lines-between-class-members
234
- "lines-between-class-members": ["error", "always", { exceptAfterSingleLine: false }],
235
-
236
- // enforces empty lines around comments
237
- "lines-around-comment": "off",
238
-
239
- // require or disallow newlines around directives
240
- // https://eslint.org/docs/rules/lines-around-directive
241
- "lines-around-directive": [
242
- "error",
243
- {
244
- before: "always",
245
- after: "always",
246
- },
247
- ],
248
-
249
- // specify the maximum depth that blocks can be nested
250
- "max-depth": ["off", 4],
251
-
252
- // specify the maximum length of a line in your program
253
- // https://eslint.org/docs/rules/max-len
254
- "max-len": [
255
- "error",
256
- 160,
257
- 2,
258
- {
259
- ignoreUrls: true,
260
- ignoreComments: false,
261
- ignoreRegExpLiterals: true,
262
- ignoreStrings: true,
263
- ignoreTemplateLiterals: true,
264
- },
265
- ],
266
-
267
- // specify the max number of lines in a file
268
- // https://eslint.org/docs/rules/max-lines
269
- "max-lines": [
270
- "off",
271
- {
272
- max: 300,
273
- skipBlankLines: true,
274
- skipComments: true,
275
- },
276
- ],
277
-
278
- // enforce a maximum function length
279
- // https://eslint.org/docs/rules/max-lines-per-function
280
- "max-lines-per-function": [
281
- "off",
282
- {
283
- max: 50,
284
- skipBlankLines: true,
285
- skipComments: true,
286
- IIFEs: true,
287
- },
288
- ],
289
-
290
- // specify the maximum depth callbacks can be nested
291
- "max-nested-callbacks": "off",
292
-
293
- // limits the number of parameters that can be used in the function declaration.
294
- "max-params": ["off", 3],
295
-
296
- // specify the maximum number of statement allowed in a function
297
- "max-statements": ["off", 10],
298
-
299
- // restrict the number of statements per line
300
- // https://eslint.org/docs/rules/max-statements-per-line
301
- "max-statements-per-line": ["off", { max: 1 }],
302
-
303
- // enforce a particular style for multiline comments
304
- // https://eslint.org/docs/rules/multiline-comment-style
305
- "multiline-comment-style": ["off", "starred-block"],
306
-
307
- // require multiline ternary
308
- // https://eslint.org/docs/rules/multiline-ternary
309
- // TODO: enable?
310
- "multiline-ternary": ["off", "never"],
311
-
312
- // require a capital letter for constructors
313
- "new-cap": [
314
- "error",
315
- {
316
- newIsCap: true,
317
- newIsCapExceptions: [],
318
- capIsNew: false,
319
- capIsNewExceptions: ["Immutable.Map", "Immutable.Set", "Immutable.List"],
320
- },
321
- ],
322
-
323
- // disallow the omission of parentheses when invoking a constructor with no arguments
324
- // https://eslint.org/docs/rules/new-parens
325
- "new-parens": "error",
326
-
327
- // allow/disallow an empty newline after var statement
328
- "newline-after-var": "off",
329
-
330
- // https://eslint.org/docs/rules/newline-before-return
331
- "newline-before-return": "off",
332
-
333
- // enforces new line after each method call in the chain to make it
334
- // more readable and easy to maintain
335
- // https://eslint.org/docs/rules/newline-per-chained-call
336
- "newline-per-chained-call": ["error", { ignoreChainWithDepth: 4 }],
337
-
338
- // disallow use of the Array constructor
339
- "no-array-constructor": "error",
340
-
341
- // disallow use of bitwise operators
342
- // https://eslint.org/docs/rules/no-bitwise
343
- "no-bitwise": "error",
344
-
345
- // disallow use of the continue statement
346
- // https://eslint.org/docs/rules/no-continue
347
- "no-continue": "error",
348
-
349
- // disallow comments inline after code
350
- "no-inline-comments": "off",
351
-
352
- // disallow if as the only statement in an else block
353
- // https://eslint.org/docs/rules/no-lonely-if
354
- "no-lonely-if": "error",
355
-
356
- // disallow un-paren'd mixes of different operators
357
- // https://eslint.org/docs/rules/no-mixed-operators
358
- "no-mixed-operators": [
359
- "error",
360
- {
361
- // the list of arithmetic groups disallows mixing `%` and `**`
362
- // with other arithmetic operators.
363
- groups: [
364
- ["%", "**"],
365
- ["%", "+"],
366
- ["%", "-"],
367
- ["%", "*"],
368
- ["%", "/"],
369
- ["/", "*"],
370
- ["&", "|", "<<", ">>", ">>>"],
371
- ["==", "!=", "===", "!=="],
372
- ["&&", "||"],
373
- ["in", "instanceof"],
374
- ],
375
- allowSamePrecedence: false,
376
- },
377
- ],
378
-
379
- // disallow mixed spaces and tabs for indentation
380
- "no-mixed-spaces-and-tabs": "error",
381
-
382
- // disallow use of chained assignment expressions
383
- // https://eslint.org/docs/rules/no-multi-assign
384
- "no-multi-assign": ["error"],
385
-
386
- // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
387
- // https://eslint.org/docs/rules/no-multiple-empty-lines
388
- "no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
389
-
390
- // disallow negated conditions
391
- // https://eslint.org/docs/rules/no-negated-condition
392
- "no-negated-condition": "off",
393
-
394
- // disallow nested ternary expressions
395
- "no-nested-ternary": "error",
396
-
397
- // disallow use of the Object constructor
398
- "no-new-object": "error",
399
-
400
- // disallow use of unary operators, ++ and --
401
- // https://eslint.org/docs/rules/no-plusplus
402
- "no-plusplus": "error",
403
-
404
- // disallow certain syntax forms
405
- // https://eslint.org/docs/rules/no-restricted-syntax
406
- "no-restricted-syntax": [
407
- "error",
408
- {
409
- selector: "ForInStatement",
410
- message:
411
- "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
412
- },
413
- {
414
- selector: "ForOfStatement",
415
- message:
416
- "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.",
417
- },
418
- {
419
- selector: "LabeledStatement",
420
- message:
421
- "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
422
- },
423
- {
424
- selector: "WithStatement",
425
- message:
426
- "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
427
- },
428
- ],
429
-
430
- // disallow space between function identifier and application
431
- "no-spaced-func": "error",
432
-
433
- // disallow tab characters entirely
434
- "no-tabs": "error",
435
-
436
- // disallow the use of ternary operators
437
- "no-ternary": "off",
438
-
439
- // disallow trailing whitespace at the end of lines
440
- "no-trailing-spaces": [
441
- "error",
442
- {
443
- skipBlankLines: false,
444
- ignoreComments: false,
445
- },
446
- ],
447
-
448
- // disallow dangling underscores in identifiers
449
- // https://eslint.org/docs/rules/no-underscore-dangle
450
- "no-underscore-dangle": [
451
- "error",
452
- {
453
- allow: ["__DEV__"],
454
- allowAfterThis: false,
455
- allowAfterSuper: false,
456
- enforceInMethodNames: true,
457
- },
458
- ],
459
-
460
- // disallow the use of Boolean literals in conditional expressions
461
- // also, prefer `a || b` over `a ? a : b`
462
- // https://eslint.org/docs/rules/no-unneeded-ternary
463
- "no-unneeded-ternary": ["error", { defaultAssignment: false }],
464
-
465
- // disallow whitespace before properties
466
- // https://eslint.org/docs/rules/no-whitespace-before-property
467
- "no-whitespace-before-property": "error",
468
-
469
- // enforce the location of single-line statements
470
- // https://eslint.org/docs/rules/nonblock-statement-body-position
471
- "nonblock-statement-body-position": ["error", "beside", { overrides: {} }],
472
-
473
- // require padding inside curly braces
474
- "object-curly-spacing": ["error", "always"],
475
-
476
- // enforce line breaks between braces
477
- // https://eslint.org/docs/rules/object-curly-newline
478
- "object-curly-newline": [
479
- "error",
480
- {
481
- ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
482
- ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
483
- ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
484
- ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
485
- },
486
- ],
487
-
488
- // enforce "same line" or "multiple line" on object properties.
489
- // https://eslint.org/docs/rules/object-property-newline
490
- "object-property-newline": [
491
- "error",
492
- {
493
- allowAllPropertiesOnSameLine: true,
494
- },
495
- ],
496
-
497
- // allow just one var statement per function
498
- "one-var": ["error", "never"],
499
-
500
- // require a newline around variable declaration
501
- // https://eslint.org/docs/rules/one-var-declaration-per-line
502
- "one-var-declaration-per-line": ["error", "always"],
503
-
504
- // require assignment operator shorthand where possible or prohibit it entirely
505
- // https://eslint.org/docs/rules/operator-assignment
506
- "operator-assignment": ["error", "always"],
507
-
508
- // Requires operator at the beginning of the line in multiline statements
509
- // https://eslint.org/docs/rules/operator-linebreak
510
- "operator-linebreak": ["error", "before", { overrides: { "=": "none" } }],
511
-
512
- // disallow padding within blocks
513
- "padded-blocks": [
514
- "error",
515
- {
516
- blocks: "never",
517
- classes: "never",
518
- switches: "never",
519
- },
520
- {
521
- allowSingleLineBlocks: true,
522
- },
523
- ],
524
-
525
- // Require or disallow padding lines between statements
526
- // https://eslint.org/docs/rules/padding-line-between-statements
527
- "padding-line-between-statements": "off",
528
-
529
- // Disallow the use of Math.pow in favor of the ** operator
530
- // https://eslint.org/docs/rules/prefer-exponentiation-operator
531
- // TODO: enable, semver-major when eslint 5 is dropped
532
- "prefer-exponentiation-operator": "off",
533
-
534
- // Prefer use of an object spread over Object.assign
535
- // https://eslint.org/docs/rules/prefer-object-spread
536
- "prefer-object-spread": "error",
537
-
538
- // require quotes around object literal property names
539
- // https://eslint.org/docs/rules/quote-props.html
540
- "quote-props": ["error", "as-needed", { keywords: false, unnecessary: true, numbers: false }],
541
-
542
- // specify whether double or single quotes should be used
543
- quotes: ["error", "double", { avoidEscape: true }],
544
-
545
- // do not require jsdoc
546
- // https://eslint.org/docs/rules/require-jsdoc
547
- "require-jsdoc": "off",
548
-
549
- // require or disallow use of semicolons instead of ASI
550
- semi: ["error", "always"],
551
-
552
- // enforce spacing before and after semicolons
553
- "semi-spacing": ["error", { before: false, after: true }],
554
-
555
- // Enforce location of semicolons
556
- // https://eslint.org/docs/rules/semi-style
557
- "semi-style": ["error", "last"],
558
-
559
- // requires object keys to be sorted
560
- "sort-keys": ["off", "asc", { caseSensitive: false, natural: true }],
561
-
562
- // sort variables within the same declaration block
563
- "sort-vars": "off",
564
-
565
- // require or disallow space before blocks
566
- "space-before-blocks": "error",
567
-
568
- // require or disallow space before function opening parenthesis
569
- // https://eslint.org/docs/rules/space-before-function-paren
570
- "space-before-function-paren": [
571
- "error",
572
- {
573
- anonymous: "always",
574
- named: "never",
575
- asyncArrow: "always",
576
- },
577
- ],
578
-
579
- // require or disallow spaces inside parentheses
580
- "space-in-parens": ["error", "never"],
581
-
582
- // require spaces around operators
583
- "space-infix-ops": "error",
584
-
585
- // Require or disallow spaces before/after unary operators
586
- // https://eslint.org/docs/rules/space-unary-ops
587
- "space-unary-ops": [
588
- "error",
589
- {
590
- words: true,
591
- nonwords: false,
592
- overrides: {},
593
- },
594
- ],
595
-
596
- // require or disallow a space immediately following the // or /* in a comment
597
- // https://eslint.org/docs/rules/spaced-comment
598
- "spaced-comment": [
599
- "error",
600
- "always",
601
- {
602
- line: {
603
- exceptions: ["-", "+"],
604
- markers: ["=", "!", "/"], // space here to support sprockets directives, slash for TS /// comments
605
- },
606
- block: {
607
- exceptions: ["-", "+"],
608
- markers: ["=", "!", ":", "::"], // space here to support sprockets directives and flow comment types
609
- balanced: true,
610
- },
611
- },
612
- ],
613
-
614
- // Enforce spacing around colons of switch statements
615
- // https://eslint.org/docs/rules/switch-colon-spacing
616
- "switch-colon-spacing": ["error", { after: true, before: false }],
617
-
618
- // Require or disallow spacing between template tags and their literals
619
- // https://eslint.org/docs/rules/template-tag-spacing
620
- "template-tag-spacing": ["error", "never"],
621
-
622
- // require or disallow the Unicode Byte Order Mark
623
- // https://eslint.org/docs/rules/unicode-bom
624
- "unicode-bom": ["error", "never"],
625
-
626
- // require regex literals to be wrapped in parentheses
627
- "wrap-regex": "off",
628
- },
629
- };
@@ -1,54 +0,0 @@
1
- const confusingBrowserGlobals = require("confusing-browser-globals");
2
-
3
- module.exports = {
4
- rules: {
5
- // enforce or disallow variable initializations at definition
6
- "init-declarations": "off",
7
-
8
- // disallow the catch clause parameter name being the same as a variable in the outer scope
9
- "no-catch-shadow": "off",
10
-
11
- // disallow deletion of variables
12
- "no-delete-var": "error",
13
-
14
- // disallow labels that share a name with a variable
15
- // https://eslint.org/docs/rules/no-label-var
16
- "no-label-var": "error",
17
-
18
- // disallow specific globals
19
- "no-restricted-globals": [
20
- "error",
21
- {
22
- name: "isFinite",
23
- message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",
24
- },
25
- {
26
- name: "isNaN",
27
- message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",
28
- },
29
- ...confusingBrowserGlobals,
30
- ],
31
-
32
- // disallow declaration of variables already declared in the outer scope
33
- "no-shadow": "error",
34
-
35
- // disallow shadowing of names such as arguments
36
- "no-shadow-restricted-names": "error",
37
-
38
- // disallow use of undeclared variables unless mentioned in a /*global */ block
39
- "no-undef": "error",
40
-
41
- // disallow use of undefined when initializing variables
42
- "no-undef-init": "error",
43
-
44
- // allow use of undefined variable
45
- // https://eslint.org/docs/rules/no-undefined
46
- "no-undefined": "off",
47
-
48
- // disallow declaration of variables that are not used in the code
49
- "no-unused-vars": ["error", { vars: "all", args: "after-used", ignoreRestSiblings: true }],
50
-
51
- // disallow use of variables before they are defined
52
- "no-use-before-define": ["error", { functions: true, classes: true, variables: true }],
53
- },
54
- };