-
-
Notifications
You must be signed in to change notification settings - Fork 641
Closed
Labels
Description
Hi,
I am trying to add a custom rule using the logic of heading-has-content rule. But instead of headings I am looking for div elements. Also, in the util hasAccessibleChild I am not only looking for any text but a text that is equal to "apply".
#My questions:
-
I don't know how to handle these errors. Can you suggest some solutions?
I generated the rule files using the create-rule.md file. I added my changes to the rule and rule-test files. I run npm test and receive these errors:
Do you have a further guide on these below?
2. How do I test if the rule and the rule-test works as I want it to?
I have read the [eslint documentation](https://eslint.org/docs/developer-guide/unit-tests) but I couldn't find a solution.
- Without merging my rule to the master branch, how do I add my custom jsx-eslint /eslint-plugin-jsx-a11y plugin to test my code against the my new custom rule when I develop a new website?
here is my custom rule:
https://github.com/Felicia5/eslint-plugin-jsx-a11y/blob/first-rule-button/src/rules/first-rule-button.js
