Should 'react/react-in-jsx-scope' be disabled by default if the new JSX transform is used.
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- eslint, javascript, react
- 领域
- tooling
调研方向
检查 airbnb 配置和 react/react-in-jsx-scope 规则,然后将 issue 中描述的 React JSX 转换可用性启发式方法与现有配置行为进行比较。完成的标准是项目已确定一项策略——启发式方法、修改默认规则或详细文档——并且相关检查覆盖了相应的行为或指导说明。
由索引模型根据 Issue 内容生成。
描述
A new JSX transform was introduced in React 17 and backported to React 16.14.0, 15.7.0, and 0.14.10, which enables people to use JSX features without having React in the scope. Obviously this will cause tons of react/react-in-jsx-scope errors in a new project (or that a project that used the codemod to remove the imports) that is using the airbnb config.
In CRA we use the following heuristic to catch if the new transform is available:
const hasJsxRuntime = (() => {
try {
require.resolve('react/jsx-runtime.js');
return true;
} catch (e) {
return false;
}
})();
My question is a) should the airbnb config use a similar heuristic or a) should the rule be disabled by default in a new major version or c) should the configuration option/issue be documented somewhere in detail as many people using the config will eventually run into it.
- 主要语言
- JavaScript
- 星标
- 148k
- 派生
- 26.5k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
airbnb/javascript 的其他 Issue
-
Severity: Unhandled promise rejection in `whitespace-async.js` when ESLint async path is used可能已有人在做 @bodapatisaikrishna 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
airbnb/javascript#3237 · 6 条评论 ·
-
Inconsistent semicolon usage in examples (Arrays vs Functions)可能已有人在做 @Developer-shivamMishra 于 19 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
airbnb/javascript#3152 · 4 条评论 ·
-
No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)可能已有人在做 @dataCenter430 于 224 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 48/100
airbnb/javascript#3238 · 8 条评论 ·
-
Upgrading eslint-plugin-react-hooks可能已有人在做 @weihongyu12 于 369 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 38/100
airbnb/javascript#3186 · 3 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
airbnb/javascript#3173 · 9 条评论 · 1 个 reaction ·
查看 airbnb/javascript 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 65/100
openclaw/openclaw-enterprise#2571 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
fabriziosalmi/certmate#1247 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
bradymholt/cRonstrue#427 ·
维护者通常 1 天内回复
-
internal
难度 2/5 1-3 小时 新手友好度 70/100
frostney/GocciaScript#1715 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复