index.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /**
  2. * @fileoverview Collects the built-in rules into a map structure so that they can be imported all at once and without
  3. * using the file-system directly.
  4. * @author Peter (Somogyvari) Metz
  5. */
  6. "use strict";
  7. /* eslint sort-keys: ["error", "asc"] */
  8. const { LazyLoadingRuleMap } = require("./utils/lazy-loading-rule-map");
  9. /** @type {Map<string, import("../shared/types").Rule>} */
  10. module.exports = new LazyLoadingRuleMap(Object.entries({
  11. "accessor-pairs": () => require("./accessor-pairs"),
  12. "array-bracket-newline": () => require("./array-bracket-newline"),
  13. "array-bracket-spacing": () => require("./array-bracket-spacing"),
  14. "array-callback-return": () => require("./array-callback-return"),
  15. "array-element-newline": () => require("./array-element-newline"),
  16. "arrow-body-style": () => require("./arrow-body-style"),
  17. "arrow-parens": () => require("./arrow-parens"),
  18. "arrow-spacing": () => require("./arrow-spacing"),
  19. "block-scoped-var": () => require("./block-scoped-var"),
  20. "block-spacing": () => require("./block-spacing"),
  21. "brace-style": () => require("./brace-style"),
  22. "callback-return": () => require("./callback-return"),
  23. camelcase: () => require("./camelcase"),
  24. "capitalized-comments": () => require("./capitalized-comments"),
  25. "class-methods-use-this": () => require("./class-methods-use-this"),
  26. "comma-dangle": () => require("./comma-dangle"),
  27. "comma-spacing": () => require("./comma-spacing"),
  28. "comma-style": () => require("./comma-style"),
  29. complexity: () => require("./complexity"),
  30. "computed-property-spacing": () => require("./computed-property-spacing"),
  31. "consistent-return": () => require("./consistent-return"),
  32. "consistent-this": () => require("./consistent-this"),
  33. "constructor-super": () => require("./constructor-super"),
  34. curly: () => require("./curly"),
  35. "default-case": () => require("./default-case"),
  36. "default-case-last": () => require("./default-case-last"),
  37. "default-param-last": () => require("./default-param-last"),
  38. "dot-location": () => require("./dot-location"),
  39. "dot-notation": () => require("./dot-notation"),
  40. "eol-last": () => require("./eol-last"),
  41. eqeqeq: () => require("./eqeqeq"),
  42. "for-direction": () => require("./for-direction"),
  43. "func-call-spacing": () => require("./func-call-spacing"),
  44. "func-name-matching": () => require("./func-name-matching"),
  45. "func-names": () => require("./func-names"),
  46. "func-style": () => require("./func-style"),
  47. "function-call-argument-newline": () => require("./function-call-argument-newline"),
  48. "function-paren-newline": () => require("./function-paren-newline"),
  49. "generator-star-spacing": () => require("./generator-star-spacing"),
  50. "getter-return": () => require("./getter-return"),
  51. "global-require": () => require("./global-require"),
  52. "grouped-accessor-pairs": () => require("./grouped-accessor-pairs"),
  53. "guard-for-in": () => require("./guard-for-in"),
  54. "handle-callback-err": () => require("./handle-callback-err"),
  55. "id-blacklist": () => require("./id-blacklist"),
  56. "id-denylist": () => require("./id-denylist"),
  57. "id-length": () => require("./id-length"),
  58. "id-match": () => require("./id-match"),
  59. "implicit-arrow-linebreak": () => require("./implicit-arrow-linebreak"),
  60. indent: () => require("./indent"),
  61. "indent-legacy": () => require("./indent-legacy"),
  62. "init-declarations": () => require("./init-declarations"),
  63. "jsx-quotes": () => require("./jsx-quotes"),
  64. "key-spacing": () => require("./key-spacing"),
  65. "keyword-spacing": () => require("./keyword-spacing"),
  66. "line-comment-position": () => require("./line-comment-position"),
  67. "linebreak-style": () => require("./linebreak-style"),
  68. "lines-around-comment": () => require("./lines-around-comment"),
  69. "lines-around-directive": () => require("./lines-around-directive"),
  70. "lines-between-class-members": () => require("./lines-between-class-members"),
  71. "max-classes-per-file": () => require("./max-classes-per-file"),
  72. "max-depth": () => require("./max-depth"),
  73. "max-len": () => require("./max-len"),
  74. "max-lines": () => require("./max-lines"),
  75. "max-lines-per-function": () => require("./max-lines-per-function"),
  76. "max-nested-callbacks": () => require("./max-nested-callbacks"),
  77. "max-params": () => require("./max-params"),
  78. "max-statements": () => require("./max-statements"),
  79. "max-statements-per-line": () => require("./max-statements-per-line"),
  80. "multiline-comment-style": () => require("./multiline-comment-style"),
  81. "multiline-ternary": () => require("./multiline-ternary"),
  82. "new-cap": () => require("./new-cap"),
  83. "new-parens": () => require("./new-parens"),
  84. "newline-after-var": () => require("./newline-after-var"),
  85. "newline-before-return": () => require("./newline-before-return"),
  86. "newline-per-chained-call": () => require("./newline-per-chained-call"),
  87. "no-alert": () => require("./no-alert"),
  88. "no-array-constructor": () => require("./no-array-constructor"),
  89. "no-async-promise-executor": () => require("./no-async-promise-executor"),
  90. "no-await-in-loop": () => require("./no-await-in-loop"),
  91. "no-bitwise": () => require("./no-bitwise"),
  92. "no-buffer-constructor": () => require("./no-buffer-constructor"),
  93. "no-caller": () => require("./no-caller"),
  94. "no-case-declarations": () => require("./no-case-declarations"),
  95. "no-catch-shadow": () => require("./no-catch-shadow"),
  96. "no-class-assign": () => require("./no-class-assign"),
  97. "no-compare-neg-zero": () => require("./no-compare-neg-zero"),
  98. "no-cond-assign": () => require("./no-cond-assign"),
  99. "no-confusing-arrow": () => require("./no-confusing-arrow"),
  100. "no-console": () => require("./no-console"),
  101. "no-const-assign": () => require("./no-const-assign"),
  102. "no-constant-condition": () => require("./no-constant-condition"),
  103. "no-constructor-return": () => require("./no-constructor-return"),
  104. "no-continue": () => require("./no-continue"),
  105. "no-control-regex": () => require("./no-control-regex"),
  106. "no-debugger": () => require("./no-debugger"),
  107. "no-delete-var": () => require("./no-delete-var"),
  108. "no-div-regex": () => require("./no-div-regex"),
  109. "no-dupe-args": () => require("./no-dupe-args"),
  110. "no-dupe-class-members": () => require("./no-dupe-class-members"),
  111. "no-dupe-else-if": () => require("./no-dupe-else-if"),
  112. "no-dupe-keys": () => require("./no-dupe-keys"),
  113. "no-duplicate-case": () => require("./no-duplicate-case"),
  114. "no-duplicate-imports": () => require("./no-duplicate-imports"),
  115. "no-else-return": () => require("./no-else-return"),
  116. "no-empty": () => require("./no-empty"),
  117. "no-empty-character-class": () => require("./no-empty-character-class"),
  118. "no-empty-function": () => require("./no-empty-function"),
  119. "no-empty-pattern": () => require("./no-empty-pattern"),
  120. "no-eq-null": () => require("./no-eq-null"),
  121. "no-eval": () => require("./no-eval"),
  122. "no-ex-assign": () => require("./no-ex-assign"),
  123. "no-extend-native": () => require("./no-extend-native"),
  124. "no-extra-bind": () => require("./no-extra-bind"),
  125. "no-extra-boolean-cast": () => require("./no-extra-boolean-cast"),
  126. "no-extra-label": () => require("./no-extra-label"),
  127. "no-extra-parens": () => require("./no-extra-parens"),
  128. "no-extra-semi": () => require("./no-extra-semi"),
  129. "no-fallthrough": () => require("./no-fallthrough"),
  130. "no-floating-decimal": () => require("./no-floating-decimal"),
  131. "no-func-assign": () => require("./no-func-assign"),
  132. "no-global-assign": () => require("./no-global-assign"),
  133. "no-implicit-coercion": () => require("./no-implicit-coercion"),
  134. "no-implicit-globals": () => require("./no-implicit-globals"),
  135. "no-implied-eval": () => require("./no-implied-eval"),
  136. "no-import-assign": () => require("./no-import-assign"),
  137. "no-inline-comments": () => require("./no-inline-comments"),
  138. "no-inner-declarations": () => require("./no-inner-declarations"),
  139. "no-invalid-regexp": () => require("./no-invalid-regexp"),
  140. "no-invalid-this": () => require("./no-invalid-this"),
  141. "no-irregular-whitespace": () => require("./no-irregular-whitespace"),
  142. "no-iterator": () => require("./no-iterator"),
  143. "no-label-var": () => require("./no-label-var"),
  144. "no-labels": () => require("./no-labels"),
  145. "no-lone-blocks": () => require("./no-lone-blocks"),
  146. "no-lonely-if": () => require("./no-lonely-if"),
  147. "no-loop-func": () => require("./no-loop-func"),
  148. "no-loss-of-precision": () => require("./no-loss-of-precision"),
  149. "no-magic-numbers": () => require("./no-magic-numbers"),
  150. "no-misleading-character-class": () => require("./no-misleading-character-class"),
  151. "no-mixed-operators": () => require("./no-mixed-operators"),
  152. "no-mixed-requires": () => require("./no-mixed-requires"),
  153. "no-mixed-spaces-and-tabs": () => require("./no-mixed-spaces-and-tabs"),
  154. "no-multi-assign": () => require("./no-multi-assign"),
  155. "no-multi-spaces": () => require("./no-multi-spaces"),
  156. "no-multi-str": () => require("./no-multi-str"),
  157. "no-multiple-empty-lines": () => require("./no-multiple-empty-lines"),
  158. "no-native-reassign": () => require("./no-native-reassign"),
  159. "no-negated-condition": () => require("./no-negated-condition"),
  160. "no-negated-in-lhs": () => require("./no-negated-in-lhs"),
  161. "no-nested-ternary": () => require("./no-nested-ternary"),
  162. "no-new": () => require("./no-new"),
  163. "no-new-func": () => require("./no-new-func"),
  164. "no-new-object": () => require("./no-new-object"),
  165. "no-new-require": () => require("./no-new-require"),
  166. "no-new-symbol": () => require("./no-new-symbol"),
  167. "no-new-wrappers": () => require("./no-new-wrappers"),
  168. "no-obj-calls": () => require("./no-obj-calls"),
  169. "no-octal": () => require("./no-octal"),
  170. "no-octal-escape": () => require("./no-octal-escape"),
  171. "no-param-reassign": () => require("./no-param-reassign"),
  172. "no-path-concat": () => require("./no-path-concat"),
  173. "no-plusplus": () => require("./no-plusplus"),
  174. "no-process-env": () => require("./no-process-env"),
  175. "no-process-exit": () => require("./no-process-exit"),
  176. "no-promise-executor-return": () => require("./no-promise-executor-return"),
  177. "no-proto": () => require("./no-proto"),
  178. "no-prototype-builtins": () => require("./no-prototype-builtins"),
  179. "no-redeclare": () => require("./no-redeclare"),
  180. "no-regex-spaces": () => require("./no-regex-spaces"),
  181. "no-restricted-exports": () => require("./no-restricted-exports"),
  182. "no-restricted-globals": () => require("./no-restricted-globals"),
  183. "no-restricted-imports": () => require("./no-restricted-imports"),
  184. "no-restricted-modules": () => require("./no-restricted-modules"),
  185. "no-restricted-properties": () => require("./no-restricted-properties"),
  186. "no-restricted-syntax": () => require("./no-restricted-syntax"),
  187. "no-return-assign": () => require("./no-return-assign"),
  188. "no-return-await": () => require("./no-return-await"),
  189. "no-script-url": () => require("./no-script-url"),
  190. "no-self-assign": () => require("./no-self-assign"),
  191. "no-self-compare": () => require("./no-self-compare"),
  192. "no-sequences": () => require("./no-sequences"),
  193. "no-setter-return": () => require("./no-setter-return"),
  194. "no-shadow": () => require("./no-shadow"),
  195. "no-shadow-restricted-names": () => require("./no-shadow-restricted-names"),
  196. "no-spaced-func": () => require("./no-spaced-func"),
  197. "no-sparse-arrays": () => require("./no-sparse-arrays"),
  198. "no-sync": () => require("./no-sync"),
  199. "no-tabs": () => require("./no-tabs"),
  200. "no-template-curly-in-string": () => require("./no-template-curly-in-string"),
  201. "no-ternary": () => require("./no-ternary"),
  202. "no-this-before-super": () => require("./no-this-before-super"),
  203. "no-throw-literal": () => require("./no-throw-literal"),
  204. "no-trailing-spaces": () => require("./no-trailing-spaces"),
  205. "no-undef": () => require("./no-undef"),
  206. "no-undef-init": () => require("./no-undef-init"),
  207. "no-undefined": () => require("./no-undefined"),
  208. "no-underscore-dangle": () => require("./no-underscore-dangle"),
  209. "no-unexpected-multiline": () => require("./no-unexpected-multiline"),
  210. "no-unmodified-loop-condition": () => require("./no-unmodified-loop-condition"),
  211. "no-unneeded-ternary": () => require("./no-unneeded-ternary"),
  212. "no-unreachable": () => require("./no-unreachable"),
  213. "no-unreachable-loop": () => require("./no-unreachable-loop"),
  214. "no-unsafe-finally": () => require("./no-unsafe-finally"),
  215. "no-unsafe-negation": () => require("./no-unsafe-negation"),
  216. "no-unused-expressions": () => require("./no-unused-expressions"),
  217. "no-unused-labels": () => require("./no-unused-labels"),
  218. "no-unused-vars": () => require("./no-unused-vars"),
  219. "no-use-before-define": () => require("./no-use-before-define"),
  220. "no-useless-backreference": () => require("./no-useless-backreference"),
  221. "no-useless-call": () => require("./no-useless-call"),
  222. "no-useless-catch": () => require("./no-useless-catch"),
  223. "no-useless-computed-key": () => require("./no-useless-computed-key"),
  224. "no-useless-concat": () => require("./no-useless-concat"),
  225. "no-useless-constructor": () => require("./no-useless-constructor"),
  226. "no-useless-escape": () => require("./no-useless-escape"),
  227. "no-useless-rename": () => require("./no-useless-rename"),
  228. "no-useless-return": () => require("./no-useless-return"),
  229. "no-var": () => require("./no-var"),
  230. "no-void": () => require("./no-void"),
  231. "no-warning-comments": () => require("./no-warning-comments"),
  232. "no-whitespace-before-property": () => require("./no-whitespace-before-property"),
  233. "no-with": () => require("./no-with"),
  234. "nonblock-statement-body-position": () => require("./nonblock-statement-body-position"),
  235. "object-curly-newline": () => require("./object-curly-newline"),
  236. "object-curly-spacing": () => require("./object-curly-spacing"),
  237. "object-property-newline": () => require("./object-property-newline"),
  238. "object-shorthand": () => require("./object-shorthand"),
  239. "one-var": () => require("./one-var"),
  240. "one-var-declaration-per-line": () => require("./one-var-declaration-per-line"),
  241. "operator-assignment": () => require("./operator-assignment"),
  242. "operator-linebreak": () => require("./operator-linebreak"),
  243. "padded-blocks": () => require("./padded-blocks"),
  244. "padding-line-between-statements": () => require("./padding-line-between-statements"),
  245. "prefer-arrow-callback": () => require("./prefer-arrow-callback"),
  246. "prefer-const": () => require("./prefer-const"),
  247. "prefer-destructuring": () => require("./prefer-destructuring"),
  248. "prefer-exponentiation-operator": () => require("./prefer-exponentiation-operator"),
  249. "prefer-named-capture-group": () => require("./prefer-named-capture-group"),
  250. "prefer-numeric-literals": () => require("./prefer-numeric-literals"),
  251. "prefer-object-spread": () => require("./prefer-object-spread"),
  252. "prefer-promise-reject-errors": () => require("./prefer-promise-reject-errors"),
  253. "prefer-reflect": () => require("./prefer-reflect"),
  254. "prefer-regex-literals": () => require("./prefer-regex-literals"),
  255. "prefer-rest-params": () => require("./prefer-rest-params"),
  256. "prefer-spread": () => require("./prefer-spread"),
  257. "prefer-template": () => require("./prefer-template"),
  258. "quote-props": () => require("./quote-props"),
  259. quotes: () => require("./quotes"),
  260. radix: () => require("./radix"),
  261. "require-atomic-updates": () => require("./require-atomic-updates"),
  262. "require-await": () => require("./require-await"),
  263. "require-jsdoc": () => require("./require-jsdoc"),
  264. "require-unicode-regexp": () => require("./require-unicode-regexp"),
  265. "require-yield": () => require("./require-yield"),
  266. "rest-spread-spacing": () => require("./rest-spread-spacing"),
  267. semi: () => require("./semi"),
  268. "semi-spacing": () => require("./semi-spacing"),
  269. "semi-style": () => require("./semi-style"),
  270. "sort-imports": () => require("./sort-imports"),
  271. "sort-keys": () => require("./sort-keys"),
  272. "sort-vars": () => require("./sort-vars"),
  273. "space-before-blocks": () => require("./space-before-blocks"),
  274. "space-before-function-paren": () => require("./space-before-function-paren"),
  275. "space-in-parens": () => require("./space-in-parens"),
  276. "space-infix-ops": () => require("./space-infix-ops"),
  277. "space-unary-ops": () => require("./space-unary-ops"),
  278. "spaced-comment": () => require("./spaced-comment"),
  279. strict: () => require("./strict"),
  280. "switch-colon-spacing": () => require("./switch-colon-spacing"),
  281. "symbol-description": () => require("./symbol-description"),
  282. "template-curly-spacing": () => require("./template-curly-spacing"),
  283. "template-tag-spacing": () => require("./template-tag-spacing"),
  284. "unicode-bom": () => require("./unicode-bom"),
  285. "use-isnan": () => require("./use-isnan"),
  286. "valid-jsdoc": () => require("./valid-jsdoc"),
  287. "valid-typeof": () => require("./valid-typeof"),
  288. "vars-on-top": () => require("./vars-on-top"),
  289. "wrap-iife": () => require("./wrap-iife"),
  290. "wrap-regex": () => require("./wrap-regex"),
  291. "yield-star-spacing": () => require("./yield-star-spacing"),
  292. yoda: () => require("./yoda")
  293. }));