-
-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
☂️ eslint-plugin-react #1022
Labels
Comments
Boshen
added
A-linter
Area - Linter
E-Help Wanted
Experience level - For the experienced collaborators
labels
Oct 21, 2023
Boshen
changed the title
☂️ linter: eslint-plugin-react (recommended)
☂️ eslint-plugin-react (recommended)
Oct 21, 2023
camc314
pushed a commit
that referenced
this issue
Nov 26, 2023
Try to implement `no-is-mounted` for #1022
camc314
pushed a commit
that referenced
this issue
Dec 31, 2023
Part of #1022 Based on: - doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md - code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-no-undef.js - test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/jsx-no-undef.js
Pls, update checkboxes :) |
Done |
jsx-no-undef done too |
Are the way of getting react version from some plugin? const defaultVersion = '999.999.999';
function getReactVersionFromContext(context) {
let confVer = defaultVersion;
// .eslintrc shared settings (https://eslint.org/docs/user-guide/configuring#adding-shared-settings)
if (context.settings && context.settings.react && context.settings.react.version) {
let settingsVersion = context.settings.react.version;
if (settingsVersion === 'detect') {
settingsVersion = detectReactVersion(context);
}
if (typeof settingsVersion !== 'string') {
error('Warning: React version specified in eslint-plugin-react-settings must be a string; '
+ `got “${typeof settingsVersion}”`);
}
confVer = String(settingsVersion);
} else if (!warnedForMissingVersion) {
error('Warning: React version not specified in eslint-plugin-react settings. '
+ 'See https://github.com/jsx-eslint/eslint-plugin-react#configuration .');
warnedForMissingVersion = true;
}
confVer = /^[0-9]+\.[0-9]+$/.test(confVer) ? `${confVer}.0` : confVer;
const result = semver.coerce(confVer.split('.').map((part) => Number(part)).join('.'));
if (!result) {
error(`Warning: React version specified in eslint-plugin-react-settings must be a valid semver version, or "detect"; got “${confVer}”`);
}
return result ? result.version : defaultVersion;
} |
camc314
pushed a commit
that referenced
this issue
Jan 10, 2024
#1022 Based on: - code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-direct-mutation-state.js - doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md - test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/no-direct-mutation-state.js Co-authored-by: 张润钊 <zhangrunzhao@bytedance.com>
mysteryven
pushed a commit
that referenced
this issue
Jan 25, 2024
#1022 try to implement `jsx-no-target-blank` * code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-no-target-blank.js * doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md * test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/jsx-no-target-blank.js --------- Co-authored-by: huangjunjie.coder <huangjunjie.coder@bytedance.com>
I'm going to begin tackling the |
Boshen
pushed a commit
that referenced
this issue
Feb 23, 2024
partof: #1022 docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/void-dom-elements-no-children.js test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/void-dom-elements-no-children.js
I will start working on the task of |
Dunqing
added a commit
that referenced
this issue
Mar 20, 2024
…ly (#2754) partof: #1022 docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/checked-requires-onchange-or-readonly.js test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/checked-requires-onchange-or-readonly.js --------- Co-authored-by: Dunqing <dengqing0821@gmail.com>
38 tasks
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this issue
May 29, 2024
…ect#1892) oxc-project#1022 Based on: - code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-direct-mutation-state.js - doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md - test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/no-direct-mutation-state.js Co-authored-by: 张润钊 <zhangrunzhao@bytedance.com>
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this issue
May 29, 2024
oxc-project#1022 try to implement `jsx-no-target-blank` * code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-no-target-blank.js * doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md * test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/jsx-no-target-blank.js --------- Co-authored-by: huangjunjie.coder <huangjunjie.coder@bytedance.com>
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this issue
May 29, 2024
…project#2477) partof: oxc-project#1022 docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/void-dom-elements-no-children.js test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/void-dom-elements-no-children.js
I will start working on the |
camc314
pushed a commit
that referenced
this issue
Aug 14, 2024
partof: #1022 docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-props-no-spread-multi.js test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/jsx-props-no-spread-multi.js --------- Co-authored-by: Don Isaac <donald.isaac@gmail.com>
DonIsaac
pushed a commit
that referenced
this issue
Sep 16, 2024
- Part of #1022 This implements the [recommended rule `no-danger-with-children`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md) from the `eslint-plugin-react` package. This rule proved to be a little bit trickier to implement than I anticipated, as it required searching up through all of the scopes recursively in order to resolve object properties. This would be easier with something like a type-check system, but this will work for now. (Sidenote: this is my first real attempt at Rust programming in ~5 years, so any feedback on making this more idiomatic is welcome.)
DonIsaac
added a commit
that referenced
this issue
Oct 10, 2024
#1022 --------- Co-authored-by: Don Isaac <donald.isaac@gmail.com>
DonIsaac
added a commit
that referenced
this issue
Oct 28, 2024
Implements not recommended rule `react/style-prop-object` (#1022) --------- Co-authored-by: Don Isaac <donald.isaac@gmail.com>
Orenbek
pushed a commit
to Orenbek/oxc
that referenced
this issue
Oct 28, 2024
Implements not recommended rule `react/style-prop-object` (oxc-project#1022) --------- Co-authored-by: Don Isaac <donald.isaac@gmail.com>
camc314
pushed a commit
that referenced
this issue
Nov 21, 2024
Implement not recommended rule `no-array-index-key` (#1022 )
Boshen
pushed a commit
that referenced
this issue
Nov 25, 2024
#1022 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Warning
This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules
This is tracking issue for
eslint-plugin-react
,eslint-plugin-react-hooks
.There are 103(+ 2 deprecated) rules.
To get started, run the following command:
Then register the rule in
crates/oxc_linter/src/rules.rs
and alsodeclare_all_lint_rules
at the bottom.Recommended rules
✨: 18, 🚫: 0 / total: 23
✨ = Implemented, 🚫 = No need to implement
Not recommended rules
✨: 15, 🚫: 0 / total: 80
✨ = Implemented, 🚫 = No need to implement
Deprecated rules
✨: 0, 🚫: 0 / total: 2
✨ = Implemented, 🚫 = No need to implement
The text was updated successfully, but these errors were encountered: