Is it possible to ban a list of words with ESlint or anything else when pre-commit?
问题 I am using husky to deal with the pre-commit thing. So here I want that the newly written program should not contain a list of words, like dangerouslySetInnerHTML , etc. I know there is a rule no-danger in eslint-plugin-react, but it only prevents that one word. How can I write a list of words in a file and use it as a filter? 回答1: So I finally solved this problem myself. The solution lies in taking advantage of git hook and the precommit , which is one of those. A good resource of achieving