eslint-config-airbnb-extended 2.3.2 → 3.0.0-beta-2

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 (216) hide show
  1. package/README.md +3 -3
  2. package/dist/_virtual/rolldown_runtime.cjs +1 -0
  3. package/dist/_virtual/rolldown_runtime.js +1 -0
  4. package/dist/configs/base/config.cjs +1 -0
  5. package/dist/configs/base/config.js +1 -26
  6. package/dist/configs/base/configExtended.cjs +1 -0
  7. package/dist/configs/base/configExtended.js +1 -9
  8. package/dist/configs/base/index.cjs +1 -0
  9. package/dist/configs/base/index.js +1 -18
  10. package/dist/configs/base/recommended.cjs +1 -0
  11. package/dist/configs/base/recommended.js +1 -12
  12. package/dist/configs/base/typescript.cjs +1 -0
  13. package/dist/configs/base/typescript.js +1 -12
  14. package/dist/configs/index.cjs +1 -0
  15. package/dist/configs/index.js +1 -21
  16. package/dist/configs/next/config.cjs +1 -0
  17. package/dist/configs/next/config.js +1 -12
  18. package/dist/configs/next/index.cjs +1 -0
  19. package/dist/configs/next/index.js +1 -18
  20. package/dist/configs/next/recommended.cjs +1 -0
  21. package/dist/configs/next/recommended.js +1 -14
  22. package/dist/configs/next/typescript.cjs +1 -0
  23. package/dist/configs/next/typescript.js +1 -8
  24. package/dist/configs/node/config.cjs +1 -0
  25. package/dist/configs/node/config.js +1 -16
  26. package/dist/configs/node/index.cjs +1 -0
  27. package/dist/configs/node/index.js +1 -12
  28. package/dist/configs/node/recommended.cjs +1 -0
  29. package/dist/configs/node/recommended.js +1 -12
  30. package/dist/configs/react/config.cjs +1 -0
  31. package/dist/configs/react/config.js +1 -16
  32. package/dist/configs/react/configExtended.cjs +1 -0
  33. package/dist/configs/react/configExtended.js +1 -9
  34. package/dist/configs/react/index.cjs +1 -0
  35. package/dist/configs/react/index.js +1 -18
  36. package/dist/configs/react/recommended.cjs +1 -0
  37. package/dist/configs/react/recommended.js +1 -12
  38. package/dist/configs/react/typescript.cjs +1 -0
  39. package/dist/configs/react/typescript.js +1 -8
  40. package/dist/configs/typescript/config.cjs +1 -0
  41. package/dist/configs/typescript/config.js +1 -18
  42. package/dist/configs/typescript/configExtended.cjs +1 -0
  43. package/dist/configs/typescript/configExtended.js +1 -9
  44. package/dist/extensions/base/index.cjs +1 -0
  45. package/dist/extensions/base/index.js +1 -15
  46. package/dist/extensions/base/recommended.cjs +1 -0
  47. package/dist/extensions/base/recommended.js +1 -31
  48. package/dist/extensions/base/typescript.cjs +1 -0
  49. package/dist/extensions/base/typescript.js +1 -19
  50. package/dist/extensions/index.cjs +1 -0
  51. package/dist/extensions/index.js +1 -21
  52. package/dist/extensions/next/index.cjs +1 -0
  53. package/dist/extensions/next/index.js +1 -12
  54. package/dist/extensions/next/recommended.cjs +1 -0
  55. package/dist/extensions/next/recommended.js +1 -21
  56. package/dist/extensions/node/index.cjs +1 -0
  57. package/dist/extensions/node/index.js +1 -12
  58. package/dist/extensions/node/recommended.cjs +1 -0
  59. package/dist/extensions/node/recommended.js +1 -39
  60. package/dist/extensions/react/index.cjs +1 -0
  61. package/dist/extensions/react/index.js +1 -15
  62. package/dist/extensions/react/recommended.cjs +1 -0
  63. package/dist/extensions/react/recommended.js +1 -72
  64. package/dist/extensions/react/typescript.cjs +1 -0
  65. package/dist/extensions/react/typescript.js +1 -29
  66. package/dist/helpers/getDevDepsList.cjs +1 -0
  67. package/dist/helpers/getDevDepsList.js +1 -32
  68. package/dist/helpers/getImportSettings.cjs +1 -0
  69. package/dist/helpers/getImportSettings.js +1 -42
  70. package/dist/helpers/getStylisticLegacyConfig.cjs +1 -0
  71. package/dist/helpers/getStylisticLegacyConfig.js +1 -29
  72. package/dist/index.cjs +1 -0
  73. package/dist/index.d.cts +37 -0
  74. package/dist/index.d.ts +37 -0
  75. package/dist/index.js +1 -18
  76. package/dist/legacy/configs/base/config.cjs +1 -0
  77. package/dist/legacy/configs/base/config.js +1 -24
  78. package/dist/legacy/configs/base/index.cjs +1 -0
  79. package/dist/legacy/configs/base/index.js +1 -18
  80. package/dist/legacy/configs/base/legacy.cjs +1 -0
  81. package/dist/legacy/configs/base/legacy.js +1 -46
  82. package/dist/legacy/configs/base/recommended.cjs +1 -0
  83. package/dist/legacy/configs/base/recommended.js +1 -21
  84. package/dist/legacy/configs/base/typescript.cjs +1 -0
  85. package/dist/legacy/configs/base/typescript.js +1 -8
  86. package/dist/legacy/configs/index.cjs +1 -0
  87. package/dist/legacy/configs/index.js +1 -15
  88. package/dist/legacy/configs/react/base.cjs +1 -0
  89. package/dist/legacy/configs/react/base.js +1 -8
  90. package/dist/legacy/configs/react/config.cjs +1 -0
  91. package/dist/legacy/configs/react/config.js +1 -14
  92. package/dist/legacy/configs/react/hooks.cjs +1 -0
  93. package/dist/legacy/configs/react/hooks.js +1 -8
  94. package/dist/legacy/configs/react/index.cjs +1 -0
  95. package/dist/legacy/configs/react/index.js +1 -24
  96. package/dist/legacy/configs/react/legacy.cjs +1 -0
  97. package/dist/legacy/configs/react/legacy.js +1 -8
  98. package/dist/legacy/configs/react/recommended.cjs +1 -0
  99. package/dist/legacy/configs/react/recommended.js +1 -13
  100. package/dist/legacy/configs/react/typescript.cjs +1 -0
  101. package/dist/legacy/configs/react/typescript.js +1 -47
  102. package/dist/legacy/configs/typescript/config.cjs +1 -0
  103. package/dist/legacy/configs/typescript/config.js +1 -14
  104. package/dist/legacy/rules/best-practices.cjs +1 -0
  105. package/dist/legacy/rules/best-practices.js +1 -433
  106. package/dist/legacy/rules/errors.cjs +1 -0
  107. package/dist/legacy/rules/errors.js +1 -167
  108. package/dist/legacy/rules/es6.cjs +1 -0
  109. package/dist/legacy/rules/es6.js +1 -206
  110. package/dist/legacy/rules/imports.cjs +1 -0
  111. package/dist/legacy/rules/imports.js +1 -258
  112. package/dist/legacy/rules/index.cjs +1 -0
  113. package/dist/legacy/rules/index.js +1 -18
  114. package/dist/legacy/rules/node.cjs +1 -0
  115. package/dist/legacy/rules/node.js +1 -35
  116. package/dist/legacy/rules/react/react.cjs +1 -0
  117. package/dist/legacy/rules/react/react.js +1 -663
  118. package/dist/legacy/rules/react/reactHooks.cjs +1 -0
  119. package/dist/legacy/rules/react/reactHooks.js +1 -30
  120. package/dist/legacy/rules/react/reactJsxA11y.cjs +1 -0
  121. package/dist/legacy/rules/react/reactJsxA11y.js +1 -276
  122. package/dist/legacy/rules/strict.cjs +1 -0
  123. package/dist/legacy/rules/strict.js +1 -12
  124. package/dist/legacy/rules/style.cjs +1 -0
  125. package/dist/legacy/rules/style.js +1 -655
  126. package/dist/legacy/rules/typescript/typescript.cjs +1 -0
  127. package/dist/legacy/rules/typescript/typescript.js +1 -231
  128. package/dist/legacy/rules/typescript/typescriptOverrides.cjs +1 -0
  129. package/dist/legacy/rules/typescript/typescriptOverrides.js +1 -36
  130. package/dist/legacy/rules/typescript/typescriptSettings.cjs +1 -0
  131. package/dist/legacy/rules/typescript/typescriptSettings.js +1 -27
  132. package/dist/legacy/rules/variables.cjs +1 -0
  133. package/dist/legacy/rules/variables.js +1 -68
  134. package/dist/legacy.cjs +1 -0
  135. package/dist/legacy.d.cts +17 -0
  136. package/dist/legacy.d.ts +17 -0
  137. package/dist/legacy.js +1 -14
  138. package/dist/plugins/importXPlugin.cjs +1 -0
  139. package/dist/plugins/importXPlugin.js +1 -15
  140. package/dist/plugins/index.cjs +1 -0
  141. package/dist/plugins/index.js +1 -33
  142. package/dist/plugins/nextPlugin.cjs +1 -0
  143. package/dist/plugins/nextPlugin.js +1 -13
  144. package/dist/plugins/nodePlugin.cjs +1 -0
  145. package/dist/plugins/nodePlugin.js +1 -15
  146. package/dist/plugins/reactA11yPlugin.cjs +1 -0
  147. package/dist/plugins/reactA11yPlugin.js +1 -15
  148. package/dist/plugins/reactHooksPlugin.cjs +1 -0
  149. package/dist/plugins/reactHooksPlugin.js +1 -15
  150. package/dist/plugins/reactPlugin.cjs +1 -0
  151. package/dist/plugins/reactPlugin.js +1 -15
  152. package/dist/plugins/stylisticPlugin.cjs +1 -0
  153. package/dist/plugins/stylisticPlugin.js +1 -15
  154. package/dist/plugins/typescriptEslintPlugin.cjs +1 -0
  155. package/dist/plugins/typescriptEslintPlugin.js +1 -15
  156. package/dist/rules/best-practices.cjs +1 -0
  157. package/dist/rules/best-practices.js +1 -396
  158. package/dist/rules/errors.cjs +1 -0
  159. package/dist/rules/errors.js +1 -145
  160. package/dist/rules/es6.cjs +1 -0
  161. package/dist/rules/es6.js +1 -157
  162. package/dist/rules/imports.cjs +1 -0
  163. package/dist/rules/imports.js +1 -202
  164. package/dist/rules/importsStrict.cjs +1 -0
  165. package/dist/rules/importsStrict.js +1 -66
  166. package/dist/rules/index.cjs +1 -0
  167. package/dist/rules/index.js +1 -24
  168. package/dist/rules/next/nextBase.cjs +1 -0
  169. package/dist/rules/next/nextBase.js +1 -73
  170. package/dist/rules/next/nextCoreWebVitals.cjs +1 -0
  171. package/dist/rules/next/nextCoreWebVitals.js +1 -16
  172. package/dist/rules/node/nodeBase.cjs +1 -0
  173. package/dist/rules/node/nodeBase.js +1 -127
  174. package/dist/rules/node/nodeGlobals.cjs +1 -0
  175. package/dist/rules/node/nodeGlobals.js +1 -31
  176. package/dist/rules/node/nodeNoUnsupportedFeatures.cjs +1 -0
  177. package/dist/rules/node/nodeNoUnsupportedFeatures.js +1 -19
  178. package/dist/rules/node/nodePromises.cjs +1 -0
  179. package/dist/rules/node/nodePromises.js +1 -16
  180. package/dist/rules/react/react.cjs +1 -0
  181. package/dist/rules/react/react.js +1 -590
  182. package/dist/rules/react/reactHooks.cjs +1 -0
  183. package/dist/rules/react/reactHooks.js +1 -23
  184. package/dist/rules/react/reactJsxA11y.cjs +1 -0
  185. package/dist/rules/react/reactJsxA11y.js +1 -262
  186. package/dist/rules/react/reactStrict.cjs +1 -0
  187. package/dist/rules/react/reactStrict.js +1 -80
  188. package/dist/rules/react/reactStylistic.cjs +1 -0
  189. package/dist/rules/react/reactStylistic.js +1 -96
  190. package/dist/rules/strict.cjs +1 -0
  191. package/dist/rules/strict.js +1 -12
  192. package/dist/rules/style.cjs +1 -0
  193. package/dist/rules/style.js +1 -205
  194. package/dist/rules/stylistic.cjs +1 -0
  195. package/dist/rules/stylistic.js +1 -524
  196. package/dist/rules/stylisticPlus.cjs +1 -0
  197. package/dist/rules/stylisticPlus.js +1 -16
  198. package/dist/rules/typescript/typescriptBase.cjs +1 -0
  199. package/dist/rules/typescript/typescriptBase.js +1 -32
  200. package/dist/rules/typescript/typescriptEslint.cjs +1 -0
  201. package/dist/rules/typescript/typescriptEslint.js +1 -507
  202. package/dist/rules/typescript/typescriptEslintStrict.cjs +1 -0
  203. package/dist/rules/typescript/typescriptEslintStrict.js +1 -193
  204. package/dist/rules/typescript/typescriptImports.cjs +1 -0
  205. package/dist/rules/typescript/typescriptImports.js +1 -36
  206. package/dist/rules/typescript/typescriptStylistic.cjs +1 -0
  207. package/dist/rules/typescript/typescriptStylistic.js +1 -150
  208. package/dist/rules/typescript/typescriptStylisticPlus.cjs +1 -0
  209. package/dist/rules/typescript/typescriptStylisticPlus.js +1 -16
  210. package/dist/rules/variables.cjs +1 -0
  211. package/dist/rules/variables.js +1 -67
  212. package/dist/utils/index.cjs +1 -0
  213. package/dist/utils/index.js +1 -18
  214. package/package.json +18 -18
  215. package/dist/@types/index.d.ts +0 -32
  216. package/dist/@types/legacy.d.ts +0 -12
