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,590 +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
- exports.deprecatedReactBaseRules = void 0;
7
- const globals_1 = __importDefault(require("globals"));
8
- const utils_1 = require("../../utils");
9
- const reactBaseRules = {
10
- name: 'airbnb/config/react',
11
- files: utils_1.allFiles,
12
- languageOptions: {
13
- parserOptions: {
14
- ecmaFeatures: {
15
- jsx: true,
16
- },
17
- },
18
- globals: Object.assign({}, globals_1.default.browser),
19
- },
20
- settings: {
21
- react: {
22
- version: 'detect',
23
- },
24
- },
25
- // View link below for react rules documentation
26
- // https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules
27
- rules: {
28
- // Enforces consistent naming for boolean props
29
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md
30
- 'react/boolean-prop-naming': 'off',
31
- // Prevent usage of button elements without an explicit type attribute
32
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
33
- 'react/button-has-type': 'error',
34
- // This rule enforces onChange or readonly attribute for checked property of input elements.
35
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
36
- 'react/checked-requires-onchange-or-readonly': 'off',
37
- // Enforce all defaultProps have a corresponding non-required PropType
38
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
39
- 'react/default-props-match-prop-types': [
40
- 'error',
41
- {
42
- allowRequiredDefaults: false,
43
- },
44
- ],
45
- // Enforce consistent usage of destructuring assignment of props, state, and context
46
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
47
- 'react/destructuring-assignment': ['error', 'always'],
48
- // Prevent missing displayName in a React component definition
49
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
50
- 'react/display-name': 'off',
51
- // Forbid certain props on Components
52
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md
53
- 'react/forbid-component-props': 'off',
54
- // Forbid certain props on DOM Nodes
55
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md
56
- 'react/forbid-dom-props': 'off',
57
- // Forbid certain elements
58
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md
59
- 'react/forbid-elements': 'off',
60
- // Forbids using non-exported propTypes
61
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
62
- // this is intentionally set to "warn". it would be "error",
63
- // but it's only critical if you're stripping propTypes in production.
64
- 'react/forbid-foreign-prop-types': [
65
- 'warn',
66
- {
67
- allowInPropTypes: true,
68
- },
69
- ],
70
- // Forbid certain propTypes (any, array, object)
71
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
72
- 'react/forbid-prop-types': [
73
- 'error',
74
- {
75
- checkContextTypes: true,
76
- checkChildContextTypes: true,
77
- },
78
- ],
79
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
80
- 'react/forward-ref-uses-ref': 'error',
81
- // Enforce a specific function type for function components
82
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
83
- 'react/function-component-definition': [
84
- 'error',
85
- {
86
- namedComponents: ['function-declaration', 'function-expression'],
87
- unnamedComponents: 'function-expression',
88
- },
89
- ],
90
- // Ensure destructuring and symmetric naming of useState hook value and setter variables
91
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
92
- 'react/hook-use-state': 'off',
93
- // Enforce sandbox attribute on iframe elements
94
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
95
- 'react/iframe-missing-sandbox': 'off',
96
- // Enforce boolean attributes notation in JSX
97
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
98
- 'react/jsx-boolean-value': [
99
- 'error',
100
- 'never',
101
- {
102
- always: [],
103
- },
104
- ],
105
- // Ensures inline tags are not rendered without spaces between them
106
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md
107
- 'react/jsx-child-element-spacing': 'off',
108
- // Validate closing bracket location in JSX
109
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
110
- 'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
111
- // Validate closing tag location in JSX
112
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
113
- 'react/jsx-closing-tag-location': 'error',
114
- // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children
115
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
116
- 'react/jsx-curly-brace-presence': [
117
- 'error',
118
- {
119
- props: 'never',
120
- children: 'never',
121
- },
122
- ],
123
- // Enforce linebreaks in curly braces in JSX attributes and expressions.
124
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
125
- 'react/jsx-curly-newline': 'error',
126
- // Enforce or disallow spaces inside curly braces in JSX attributes
127
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
128
- 'react/jsx-curly-spacing': [
129
- 'error',
130
- 'never',
131
- {
132
- allowMultiline: true,
133
- },
134
- ],
135
- // Enforce spacing around jsx equals signs
136
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
137
- 'react/jsx-equals-spacing': ['error', 'never'],
138
- // only .jsx files may have JSX
139
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
140
- 'react/jsx-filename-extension': [
141
- 'error',
142
- {
143
- extensions: ['.jsx'],
144
- },
145
- ],
146
- // Require that the first prop in a JSX element be on a new line when the element is multiline
147
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
148
- 'react/jsx-first-prop-new-line': 'error',
149
- // Enforce shorthand or standard form for React fragments
150
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
151
- 'react/jsx-fragments': ['error', 'syntax'],
152
- // Enforce event handler naming conventions in JSX
153
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
154
- 'react/jsx-handler-names': 'off',
155
- // Validate props indentation in JSX
156
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
157
- 'react/jsx-indent-props': ['error', 2],
158
- // Enforce JSX indentation
159
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
160
- 'react/jsx-indent': ['error', 2],
161
- // Validate JSX has key prop when in array or iterator
162
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
163
- // Turned off because it has too many false positives
164
- 'react/jsx-key': 'off',
165
- // Validate JSX maximum depth
166
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
167
- 'react/jsx-max-depth': 'off',
168
- // Limit maximum of props on a single line in JSX
169
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
170
- 'react/jsx-max-props-per-line': [
171
- 'error',
172
- {
173
- maximum: 1,
174
- when: 'multiline',
175
- },
176
- ],
177
- // Enforce a new line after jsx elements and expressions
178
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md
179
- 'react/jsx-newline': 'off',
180
- // Prevent usage of .bind() in JSX props
181
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
182
- 'react/jsx-no-bind': [
183
- 'error',
184
- {
185
- ignoreDOMComponents: true,
186
- ignoreRefs: true,
187
- allowArrowFunctions: true,
188
- allowFunctions: false,
189
- allowBind: false,
190
- },
191
- ],
192
- // prevent accidental JS comments from being injected into JSX as text
193
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
194
- 'react/jsx-no-comment-textnodes': 'error',
195
- // Prevent react contexts from taking non-stable values
196
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
197
- 'react/jsx-no-constructed-context-values': 'error',
198
- // Prevent duplicate props in JSX
199
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
200
- 'react/jsx-no-duplicate-props': [
201
- 'error',
202
- {
203
- ignoreCase: true,
204
- },
205
- ],
206
- // Prevent problematic leaked values from being rendered
207
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
208
- 'react/jsx-no-leaked-render': 'off',
209
- // Prevent usage of unwrapped JSX strings
210
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
211
- 'react/jsx-no-literals': 'off',
212
- // Prevent usage of `javascript:` URLs
213
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
214
- 'react/jsx-no-script-url': [
215
- 'error',
216
- [
217
- {
218
- name: 'Link',
219
- props: ['to', 'href'],
220
- },
221
- {
222
- name: 'NavLink',
223
- props: ['to'],
224
- },
225
- // Custom
226
- {
227
- name: 'NextLink',
228
- props: ['to', 'href'],
229
- },
230
- ],
231
- {
232
- includeFromSettings: true,
233
- },
234
- ],
235
- // Disallow target="_blank" on links
236
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
237
- 'react/jsx-no-target-blank': [
238
- 'error',
239
- {
240
- allowReferrer: false,
241
- enforceDynamicLinks: 'always',
242
- warnOnSpreadAttributes: false,
243
- links: true,
244
- forms: false,
245
- },
246
- ],
247
- // Disallow undeclared variables in JSX
248
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
249
- 'react/jsx-no-undef': [
250
- 'error',
251
- {
252
- allowGlobals: false,
253
- },
254
- ],
255
- // Disallow unnecessary fragments
256
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
257
- 'react/jsx-no-useless-fragment': [
258
- 'error',
259
- {
260
- allowExpressions: true,
261
- },
262
- ],
263
- // One JSX Element Per Line
264
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
265
- 'react/jsx-one-expression-per-line': [
266
- 'error',
267
- {
268
- allow: 'single-child',
269
- },
270
- ],
271
- // Enforce PascalCase for user-defined JSX components
272
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
273
- 'react/jsx-pascal-case': [
274
- 'error',
275
- {
276
- allowAllCaps: true,
277
- allowLeadingUnderscore: false,
278
- allowNamespace: true,
279
- ignore: [],
280
- },
281
- ],
282
- // Disallow multiple spaces between inline JSX props
283
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
284
- 'react/jsx-props-no-multi-spaces': 'error',
285
- // Disallow JSX prop spreading the same identifier multiple times
286
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
287
- 'react/jsx-props-no-spread-multi': 'error',
288
- // Disallow JSX props spreading
289
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
290
- 'react/jsx-props-no-spreading': 'off',
291
- // Enforce props alphabetical sorting
292
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
293
- 'react/jsx-sort-props': 'off',
294
- // Validate whitespace in and around the JSX opening and closing brackets
295
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
296
- 'react/jsx-tag-spacing': [
297
- 'error',
298
- {
299
- closingSlash: 'never',
300
- beforeSelfClosing: 'always',
301
- afterOpening: 'never',
302
- beforeClosing: 'never',
303
- },
304
- ],
305
- // Prevent React to be incorrectly marked as unused
306
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
307
- 'react/jsx-uses-react': 'error',
308
- // Prevent variables used in JSX to be incorrectly marked as unused
309
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
310
- 'react/jsx-uses-vars': 'error',
311
- // Prevent missing parentheses around multilines JSX
312
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
313
- 'react/jsx-wrap-multilines': [
314
- 'error',
315
- {
316
- declaration: 'parens-new-line',
317
- assignment: 'parens-new-line',
318
- return: 'parens-new-line',
319
- arrow: 'parens-new-line',
320
- condition: 'parens-new-line',
321
- logical: 'parens-new-line',
322
- prop: 'parens-new-line',
323
- },
324
- ],
325
- // Prevent using this.state within a this.setState
326
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-access-state-in-setstate.md
327
- 'react/no-access-state-in-setstate': 'error',
328
- // Prevent adjacent inline elements not separated by whitespace
329
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
330
- 'react/no-adjacent-inline-elements': 'off',
331
- // Prevent usage of Array index in keys
332
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
333
- 'react/no-array-index-key': 'error',
334
- // Lifecycle methods should be methods on the prototype, not class fields
335
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-arrow-function-lifecycle.md
336
- 'react/no-arrow-function-lifecycle': 'error',
337
- // Prevent passing of children as props
338
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
339
- 'react/no-children-prop': [
340
- 'error',
341
- {
342
- allowFunctions: false,
343
- },
344
- ],
345
- // Prevent problem with children and props.dangerouslySetInnerHTML
346
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
347
- 'react/no-danger-with-children': 'error',
348
- // Prevent usage of dangerous JSX properties
349
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
350
- 'react/no-danger': [
351
- 'warn',
352
- {
353
- customComponentNames: [],
354
- },
355
- ],
356
- // Prevent usage of deprecated methods
357
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
358
- 'react/no-deprecated': 'error',
359
- // Prevent usage of setState in componentDidMount
360
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
361
- // this is necessary for server-rendering
362
- 'react/no-did-mount-set-state': 'off',
363
- // Prevent usage of setState in componentDidUpdate
364
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
365
- 'react/no-did-update-set-state': 'error',
366
- // Prevent direct mutation of this.state
367
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
368
- 'react/no-direct-mutation-state': 'error',
369
- // warn against using findDOMNode()
370
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
371
- 'react/no-find-dom-node': 'error',
372
- // Prevent usage of invalid attributes
373
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-invalid-html-attribute.md
374
- 'react/no-invalid-html-attribute': 'error',
375
- // Prevent usage of isMounted
376
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
377
- 'react/no-is-mounted': 'error',
378
- // Prevent multiple component definition per file
379
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
380
- 'react/no-multi-comp': 'off',
381
- // Enforce that namespaces are not used in React elements
382
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
383
- 'react/no-namespace': 'error',
384
- // Disallow usage of referential-type variables as default param in functional component
385
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md
386
- 'react/no-object-type-as-default-prop': 'off',
387
- // Prevent usage of shouldComponentUpdate when extending React.PureComponent
388
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
389
- 'react/no-redundant-should-component-update': 'error',
390
- // disallow using React.render/ReactDOM.render's return value
391
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
392
- 'react/no-render-return-value': 'error',
393
- // Prevent usage of setState
394
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
395
- 'react/no-set-state': 'off',
396
- // Prevent using string references
397
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
398
- 'react/no-string-refs': [
399
- 'error',
400
- {
401
- noTemplateLiterals: true,
402
- },
403
- ],
404
- // Prevent this from being used in stateless functional components
405
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
406
- 'react/no-this-in-sfc': 'error',
407
- // Prevents common casing typos
408
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-typos.md
409
- 'react/no-typos': 'error',
410
- // Prevent invalid characters from appearing in markup
411
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
412
- 'react/no-unescaped-entities': 'error',
413
- // Prevent usage of unknown DOM property
414
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
415
- 'react/no-unknown-property': [
416
- 'error',
417
- {
418
- ignore: [],
419
- requireDataLowercase: false,
420
- },
421
- ],
422
- // Prevent usage of UNSAFE_ methods
423
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
424
- 'react/no-unsafe': 'off',
425
- // Prevent creating unstable components inside components
426
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
427
- 'react/no-unstable-nested-components': 'error',
428
- // Prevent declaring unused methods of component class
429
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md
430
- 'react/no-unused-class-component-methods': 'error',
431
- // Prevent unused propType definitions
432
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
433
- 'react/no-unused-prop-types': [
434
- 'error',
435
- {
436
- ignore: [],
437
- customValidators: [],
438
- skipShapeProps: true,
439
- },
440
- ],
441
- // Prevent unused state values
442
- // https://github.com/jsx-eslint/eslint-plugin-react/pull/1103/
443
- 'react/no-unused-state': 'error',
444
- // Prevent usage of setState in componentWillUpdate
445
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
446
- 'react/no-will-update-set-state': 'error',
447
- // Require ES6 class declarations over React.createClass
448
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
449
- 'react/prefer-es6-class': ['error', 'always'],
450
- // Prefer exact proptypes definitions
451
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-exact-props.md
452
- 'react/prefer-exact-props': 'error',
453
- // Enforce that props are read-only
454
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
455
- 'react/prefer-read-only-props': 'off',
456
- // Require stateless functions when not using lifecycle methods, setState or ref
457
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
458
- 'react/prefer-stateless-function': [
459
- 'error',
460
- {
461
- ignorePureComponents: true,
462
- },
463
- ],
464
- // Prevent missing props validation in a React component definition
465
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prop-types.md
466
- 'react/prop-types': [
467
- 'error',
468
- {
469
- ignore: [],
470
- customValidators: [],
471
- skipUndeclared: false,
472
- },
473
- ],
474
- // Prevent missing React when using JSX
475
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
476
- 'react/react-in-jsx-scope': 'error',
477
- // Enforce a defaultProps definition for every prop that is not a required prop
478
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
479
- 'react/require-default-props': [
480
- 'error',
481
- {
482
- forbidDefaultForRequired: true,
483
- classes: 'defaultProps',
484
- functions: 'defaultProps',
485
- },
486
- ],
487
- // require a shouldComponentUpdate method, or PureRenderMixin
488
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
489
- 'react/require-optimization': 'off',
490
- // Require render() methods to return something
491
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
492
- 'react/require-render-return': 'error',
493
- // Prevent extra closing tags for components without children
494
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
495
- 'react/self-closing-comp': [
496
- 'error',
497
- {
498
- component: true,
499
- html: true,
500
- },
501
- ],
502
- // Enforce component methods order
503
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-comp.md
504
- 'react/sort-comp': [
505
- 'error',
506
- {
507
- order: [
508
- 'static-variables',
509
- 'static-methods',
510
- 'instance-variables',
511
- 'lifecycle',
512
- '/^handle.+$/',
513
- '/^on.+$/',
514
- 'getters',
515
- 'setters',
516
- '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
517
- 'instance-methods',
518
- 'everything-else',
519
- 'rendering',
520
- ],
521
- groups: {
522
- lifecycle: [
523
- 'displayName',
524
- 'propTypes',
525
- 'contextTypes',
526
- 'childContextTypes',
527
- 'mixins',
528
- 'statics',
529
- 'defaultProps',
530
- 'constructor',
531
- 'getDefaultProps',
532
- 'getInitialState',
533
- 'state',
534
- 'getChildContext',
535
- 'getDerivedStateFromProps',
536
- 'componentWillMount',
537
- 'UNSAFE_componentWillMount',
538
- 'componentDidMount',
539
- 'componentWillReceiveProps',
540
- 'UNSAFE_componentWillReceiveProps',
541
- 'shouldComponentUpdate',
542
- 'componentWillUpdate',
543
- 'UNSAFE_componentWillUpdate',
544
- 'getSnapshotBeforeUpdate',
545
- 'componentDidUpdate',
546
- 'componentDidCatch',
547
- 'componentWillUnmount',
548
- ],
549
- rendering: ['/^render.+$/', 'render'],
550
- },
551
- },
552
- ],
553
- // Enforce defaultProps declarations alphabetical sorting
554
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
555
- 'react/sort-default-props': 'off',
556
- // Enforce propTypes declarations alphabetical sorting
557
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md
558
- 'react/sort-prop-types': 'off',
559
- // Enforce state initialization style
560
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
561
- 'react/state-in-constructor': ['error', 'always'],
562
- // Enforces where React component static properties should be positioned
563
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
564
- 'react/static-property-placement': ['error', 'property assignment'],
565
- // Require style prop value be an object or var
566
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
567
- 'react/style-prop-object': [
568
- 'error',
569
- {
570
- allow: [],
571
- },
572
- ],
573
- // Prevent void DOM elements from receiving children
574
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
575
- 'react/void-dom-elements-no-children': 'error',
576
- },
577
- };
578
- exports.deprecatedReactBaseRules = {
579
- name: 'airbnb/config/react/deprecated',
580
- files: utils_1.allFiles,
581
- rules: {
582
- // Enforce defaultProps declarations alphabetical sorting
583
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
584
- 'react/jsx-sort-default-props': 'off',
585
- // Enforce spaces before the closing bracket of self-closing JSX elements, Deprecated in favor of jsx-tag-spacing
586
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
587
- 'react/jsx-space-before-closing': 'off',
588
- },
589
- };
590
- exports.default = reactBaseRules;
1
+ import{__esmMin as e}from"../../_virtual/rolldown_runtime.js";import{allFiles as t,init_utils as n}from"../../utils/index.js";import r from"globals";var i,a,o=e((()=>{n(),i={name:`airbnb/config/react`,files:t,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},globals:{...r.browser}},settings:{react:{version:`detect`}},rules:{"react/boolean-prop-naming":`off`,"react/button-has-type":`error`,"react/checked-requires-onchange-or-readonly":`off`,"react/default-props-match-prop-types":[`error`,{allowRequiredDefaults:!1}],"react/destructuring-assignment":[`error`,`always`],"react/display-name":`off`,"react/forbid-component-props":`off`,"react/forbid-dom-props":`off`,"react/forbid-elements":`off`,"react/forbid-foreign-prop-types":[`warn`,{allowInPropTypes:!0}],"react/forbid-prop-types":[`error`,{checkContextTypes:!0,checkChildContextTypes:!0}],"react/forward-ref-uses-ref":`error`,"react/function-component-definition":[`error`,{namedComponents:[`function-declaration`,`function-expression`],unnamedComponents:`function-expression`}],"react/hook-use-state":`off`,"react/iframe-missing-sandbox":`off`,"react/jsx-boolean-value":[`error`,`never`,{always:[]}],"react/jsx-child-element-spacing":`off`,"react/jsx-closing-bracket-location":[`error`,`line-aligned`],"react/jsx-closing-tag-location":`error`,"react/jsx-curly-brace-presence":[`error`,{props:`never`,children:`never`}],"react/jsx-curly-newline":`error`,"react/jsx-curly-spacing":[`error`,`never`,{allowMultiline:!0}],"react/jsx-equals-spacing":[`error`,`never`],"react/jsx-filename-extension":[`error`,{extensions:[`.jsx`]}],"react/jsx-first-prop-new-line":`error`,"react/jsx-fragments":[`error`,`syntax`],"react/jsx-handler-names":`off`,"react/jsx-indent-props":[`error`,2],"react/jsx-indent":[`error`,2],"react/jsx-key":`off`,"react/jsx-max-depth":`off`,"react/jsx-max-props-per-line":[`error`,{maximum:1,when:`multiline`}],"react/jsx-newline":`off`,"react/jsx-no-bind":[`error`,{ignoreDOMComponents:!0,ignoreRefs:!0,allowArrowFunctions:!0,allowFunctions:!1,allowBind:!1}],"react/jsx-no-comment-textnodes":`error`,"react/jsx-no-constructed-context-values":`error`,"react/jsx-no-duplicate-props":[`error`,{ignoreCase:!0}],"react/jsx-no-leaked-render":`off`,"react/jsx-no-literals":`off`,"react/jsx-no-script-url":[`error`,[{name:`Link`,props:[`to`,`href`]},{name:`NavLink`,props:[`to`]},{name:`NextLink`,props:[`to`,`href`]}],{includeFromSettings:!0}],"react/jsx-no-target-blank":[`error`,{allowReferrer:!1,enforceDynamicLinks:`always`,warnOnSpreadAttributes:!1,links:!0,forms:!1}],"react/jsx-no-undef":[`error`,{allowGlobals:!1}],"react/jsx-no-useless-fragment":[`error`,{allowExpressions:!0}],"react/jsx-one-expression-per-line":[`error`,{allow:`single-child`}],"react/jsx-pascal-case":[`error`,{allowAllCaps:!0,allowLeadingUnderscore:!1,allowNamespace:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":`error`,"react/jsx-props-no-spread-multi":`error`,"react/jsx-props-no-spreading":`off`,"react/jsx-sort-props":`off`,"react/jsx-tag-spacing":[`error`,{closingSlash:`never`,beforeSelfClosing:`always`,afterOpening:`never`,beforeClosing:`never`}],"react/jsx-uses-react":`error`,"react/jsx-uses-vars":`error`,"react/jsx-wrap-multilines":[`error`,{declaration:`parens-new-line`,assignment:`parens-new-line`,return:`parens-new-line`,arrow:`parens-new-line`,condition:`parens-new-line`,logical:`parens-new-line`,prop:`parens-new-line`}],"react/no-access-state-in-setstate":`error`,"react/no-adjacent-inline-elements":`off`,"react/no-array-index-key":`error`,"react/no-arrow-function-lifecycle":`error`,"react/no-children-prop":[`error`,{allowFunctions:!1}],"react/no-danger-with-children":`error`,"react/no-danger":[`warn`,{customComponentNames:[]}],"react/no-deprecated":`error`,"react/no-did-mount-set-state":`off`,"react/no-did-update-set-state":`error`,"react/no-direct-mutation-state":`error`,"react/no-find-dom-node":`error`,"react/no-invalid-html-attribute":`error`,"react/no-is-mounted":`error`,"react/no-multi-comp":`off`,"react/no-namespace":`error`,"react/no-object-type-as-default-prop":`off`,"react/no-redundant-should-component-update":`error`,"react/no-render-return-value":`error`,"react/no-set-state":`off`,"react/no-string-refs":[`error`,{noTemplateLiterals:!0}],"react/no-this-in-sfc":`error`,"react/no-typos":`error`,"react/no-unescaped-entities":`error`,"react/no-unknown-property":[`error`,{ignore:[],requireDataLowercase:!1}],"react/no-unsafe":`off`,"react/no-unstable-nested-components":`error`,"react/no-unused-class-component-methods":`error`,"react/no-unused-prop-types":[`error`,{ignore:[],customValidators:[],skipShapeProps:!0}],"react/no-unused-state":`error`,"react/no-will-update-set-state":`error`,"react/prefer-es6-class":[`error`,`always`],"react/prefer-exact-props":`error`,"react/prefer-read-only-props":`off`,"react/prefer-stateless-function":[`error`,{ignorePureComponents:!0}],"react/prop-types":[`error`,{ignore:[],customValidators:[],skipUndeclared:!1}],"react/react-in-jsx-scope":`error`,"react/require-default-props":[`error`,{forbidDefaultForRequired:!0,classes:`defaultProps`,functions:`defaultProps`}],"react/require-optimization":`off`,"react/require-render-return":`error`,"react/self-closing-comp":[`error`,{component:!0,html:!0}],"react/sort-comp":[`error`,{order:[`static-variables`,`static-methods`,`instance-variables`,`lifecycle`,`/^handle.+$/`,`/^on.+$/`,`getters`,`setters`,`/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/`,`instance-methods`,`everything-else`,`rendering`],groups:{lifecycle:[`displayName`,`propTypes`,`contextTypes`,`childContextTypes`,`mixins`,`statics`,`defaultProps`,`constructor`,`getDefaultProps`,`getInitialState`,`state`,`getChildContext`,`getDerivedStateFromProps`,`componentWillMount`,`UNSAFE_componentWillMount`,`componentDidMount`,`componentWillReceiveProps`,`UNSAFE_componentWillReceiveProps`,`shouldComponentUpdate`,`componentWillUpdate`,`UNSAFE_componentWillUpdate`,`getSnapshotBeforeUpdate`,`componentDidUpdate`,`componentDidCatch`,`componentWillUnmount`],rendering:[`/^render.+$/`,`render`]}}],"react/sort-default-props":`off`,"react/sort-prop-types":`off`,"react/state-in-constructor":[`error`,`always`],"react/static-property-placement":[`error`,`property assignment`],"react/style-prop-object":[`error`,{allow:[]}],"react/void-dom-elements-no-children":`error`}},a=i}));o();export{a as default,o as init_react};
@@ -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/react-hooks`,files:t.allFiles,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},rules:{"react-hooks/exhaustive-deps":`error`,"react-hooks/rules-of-hooks":`error`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_reactHooks`,{enumerable:!0,get:function(){return i}});
@@ -1,23 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../../utils");
4
- const reactHooksRules = {
5
- name: 'airbnb/config/react-hooks',
6
- files: utils_1.allFiles,
7
- languageOptions: {
8
- parserOptions: {
9
- ecmaFeatures: {
10
- jsx: true,
11
- },
12
- },
13
- },
14
- rules: {
15
- // Verify the list of the dependencies for Hooks like useEffect and similar
16
- // https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts
17
- 'react-hooks/exhaustive-deps': 'error',
18
- // Enforce Rules of Hooks
19
- // https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts
20
- 'react-hooks/rules-of-hooks': 'error',
21
- },
22
- };
23
- exports.default = reactHooksRules;
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/react-hooks`,files:t,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},rules:{"react-hooks/exhaustive-deps":`error`,"react-hooks/rules-of-hooks":`error`}},i=r}));a();export{i as default,a as init_reactHooks};
@@ -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/react-jsx-a11y`,files:t.allFiles,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},rules:{"jsx-a11y/alt-text":[`error`,{elements:[`img`,`object`,`area`,`input[type="image"]`],img:[],object:[],area:[],'input[type="image"]':[]}],"jsx-a11y/anchor-ambiguous-text":`off`,"jsx-a11y/anchor-has-content":[`error`,{components:[]}],"jsx-a11y/anchor-is-valid":[`error`,{components:[`Link`],specialLink:[`to`],aspects:[`noHref`,`invalidHref`,`preferButton`]}],"jsx-a11y/aria-activedescendant-has-tabindex":`error`,"jsx-a11y/aria-props":`error`,"jsx-a11y/aria-proptypes":`error`,"jsx-a11y/aria-role":[`error`,{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":`error`,"jsx-a11y/autocomplete-valid":[`error`,{inputComponents:[`Input`]}],"jsx-a11y/click-events-have-key-events":`error`,"jsx-a11y/control-has-associated-label":[`error`,{labelAttributes:[`label`],controlComponents:[],ignoreElements:[`audio`,`canvas`,`embed`,`input`,`textarea`,`tr`,`video`],ignoreRoles:[`grid`,`listbox`,`menu`,`menubar`,`radiogroup`,`row`,`tablist`,`toolbar`,`tree`,`treegrid`],depth:5}],"jsx-a11y/heading-has-content":[`error`,{components:[`Typography`,`Text`]}],"jsx-a11y/html-has-lang":`error`,"jsx-a11y/iframe-has-title":`error`,"jsx-a11y/img-redundant-alt":`error`,"jsx-a11y/interactive-supports-focus":`error`,"jsx-a11y/label-has-associated-control":[`error`,{labelComponents:[],labelAttributes:[],controlComponents:[],assert:`both`,depth:25}],"jsx-a11y/lang":`error`,"jsx-a11y/media-has-caption":[`error`,{audio:[],video:[],track:[]}],"jsx-a11y/mouse-events-have-key-events":`error`,"jsx-a11y/no-access-key":`error`,"jsx-a11y/no-aria-hidden-on-focusable":`off`,"jsx-a11y/no-autofocus":[`error`,{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":[`error`,{elements:[`marquee`,`blink`]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":[`error`,{tr:[`none`,`presentation`]}],"jsx-a11y/no-noninteractive-element-interactions":[`error`,{handlers:[`onClick`,`onMouseDown`,`onMouseUp`,`onKeyPress`,`onKeyDown`,`onKeyUp`]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":[`error`,{ul:[`listbox`,`menu`,`menubar`,`radiogroup`,`tablist`,`tree`,`treegrid`],ol:[`listbox`,`menu`,`menubar`,`radiogroup`,`tablist`,`tree`,`treegrid`],li:[`menuitem`,`option`,`row`,`tab`,`treeitem`],table:[`grid`],td:[`gridcell`]}],"jsx-a11y/no-noninteractive-tabindex":[`error`,{tags:[],roles:[`tabpanel`],allowExpressionValues:!0}],"jsx-a11y/no-redundant-roles":[`error`,{nav:[`navigation`]}],"jsx-a11y/no-static-element-interactions":[`error`,{handlers:[`onClick`,`onMouseDown`,`onMouseUp`,`onKeyPress`,`onKeyDown`,`onKeyUp`]}],"jsx-a11y/prefer-tag-over-role":`off`,"jsx-a11y/role-has-required-aria-props":`error`,"jsx-a11y/role-supports-aria-props":`error`,"jsx-a11y/scope":`error`,"jsx-a11y/tabindex-no-positive":`error`}},r=n}));i(),exports.default=r,Object.defineProperty(exports,`init_reactJsxA11y`,{enumerable:!0,get:function(){return i}});