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

How can I extend the rules? #144

Closed
oshliaer opened this issue Jan 27, 2022 · 2 comments
Closed

How can I extend the rules? #144

oshliaer opened this issue Jan 27, 2022 · 2 comments

Comments

@oshliaer
Copy link

oshliaer commented Jan 27, 2022

I need to replace the string
https://github.com/sindresorhus/awesome-lint/blob/main/rules/list-item.js#L57

toString(node) === 'Contents'

to something like this

customRules.nodeEquals('contents', toString(node))

because my node equals Содержание. I maintain the list in another language.

So my question. How can I extend the rules? Should we expect some configuration file or something like that?

@sindresorhus
Copy link
Owner

You cannot really extend rules at that level, but there could be a rule option for what text to match against.

@oshliaer
Copy link
Author

OK. At now I don't see an effective rule. I need to learn the code for a good idea and PR.

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

No branches or pull requests

2 participants