Skip to content
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

Create rule S6790: Disallow using string references #4360

Merged
merged 4 commits into from Nov 7, 2023
Merged

Conversation

vdiez
Copy link
Contributor

@vdiez vdiez commented Nov 6, 2023

Fixes #3661

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion on the RSPEC, otherwise looks great!

</ul>
<pre data-diff-id="1" data-diff-type="noncompliant">
const Hello = createReactClass({
componentDidMount: function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion, but to be consistent between the noncompliant and compliant snippets, we could maybe use the method definition shortcut everywhere:

componentDidMount() {}

instead of

componentDidMount: function () {}

Same for the render function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki, I will create a PR on rspec

@vdiez vdiez enabled auto-merge (squash) November 7, 2023 10:06
Copy link

sonarqube-next bot commented Nov 7, 2023

@vdiez vdiez merged commit fb49e29 into master Nov 7, 2023
16 checks passed
@vdiez vdiez deleted the add-S6790 branch November 7, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create rule S6790: Disallow using string references (react/no-string-refs)
2 participants