简体   繁体   中英

How to lint deprecated JavaScript methods in Sublime Text?

I use SublimeLinter everyday for linting JavaScript using Sublime Linter. And I don't know is it possible to use it not for syntax check, but for deprecated methods check too.

For example, when I see an object MyDeprectedObject or a method obj.deprecatedMethod it should show me an error.

I have seen jslint/jshint, eslint and seems like it's not possible to use them for my needs at the moment.

Have you seen a tool I'm looking for? How are you doing deprecated methods/objects check?

ESlint allows you to easily create custom rules. You can create one to check for the names of the objects/properties and display custom errors. You can take a look at any of the existing rules for an example of how to create your own. Here's also a nice tutorial to creating custom rules: https://gist.github.com/jareware/7179093

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM