Extending jshint with custom checks

前端 未结 2 2110
一整个雨季
一整个雨季 2021-02-20 05:49

In the Python world there are multiple static code analysis tools that can be easily extended with custom checks via writing plugins or extensions, for example:

相关标签:
2条回答
  • 2021-02-20 05:56

    The ability to create custom JSHint rules has been discussed on the JSHint Google group, but that thread has had no activity in 17 months. Your only at this time is to use ESLint. ESLint was created with the explicit purpose of making each of the JSHint rules pluggable, and I think at this time, every JSHint rules is available in ESLint.

    0 讨论(0)
  • 2021-02-20 05:57

    If I were you I would try to use something like ESLint. The ES stands for ECMAScript, which is where the rules for the JS language come from. Every single rule in ESLint is standalone (so you can use what you like), and you can use the default rules as a guideline or skeleton to create your own rule and plug it in.

    Try ESLint.

    0 讨论(0)
提交回复
热议问题