@@ -1,15 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
7
- const utils_1 = require("../utils");
8
- const reactPlugin = {
9
- name: 'airbnb/config/plugin/react',
10
- files: utils_1.allFiles,
11
- plugins: {
12
- react: eslint_plugin_react_1.default,
13
- },
14
- };
15
- exports.default = reactPlugin;
1
+ import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"eslint-plugin-react";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/react`,files:n,plugins:{react:i}},s=o}));c();export{c as init_reactPlugin,a as reactPlugin_exports};
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`@stylistic/eslint-plugin`);n=e.__toESM(n);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/stylistic`,files:t.allFiles,plugins:{"@stylistic":n.default}},a=i}));o(),Object.defineProperty(exports,`init_stylisticPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`stylisticPlugin_exports`,{enumerable:!0,get:function(){return r}});
@@ -1,15 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const eslint_plugin_1 = __importDefault(require("@stylistic/eslint-plugin"));
7
- const utils_1 = require("../utils");
8
- const stylisticPlugin = {
9
- name: 'airbnb/config/plugin/stylistic',
10
- files: utils_1.allFiles,
11
- plugins: {
12
- '@stylistic': eslint_plugin_1.default,
13
- },
14
- };
15
- exports.default = stylisticPlugin;
1
+ import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import i from"@stylistic/eslint-plugin";var a=t({default:()=>s}),o,s,c=e((()=>{r(),o={name:`airbnb/config/plugin/stylistic`,files:n,plugins:{"@stylistic":i}},s=o}));c();export{c as init_stylisticPlugin,a as stylisticPlugin_exports};
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`typescript-eslint`);var r=e.__export({default:()=>a}),i,a,o=e.__esmMin((()=>{t.init_utils(),i={name:`airbnb/config/plugin/typescript-eslint`,files:t.allFiles,plugins:{"@typescript-eslint":n.plugin},languageOptions:{parser:n.parser}},a=i}));o(),Object.defineProperty(exports,`init_typescriptEslintPlugin`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`typescriptEslintPlugin_exports`,{enumerable:!0,get:function(){return r}});
@@ -1,15 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const typescript_eslint_1 = require("typescript-eslint");
4
- const utils_1 = require("../utils");
5
- const typescriptEslintPlugin = {
6
- name: 'airbnb/config/plugin/typescript-eslint',
7
- files: utils_1.allFiles,
8
- plugins: {
9
- '@typescript-eslint': typescript_eslint_1.plugin,
10
- },
11
- languageOptions: {
12
- parser: typescript_eslint_1.parser,
13
- },
14
- };
15
- exports.default = typescriptEslintPlugin;
1
+ import{__esmMin as e,__export as t}from"../_virtual/rolldown_runtime.js";import{allFiles as n,init_utils as r}from"../utils/index.js";import{parser as i,plugin as a}from"typescript-eslint";var o=t({default:()=>c}),s,c,l=e((()=>{r(),s={name:`airbnb/config/plugin/typescript-eslint`,files:n,plugins:{"@typescript-eslint":a},languageOptions:{parser:i}},c=s}));l();export{l as init_typescriptEslintPlugin,o as typescriptEslintPlugin_exports};
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);var n,r,i=e.__esmMin((()=>{t.init_utils(),n={name:`airbnb/config/best-practices`,files:t.allFiles,rules:{"accessor-pairs":`off`,"array-callback-return":[`error`,{allowImplicit:!0}],"block-scoped-var":`error`,"class-methods-use-this":[`error`,{exceptMethods:[]}],complexity:`off`,"consistent-return":`error`,curly:[`error`,`multi-line`],"default-case":[`error`,{commentPattern:`^no default$`}],"default-case-last":`error`,"default-param-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`always`,{null:`ignore`}],"grouped-accessor-pairs":`error`,"guard-for-in":`error`,"max-classes-per-file":[`error`,1],"no-alert":`warn`,"no-caller":`error`,"no-case-declarations":`error`,"no-constructor-return":`error`,"no-div-regex":`off`,"no-else-return":[`error`,{allowElseIf:!1}],"no-empty-function":[`error`,{allow:[`arrowFunctions`,`functions`,`methods`]}],"no-empty-pattern":`error`,"no-empty-static-block":`off`,"no-eq-null":`off`,"no-eval":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-label":`error`,"no-fallthrough":`error`,"no-global-assign":[`error`,{exceptions:[]}],"no-implicit-coercion":[`off`,{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":`off`,"no-implied-eval":`error`,"no-invalid-this":`off`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loop-func":`error`,"no-magic-numbers":`off`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-wrappers":`error`,"no-nonoctal-decimal-escape":`error`,"no-object-constructor":`off`,"no-octal":`error`,"no-octal-escape":`error`,"no-param-reassign":[`error`,{props:!0,ignorePropertyModificationsFor:[`acc`,`accumulator`,`e`,`ctx`,`context`,`req`,`request`,`res`,`response`,`$scope`,`staticContext`]}],"no-proto":`error`,"no-redeclare":`error`,"no-restricted-properties":[`error`,{object:`arguments`,property:`callee`,message:`arguments.callee is deprecated`},{object:`global`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`self`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`window`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`global`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`self`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`window`,property:`isNaN`,message:`Please use Number.isNaN instead`},{property:`__defineGetter__`,message:`Please use Object.defineProperty instead.`},{property:`__defineSetter__`,message:`Please use Object.defineProperty instead.`},{object:`Math`,property:`pow`,message:`Use the exponentiation operator (**) instead.`}],"no-return-assign":[`error`,`always`],"no-script-url":`error`,"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-throw-literal":`error`,"no-unmodified-loop-condition":`off`,"no-unused-expressions":[`error`,{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-unused-labels":`error`,"no-useless-call":`off`,"no-useless-catch":`error`,"no-useless-concat":`error`,"no-useless-escape":`error`,"no-useless-return":`error`,"no-void":`error`,"no-warning-comments":[`off`,{terms:[`todo`,`fixme`,`remember`],location:`start`}],"no-with":`error`,"prefer-promise-reject-errors":[`error`,{allowEmptyReject:!0}],"prefer-named-capture-group":`off`,"prefer-object-has-own":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],radix:`error`,"require-await":`off`,"require-unicode-regexp":`off`,"vars-on-top":`error`,yoda:`error`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_best_practices`,{enumerable:!0,get:function(){return i}});
@@ -1,396 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- const bestPracticesRules = {
5
- name: 'airbnb/config/best-practices',
6
- files: utils_1.allFiles,
7
- rules: {
8
- // enforces getter/setter pairs in objects
9
- // https://eslint.org/docs/rules/accessor-pairs
10
- 'accessor-pairs': 'off',
11
- // enforces return statements in callbacks of array's methods
12
- // https://eslint.org/docs/rules/array-callback-return
13
- 'array-callback-return': [
14
- 'error',
15
- {
16
- allowImplicit: true,
17
- },
18
- ],
19
- // treat var statements as if they were block scoped
20
- // https://eslint.org/docs/rules/block-scoped-var
21
- 'block-scoped-var': 'error',
22
- // enforce that class methods use "this"
23
- // https://eslint.org/docs/rules/class-methods-use-this
24
- 'class-methods-use-this': [
25
- 'error',
26
- {
27
- exceptMethods: [],
28
- },
29
- ],
30
- // specify the maximum cyclomatic complexity allowed in a program
31
- // https://eslint.org/docs/rules/complexity
32
- complexity: 'off',
33
- // require return statements to either always or never specify values
34
- // https://eslint.org/docs/rules/consistent-return
35
- 'consistent-return': 'error',
36
- // specify curly brace conventions for all control statements
37
- // https://eslint.org/docs/rules/curly
38
- curly: ['error', 'multi-line'],
39
- // require default case in switch statements
40
- // https://eslint.org/docs/rules/default-case
41
- 'default-case': [
42
- 'error',
43
- {
44
- commentPattern: '^no default$',
45
- },
46
- ],
47
- // Enforce default clauses in switch statements to be last
48
- // https://eslint.org/docs/rules/default-case-last
49
- 'default-case-last': 'error',
50
- // https://eslint.org/docs/rules/default-param-last
51
- 'default-param-last': 'error',
52
- // encourages use of dot notation whenever possible
53
- // https://eslint.org/docs/rules/dot-notation
54
- 'dot-notation': [
55
- 'error',
56
- {
57
- allowKeywords: true,
58
- },
59
- ],
60
- // require the use of === and !==
61
- // https://eslint.org/docs/rules/eqeqeq
62
- eqeqeq: [
63
- 'error',
64
- 'always',
65
- {
66
- null: 'ignore',
67
- },
68
- ],
69
- // Require grouped accessor pairs in object literals and classes
70
- // https://eslint.org/docs/rules/grouped-accessor-pairs
71
- 'grouped-accessor-pairs': 'error',
72
- // make sure for-in loops have an if statement
73
- // https://eslint.org/docs/rules/guard-for-in
74
- 'guard-for-in': 'error',
75
- // enforce a maximum number of classes per file
76
- // https://eslint.org/docs/rules/max-classes-per-file
77
- 'max-classes-per-file': ['error', 1],
78
- // disallow the use of alert, confirm, and prompt
79
- // https://eslint.org/docs/rules/no-alert
80
- 'no-alert': 'warn',
81
- // disallow use of arguments.caller or arguments.callee
82
- // https://eslint.org/docs/rules/no-caller
83
- 'no-caller': 'error',
84
- // disallow lexical declarations in case/default clauses
85
- // https://eslint.org/docs/rules/no-case-declarations
86
- 'no-case-declarations': 'error',
87
- // Disallow returning value in constructor
88
- // https://eslint.org/docs/rules/no-constructor-return
89
- 'no-constructor-return': 'error',
90
- // disallow division operators explicitly at beginning of regular expression
91
- // https://eslint.org/docs/rules/no-div-regex
92
- 'no-div-regex': 'off',
93
- // disallow else after a return in an if
94
- // https://eslint.org/docs/rules/no-else-return
95
- 'no-else-return': [
96
- 'error',
97
- {
98
- allowElseIf: false,
99
- },
100
- ],
101
- // disallow empty functions, except for standalone funcs/arrows
102
- // https://eslint.org/docs/rules/no-empty-function
103
- 'no-empty-function': [
104
- 'error',
105
- {
106
- allow: ['arrowFunctions', 'functions', 'methods'],
107
- },
108
- ],
109
- // disallow empty destructuring patterns
110
- // https://eslint.org/docs/rules/no-empty-pattern
111
- 'no-empty-pattern': 'error',
112
- // Disallow empty static blocks
113
- // https://eslint.org/docs/latest/rules/no-empty-static-block
114
- 'no-empty-static-block': 'off',
115
- // disallow comparisons to null without a type-checking operator
116
- // https://eslint.org/docs/rules/no-eq-null
117
- 'no-eq-null': 'off',
118
- // disallow use of eval()
119
- // https://eslint.org/docs/rules/no-eval
120
- 'no-eval': 'error',
121
- // disallow adding to native types
122
- // https://eslint.org/docs/rules/no-extend-native
123
- 'no-extend-native': 'error',
124
- // disallow unnecessary function binding
125
- // https://eslint.org/docs/rules/no-extra-bind
126
- 'no-extra-bind': 'error',
127
- // disallow Unnecessary Labels
128
- // https://eslint.org/docs/rules/no-extra-label
129
- 'no-extra-label': 'error',
130
- // disallow fallthrough of case statements
131
- // https://eslint.org/docs/rules/no-fallthrough
132
- 'no-fallthrough': 'error',
133
- // disallow reassignments of native objects or read-only globals
134
- // https://eslint.org/docs/rules/no-global-assign
135
- 'no-global-assign': [
136
- 'error',
137
- {
138
- exceptions: [],
139
- },
140
- ],
141
- // disallow implicit type conversions
142
- // https://eslint.org/docs/rules/no-implicit-coercion
143
- 'no-implicit-coercion': [
144
- 'off',
145
- {
146
- boolean: false,
147
- number: true,
148
- string: true,
149
- allow: [],
150
- },
151
- ],
152
- // disallow var and named functions in global scope
153
- // https://eslint.org/docs/rules/no-implicit-globals
154
- 'no-implicit-globals': 'off',
155
- // disallow use of eval()-like methods
156
- // https://eslint.org/docs/rules/no-implied-eval
157
- 'no-implied-eval': 'error',
158
- // disallow this keywords outside of classes or class-like objects
159
- // https://eslint.org/docs/rules/no-invalid-this
160
- 'no-invalid-this': 'off',
161
- // disallow usage of __iterator__ property
162
- // https://eslint.org/docs/rules/no-iterator
163
- 'no-iterator': 'error',
164
- // disallow use of labels for anything other than loops and switches
165
- // https://eslint.org/docs/rules/no-labels
166
- 'no-labels': [
167
- 'error',
168
- {
169
- allowLoop: false,
170
- allowSwitch: false,
171
- },
172
- ],
173
- // disallow unnecessary nested blocks
174
- // https://eslint.org/docs/rules/no-lone-blocks
175
- 'no-lone-blocks': 'error',
176
- // disallow creation of functions within loops
177
- // https://eslint.org/docs/rules/no-loop-func
178
- 'no-loop-func': 'error',
179
- // disallow magic numbers
180
- // https://eslint.org/docs/rules/no-magic-numbers
181
- 'no-magic-numbers': 'off',
182
- // disallow use of multiline strings
183
- // https://eslint.org/docs/rules/no-multi-str
184
- 'no-multi-str': 'error',
185
- // disallow use of new operator when not part of the assignment or comparison
186
- // https://eslint.org/docs/rules/no-new
187
- 'no-new': 'error',
188
- // disallow use of new operator for Function object
189
- // https://eslint.org/docs/rules/no-new-func
190
- 'no-new-func': 'error',
191
- // disallows creating new instances of String, Number, and Boolean
192
- // https://eslint.org/docs/rules/no-new-wrappers
193
- 'no-new-wrappers': 'error',
194
- // Disallow \8 and \9 escape sequences in string literals
195
- // https://eslint.org/docs/rules/no-nonoctal-decimal-escape
196
- 'no-nonoctal-decimal-escape': 'error',
197
- // Disallow calls to the Object constructor without an argument
198
- // https://eslint.org/docs/latest/rules/no-object-constructor
199
- // TODO: enable, semver-major
200
- 'no-object-constructor': 'off',
201
- // disallow use of (old style) octal literals
202
- // https://eslint.org/docs/rules/no-octal
203
- 'no-octal': 'error',
204
- // disallow use of octal escape sequences in string literals, such as
205
- // var foo = 'Copyright \251';
206
- // https://eslint.org/docs/rules/no-octal-escape
207
- 'no-octal-escape': 'error',
208
- // disallow reassignment of function parameters
209
- // disallow parameter object manipulation except for specific exclusions
210
- // rule: https://eslint.org/docs/rules/no-param-reassign.html
211
- 'no-param-reassign': [
212
- 'error',
213
- {
214
- props: true,
215
- ignorePropertyModificationsFor: [
216
- 'acc', // for reduce accumulators
217
- 'accumulator', // for reduce accumulators
218
- 'e', // for e.returnvalue
219
- 'ctx', // for Koa routing
220
- 'context', // for Koa routing
221
- 'req', // for Express requests
222
- 'request', // for Express requests
223
- 'res', // for Express responses
224
- 'response', // for Express responses
225
- '$scope', // for Angular 1 scopes
226
- 'staticContext', // for ReactRouter context
227
- ],
228
- },
229
- ],
230
- // disallow usage of __proto__ property
231
- // https://eslint.org/docs/rules/no-proto
232
- 'no-proto': 'error',
233
- // disallow declaring the same variable more than once
234
- // https://eslint.org/docs/rules/no-redeclare
235
- 'no-redeclare': 'error',
236
- // disallow certain object properties
237
- // https://eslint.org/docs/rules/no-restricted-properties
238
- 'no-restricted-properties': [
239
- 'error',
240
- {
241
- object: 'arguments',
242
- property: 'callee',
243
- message: 'arguments.callee is deprecated',
244
- },
245
- {
246
- object: 'global',
247
- property: 'isFinite',
248
- message: 'Please use Number.isFinite instead',
249
- },
250
- {
251
- object: 'self',
252
- property: 'isFinite',
253
- message: 'Please use Number.isFinite instead',
254
- },
255
- {
256
- object: 'window',
257
- property: 'isFinite',
258
- message: 'Please use Number.isFinite instead',
259
- },
260
- {
261
- object: 'global',
262
- property: 'isNaN',
263
- message: 'Please use Number.isNaN instead',
264
- },
265
- {
266
- object: 'self',
267
- property: 'isNaN',
268
- message: 'Please use Number.isNaN instead',
269
- },
270
- {
271
- object: 'window',
272
- property: 'isNaN',
273
- message: 'Please use Number.isNaN instead',
274
- },
275
- {
276
- property: '__defineGetter__',
277
- message: 'Please use Object.defineProperty instead.',
278
- },
279
- {
280
- property: '__defineSetter__',
281
- message: 'Please use Object.defineProperty instead.',
282
- },
283
- {
284
- object: 'Math',
285
- property: 'pow',
286
- message: 'Use the exponentiation operator (**) instead.',
287
- },
288
- ],
289
- // disallow use of assignment in return statement
290
- // https://eslint.org/docs/rules/no-return-assign
291
- 'no-return-assign': ['error', 'always'],
292
- // disallow use of `javascript:` urls.
293
- // https://eslint.org/docs/rules/no-script-url
294
- 'no-script-url': 'error',
295
- // disallow self assignment
296
- // https://eslint.org/docs/rules/no-self-assign
297
- 'no-self-assign': [
298
- 'error',
299
- {
300
- props: true,
301
- },
302
- ],
303
- // disallow comparisons where both sides are exactly the same
304
- // https://eslint.org/docs/rules/no-self-compare
305
- 'no-self-compare': 'error',
306
- // disallow use of comma operator
307
- // https://eslint.org/docs/rules/no-sequences
308
- 'no-sequences': 'error',
309
- // restrict what can be thrown as an exception
310
- // https://eslint.org/docs/rules/no-throw-literal
311
- 'no-throw-literal': 'error',
312
- // disallow unmodified conditions of loops
313
- // https://eslint.org/docs/rules/no-unmodified-loop-condition
314
- 'no-unmodified-loop-condition': 'off',
315
- // disallow usage of expressions in statement position
316
- // https://eslint.org/docs/rules/no-unused-expressions
317
- 'no-unused-expressions': [
318
- 'error',
319
- {
320
- allowShortCircuit: false,
321
- allowTernary: false,
322
- allowTaggedTemplates: false,
323
- },
324
- ],
325
- // disallow unused labels
326
- // https://eslint.org/docs/rules/no-unused-labels
327
- 'no-unused-labels': 'error',
328
- // disallow unnecessary .call() and .apply()
329
- // https://eslint.org/docs/rules/no-useless-call
330
- 'no-useless-call': 'off',
331
- // Disallow unnecessary catch clauses
332
- // https://eslint.org/docs/rules/no-useless-catch
333
- 'no-useless-catch': 'error',
334
- // disallow useless string concatenation
335
- // https://eslint.org/docs/rules/no-useless-concat
336
- 'no-useless-concat': 'error',
337
- // disallow unnecessary string escaping
338
- // https://eslint.org/docs/rules/no-useless-escape
339
- 'no-useless-escape': 'error',
340
- // disallow redundant return; keywords
341
- // https://eslint.org/docs/rules/no-useless-return
342
- 'no-useless-return': 'error',
343
- // disallow use of void operator
344
- // https://eslint.org/docs/rules/no-void
345
- 'no-void': 'error',
346
- // disallow usage of configurable warning terms in comments
347
- // https://eslint.org/docs/rules/no-warning-comments
348
- 'no-warning-comments': [
349
- 'off',
350
- {
351
- terms: ['todo', 'fixme', 'remember'],
352
- location: 'start',
353
- },
354
- ],
355
- // disallow use of the with statement
356
- // https://eslint.org/docs/rules/no-with
357
- 'no-with': 'error',
358
- // require using Error objects as Promise rejection reasons
359
- // https://eslint.org/docs/rules/prefer-promise-reject-errors
360
- 'prefer-promise-reject-errors': [
361
- 'error',
362
- {
363
- allowEmptyReject: true,
364
- },
365
- ],
366
- // Suggest using named capture group in regular expression
367
- // https://eslint.org/docs/rules/prefer-named-capture-group
368
- 'prefer-named-capture-group': 'off',
369
- // Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call()
370
- // https://eslint.org/docs/rules/prefer-object-has-own
371
- 'prefer-object-has-own': 'error',
372
- // https://eslint.org/docs/rules/prefer-regex-literals
373
- 'prefer-regex-literals': [
374
- 'error',
375
- {
376
- disallowRedundantWrapping: true,
377
- },
378
- ],
379
- // require use of the second argument for parseInt()
380
- // https://eslint.org/docs/rules/radix
381
- radix: 'error',
382
- // require `await` in `async function` (note: this is a horrible rule that should never be used)
383
- // https://eslint.org/docs/rules/require-await
384
- 'require-await': 'off',
385
- // Enforce the use of u flag on RegExp
386
- // https://eslint.org/docs/rules/require-unicode-regexp
387
- 'require-unicode-regexp': 'off',
388
- // requires to declare all vars on top of their containing scope
389
- // https://eslint.org/docs/rules/vars-on-top
390
- 'vars-on-top': 'error',
391
- // require or disallow Yoda conditions
392
- // https://eslint.org/docs/rules/yoda
393
- yoda: 'error',
394
- },
395
- };
396
- exports.default = bestPracticesRules;
1
+ import{__esmMin as e}from"../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n}from"../utils/index.js";var r,i,a=e((()=>{n(),r={name:`airbnb/config/best-practices`,files:t,rules:{"accessor-pairs":`off`,"array-callback-return":[`error`,{allowImplicit:!0}],"block-scoped-var":`error`,"class-methods-use-this":[`error`,{exceptMethods:[]}],complexity:`off`,"consistent-return":`error`,curly:[`error`,`multi-line`],"default-case":[`error`,{commentPattern:`^no default$`}],"default-case-last":`error`,"default-param-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`always`,{null:`ignore`}],"grouped-accessor-pairs":`error`,"guard-for-in":`error`,"max-classes-per-file":[`error`,1],"no-alert":`warn`,"no-caller":`error`,"no-case-declarations":`error`,"no-constructor-return":`error`,"no-div-regex":`off`,"no-else-return":[`error`,{allowElseIf:!1}],"no-empty-function":[`error`,{allow:[`arrowFunctions`,`functions`,`methods`]}],"no-empty-pattern":`error`,"no-empty-static-block":`off`,"no-eq-null":`off`,"no-eval":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-label":`error`,"no-fallthrough":`error`,"no-global-assign":[`error`,{exceptions:[]}],"no-implicit-coercion":[`off`,{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":`off`,"no-implied-eval":`error`,"no-invalid-this":`off`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loop-func":`error`,"no-magic-numbers":`off`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-wrappers":`error`,"no-nonoctal-decimal-escape":`error`,"no-object-constructor":`off`,"no-octal":`error`,"no-octal-escape":`error`,"no-param-reassign":[`error`,{props:!0,ignorePropertyModificationsFor:[`acc`,`accumulator`,`e`,`ctx`,`context`,`req`,`request`,`res`,`response`,`$scope`,`staticContext`]}],"no-proto":`error`,"no-redeclare":`error`,"no-restricted-properties":[`error`,{object:`arguments`,property:`callee`,message:`arguments.callee is deprecated`},{object:`global`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`self`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`window`,property:`isFinite`,message:`Please use Number.isFinite instead`},{object:`global`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`self`,property:`isNaN`,message:`Please use Number.isNaN instead`},{object:`window`,property:`isNaN`,message:`Please use Number.isNaN instead`},{property:`__defineGetter__`,message:`Please use Object.defineProperty instead.`},{property:`__defineSetter__`,message:`Please use Object.defineProperty instead.`},{object:`Math`,property:`pow`,message:`Use the exponentiation operator (**) instead.`}],"no-return-assign":[`error`,`always`],"no-script-url":`error`,"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-throw-literal":`error`,"no-unmodified-loop-condition":`off`,"no-unused-expressions":[`error`,{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-unused-labels":`error`,"no-useless-call":`off`,"no-useless-catch":`error`,"no-useless-concat":`error`,"no-useless-escape":`error`,"no-useless-return":`error`,"no-void":`error`,"no-warning-comments":[`off`,{terms:[`todo`,`fixme`,`remember`],location:`start`}],"no-with":`error`,"prefer-promise-reject-errors":[`error`,{allowEmptyReject:!0}],"prefer-named-capture-group":`off`,"prefer-object-has-own":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],radix:`error`,"require-await":`off`,"require-unicode-regexp":`off`,"vars-on-top":`error`,yoda:`error`}},i=r}));a();export{i as default,a as init_best_practices};
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);var n,r,i=e.__esmMin((()=>{t.init_utils(),n={name:`airbnb/config/errors`,files:t.allFiles,rules:{"for-direction":`error`,"getter-return":[`error`,{allowImplicit:!0}],"no-async-promise-executor":`error`,"no-await-in-loop":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-console":`warn`,"no-constant-binary-expression":`off`,"no-constant-condition":`warn`,"no-control-regex":`error`,"no-debugger":`error`,"no-dupe-args":`error`,"no-dupe-else-if":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":`error`,"no-empty-character-class":`error`,"no-ex-assign":`error`,"no-extra-boolean-cast":`error`,"no-func-assign":`error`,"no-import-assign":`error`,"no-inner-declarations":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-obj-calls":`error`,"no-new-native-nonconstructor":`error`,"no-prototype-builtins":`error`,"no-promise-executor-return":`error`,"no-regex-spaces":`error`,"no-setter-return":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-unexpected-multiline":`error`,"no-unreachable":`error`,"no-unreachable-loop":[`error`,{ignore:[]}],"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unsafe-optional-chaining":[`error`,{disallowArithmeticOperators:!0}],"no-unused-private-class-members":`off`,"no-useless-backreference":`error`,"require-atomic-updates":`off`,"use-isnan":`error`,"valid-typeof":[`error`,{requireStringLiterals:!0}]}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_errors`,{enumerable:!0,get:function(){return i}});
@@ -1,145 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- const errorsRules = {
5
- name: 'airbnb/config/errors',
6
- files: utils_1.allFiles,
7
- rules: {
8
- // Enforce “for” loop update clause moving the counter in the right direction
9
- // https://eslint.org/docs/rules/for-direction
10
- 'for-direction': 'error',
11
- // Enforces that a return statement is present in property getters
12
- // https://eslint.org/docs/rules/getter-return
13
- 'getter-return': [
14
- 'error',
15
- {
16
- allowImplicit: true,
17
- },
18
- ],
19
- // disallow using an async function as a Promise executor
20
- // https://eslint.org/docs/rules/no-async-promise-executor
21
- 'no-async-promise-executor': 'error',
22
- // Disallow await inside of loops
23
- // https://eslint.org/docs/rules/no-await-in-loop
24
- 'no-await-in-loop': 'error',
25
- // Disallow comparisons to negative zero
26
- // https://eslint.org/docs/rules/no-compare-neg-zero
27
- 'no-compare-neg-zero': 'error',
28
- // disallow assignment in conditional expressions
29
- 'no-cond-assign': ['error', 'always'],
30
- // disallow use of console
31
- 'no-console': 'warn',
32
- // Disallows expressions where the operation doesn't affect the value
33
- // https://eslint.org/docs/rules/no-constant-binary-expression
34
- 'no-constant-binary-expression': 'off',
35
- // disallow use of constant expressions in conditions
36
- 'no-constant-condition': 'warn',
37
- // disallow control characters in regular expressions
38
- 'no-control-regex': 'error',
39
- // disallow use of debugger
40
- 'no-debugger': 'error',
41
- // disallow duplicate arguments in functions
42
- 'no-dupe-args': 'error',
43
- // Disallow duplicate conditions in if-else-if chains
44
- // https://eslint.org/docs/rules/no-dupe-else-if
45
- 'no-dupe-else-if': 'error',
46
- // disallow duplicate keys when creating object literals
47
- 'no-dupe-keys': 'error',
48
- // disallow a duplicate case label.
49
- 'no-duplicate-case': 'error',
50
- // disallow empty statements
51
- 'no-empty': 'error',
52
- // disallow the use of empty character classes in regular expressions
53
- 'no-empty-character-class': 'error',
54
- // disallow assigning to the exception in a catch block
55
- 'no-ex-assign': 'error',
56
- // disallow double-negation boolean casts in a boolean context
57
- // https://eslint.org/docs/rules/no-extra-boolean-cast
58
- 'no-extra-boolean-cast': 'error',
59
- // disallow overwriting functions written as function declarations
60
- 'no-func-assign': 'error',
61
- // https://eslint.org/docs/rules/no-import-assign
62
- 'no-import-assign': 'error',
63
- // disallow function or variable declarations in nested blocks
64
- 'no-inner-declarations': 'error',
65
- // disallow invalid regular expression strings in the RegExp constructor
66
- 'no-invalid-regexp': 'error',
67
- // disallow irregular whitespace outside of strings and comments
68
- 'no-irregular-whitespace': 'error',
69
- // Disallow Number Literals That Lose Precision
70
- // https://eslint.org/docs/rules/no-loss-of-precision
71
- 'no-loss-of-precision': 'error',
72
- // Disallow characters which are made with multiple code points in character class syntax
73
- // https://eslint.org/docs/rules/no-misleading-character-class
74
- 'no-misleading-character-class': 'error',
75
- // disallow the use of object properties of the global object (Math and JSON) as functions
76
- 'no-obj-calls': 'error',
77
- // Disallow new operators with global non-constructor functions
78
- // https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
79
- 'no-new-native-nonconstructor': 'error',
80
- // disallow use of Object.prototypes builtins directly
81
- // https://eslint.org/docs/rules/no-prototype-builtins
82
- 'no-prototype-builtins': 'error',
83
- // Disallow returning values from Promise executor functions
84
- // https://eslint.org/docs/rules/no-promise-executor-return
85
- 'no-promise-executor-return': 'error',
86
- // disallow multiple spaces in a regular expression literal
87
- 'no-regex-spaces': 'error',
88
- // Disallow returning values from setters
89
- // https://eslint.org/docs/rules/no-setter-return
90
- 'no-setter-return': 'error',
91
- // disallow sparse arrays
92
- 'no-sparse-arrays': 'error',
93
- // Disallow template literal placeholder syntax in regular strings
94
- // https://eslint.org/docs/rules/no-template-curly-in-string
95
- 'no-template-curly-in-string': 'error',
96
- // Avoid code that looks like two expressions but is actually one
97
- // https://eslint.org/docs/rules/no-unexpected-multiline
98
- 'no-unexpected-multiline': 'error',
99
- // disallow unreachable statements after a return, throw, continue, or break statement
100
- 'no-unreachable': 'error',
101
- // Disallow loops with a body that allows only one iteration
102
- // https://eslint.org/docs/rules/no-unreachable-loop
103
- 'no-unreachable-loop': [
104
- 'error',
105
- {
106
- ignore: [], // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
107
- },
108
- ],
109
- // disallow return/throw/break/continue inside finally blocks
110
- // https://eslint.org/docs/rules/no-unsafe-finally
111
- 'no-unsafe-finally': 'error',
112
- // disallow negating the left operand of relational operators
113
- // https://eslint.org/docs/rules/no-unsafe-negation
114
- 'no-unsafe-negation': 'error',
115
- // disallow use of optional chaining in contexts where the undefined value is not allowed
116
- // https://eslint.org/docs/rules/no-unsafe-optional-chaining
117
- 'no-unsafe-optional-chaining': [
118
- 'error',
119
- {
120
- disallowArithmeticOperators: true,
121
- },
122
- ],
123
- // Disallow Unused Private Class Members
124
- // https://eslint.org/docs/rules/no-unused-private-class-members
125
- 'no-unused-private-class-members': 'off',
126
- // Disallow useless backreferences in regular expressions
127
- // https://eslint.org/docs/rules/no-useless-backreference
128
- 'no-useless-backreference': 'error',
129
- // Disallow assignments that can lead to race conditions due to usage of await or yield
130
- // https://eslint.org/docs/rules/require-atomic-updates
131
- // note: not enabled because it is very buggy
132
- 'require-atomic-updates': 'off',
133
- // disallow comparisons with the value NaN
134
- 'use-isnan': 'error',
135
- // ensure that the results of typeof are compared against a valid string
136
- // https://eslint.org/docs/rules/valid-typeof
137
- 'valid-typeof': [
138
- 'error',
139
- {
140
- requireStringLiterals: true,
141
- },
142
- ],
143
- },
144
- };
145
- exports.default = errorsRules;
1
+ import{__esmMin as e}from"../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n}from"../utils/index.js";var r,i,a=e((()=>{n(),r={name:`airbnb/config/errors`,files:t,rules:{"for-direction":`error`,"getter-return":[`error`,{allowImplicit:!0}],"no-async-promise-executor":`error`,"no-await-in-loop":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-console":`warn`,"no-constant-binary-expression":`off`,"no-constant-condition":`warn`,"no-control-regex":`error`,"no-debugger":`error`,"no-dupe-args":`error`,"no-dupe-else-if":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":`error`,"no-empty-character-class":`error`,"no-ex-assign":`error`,"no-extra-boolean-cast":`error`,"no-func-assign":`error`,"no-import-assign":`error`,"no-inner-declarations":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-obj-calls":`error`,"no-new-native-nonconstructor":`error`,"no-prototype-builtins":`error`,"no-promise-executor-return":`error`,"no-regex-spaces":`error`,"no-setter-return":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-unexpected-multiline":`error`,"no-unreachable":`error`,"no-unreachable-loop":[`error`,{ignore:[]}],"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unsafe-optional-chaining":[`error`,{disallowArithmeticOperators:!0}],"no-unused-private-class-members":`off`,"no-useless-backreference":`error`,"require-atomic-updates":`off`,"use-isnan":`error`,"valid-typeof":[`error`,{requireStringLiterals:!0}]}},i=r}));a();export{i as default,a as init_errors};
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../utils/index.cjs`);let n=require(`globals`);n=e.__toESM(n);var r,i,a=e.__esmMin((()=>{t.init_utils(),r={name:`airbnb/config/es6`,files:t.allFiles,languageOptions:{globals:{...n.default.es2015},parserOptions:{ecmaVersion:6,sourceType:`module`,ecmaFeatures:{generators:!1,objectLiteralDuplicateProperties:!1}}},rules:{"arrow-body-style":[`error`,`as-needed`,{requireReturnForObjectLiteral:!1}],"constructor-super":`error`,"no-class-assign":`error`,"no-const-assign":`error`,"no-dupe-class-members":`error`,"no-duplicate-imports":`off`,"no-restricted-exports":[`error`,{restrictedNamedExports:[`default`,`then`]}],"no-restricted-imports":`off`,"no-this-before-super":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":[`error`,{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":`error`,"object-shorthand":[`error`,`always`,{ignoreConstructors:!1,avoidQuotes:!0}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`any`,ignoreReadBeforeAssign:!0}],"prefer-destructuring":[`error`,{VariableDeclarator:{array:!1,object:!0},AssignmentExpression:{array:!0,object:!1}},{enforceForRenamedProperties:!1}],"prefer-numeric-literals":`error`,"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"require-yield":`error`,"sort-imports":[`off`,{ignoreCase:!1,ignoreDeclarationSort:!1,ignoreMemberSort:!1,memberSyntaxSortOrder:[`none`,`all`,`multiple`,`single`]}],"symbol-description":`error`}},i=r}));a(),exports.default=i,Object.defineProperty(exports,`init_es6`,{enumerable:!0,get:function(){return a}});