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

Prevent string literals being used in ref attributes #362

Merged
merged 1 commit into from
Dec 22, 2015

Conversation

Intellicode
Copy link
Contributor

Initially, the idea in #341 was to check if references in this.refs exist. Based on further discussion it was suggested to define a rule to disallow using string literals in reference properties.

@yannickcr
Copy link
Member

Hi, thanks for the rule.

2 minors things though:

  • Maybe a less generic rule name (like no-string-refs ?), no-refs seems to forbid all types of refs.
  • Can you add some titles in the documentations? See other rules documentation for example.

Beside that I'm totally ok to add this rule :)

@Intellicode
Copy link
Contributor Author

Sure! I'll add them tomorrow :)

@Intellicode
Copy link
Contributor Author

@yannickcr I've implemented your suggestions, let me know if there is anything else :)

@yannickcr
Copy link
Member

Just missing the title in docs/no-string-refs.md
Can you add it and squash your commits? Then I think we'll be good to go :)

Add check for string usage in ref attributes

Add unit tests

Add docs

Improve docs

Improve tests

Improve docs

Add rule to index.js

Fix linting errors

Rename from no-refs to no-string-refs

Update ESLint project readme

Add titles
@Intellicode
Copy link
Contributor Author

@yannickcr Sorry, my latest change to adding titles was not pushed correctly, should be good now and also I squashed all commits :)

yannickcr added a commit that referenced this pull request Dec 22, 2015
Add no-string-refs rule (fixes #341)
@yannickcr yannickcr merged commit 2e02153 into jsx-eslint:master Dec 22, 2015
@yannickcr
Copy link
Member

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants