It is a sublime plugin for eslint and used for Javascript code analysis. It allows developers to discover problems with their JavaScript code without executing it. It also presents with user friendly interface which makes it developer easy to find errors and correct them.
Features provided by this sublime plugin
- Realtime Js Linting ( Linting is performed after save event on js file )
- Functionality to create project based configuration file
- Importing configuration file
- Reset configuration to default (It use default global configuration file for linting)
- Creating custom rules
- Environment for testing of custom rules
- Importing custom rules into production or standard rules
Apache License, Version 2.0
Java : version >= 1.8.x
Node : version >= 5.x.x
Note : Make sure java and node is available in the path
step 1. Download all the dependencies Execute following commands in terminal, powershell or CMD
-> npm install -g eslint
-> npm install -g eslint-plugin-angular
-> npm install -g eslint-config-angular
step 2. Download/clone the repository
step 3. copy repository to sublime package location
- Open sublime Text
- click on preferences -> Browse packages
- copy the downloaded package to opened folder in explorer window
Your plugin is now installed successfully.. :)
- Click on Tools in Sublime Text window
- Click on JSAnalyser
Functionalities of each command can be described as follow :
Basic functionality is given to deal with iterative tasks of dealing with js code analysis. It will cover all aspects of Javascript linting.
It will run eslint code analysis on current working js file and will present with results in accordance with rules described in configuration file.
It will open a new window describing available rules with flag of each rule set to default. User can edit each rule. User can also view the documentation on double clicking particular rule. Finish button will generate final project specific configuration file which can be imported later in the same project.
It will open a new window for selecting configuration file generated by earlier command or to select custom configuration file. After file selection, linting will be performed on the basis of newly imported configuration file.
It is used to reset configuration file to default. The eslint will reflect warnings and errors on the basis of recommended default rules.
Advanced functionality is provided to deal with custom rules. It provides environment for testing and deployment of custom rules
It will open a new window asking for custom rule name and description. Based on appropriate information it will generate Custom Rule Template. There will be total 4 files generated along with Custom Rule.
- Rule file
- Test file
- Rule configuration file ( This file has test rule name that needs to be applied on test file)
- Rule metadata file (This file contains basic info. about rule)
All of those files are created and are put under TEST/RULENAME/ directory.
It will open a new window asking for rule to be selected and tested. After selecting specific rule, plugin will run analysis on active js file with selected custom rule configuration.
It will run analysis on active js file with earlier selected custom rule configuration.
This is used for deployment of custom rule to standard set of rules in order to use it in production. It will open a new window asking for rule to be deployed. Once selected, it will copy rule from test folder to standard rule folder.