-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: New rule to disallow certain attribute values #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Adam-Gillespie345 Thanks for your contribution! I left some reviews.
packages/eslint-plugin/tests/rules/no-restricted-attr-values.test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: YeonJuan <yeonjuan93@naver.com>
@@ -21,7 +21,7 @@ | |||
"license": "MIT", | |||
"devDependencies": { | |||
"cspell": "^6.19.2", | |||
"eslint": "^7.14.0", | |||
"eslint": "^7.32.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to update esLint to handle the optional chaining
Codecov Report
@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 97.72% 97.71% -0.02%
==========================================
Files 43 44 +1
Lines 879 918 +39
Branches 220 230 +10
==========================================
+ Hits 859 897 +38
- Misses 17 18 +1
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you very much for your contribution! @Adam-Gillespie345
This change will be included in the next release. I'll do some testing and release a new version in the next week!
Here is the code I discussed in the issue earlier, I could have extended the no-restricted-attr rule to also encompass values but felt this might dilute the purpose of the rule so created a new one. This rule will allow users to disable the use certain values on certain attributes which will help in the prevention of security leaks to third party services.