Skip to content

It is a sublime plugin for JavaScript code analysis based on ESlint linting tool

License

Notifications You must be signed in to change notification settings

EslintSublimePlugin/JSubLint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Sublime Linter

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

Basic

  • 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)

Advanced

  • Creating custom rules
  • Environment for testing of custom rules
  • Importing custom rules into production or standard rules

License

Apache License, Version 2.0

Dependencies

Java : version >= 1.8.x
Node : version >= 5.x.x
Note : Make sure java and node is available in the path

Installation

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.. :)

Usage

  • Click on Tools in Sublime Text window
  • Click on JSAnalyser

Functionalities of each command can be described as follow :

Basic

Basic functionality is given to deal with iterative tasks of dealing with js code analysis. It will cover all aspects of Javascript linting.

1. Run analyser on JS file

      It will run eslint code analysis on current working js file and will present with results in accordance with rules described in configuration file.              

2. Configure Rules

      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.

3. Import your custom Rules file

      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.

4. Reset the configuration ( switch back to default configuration )

       It is used to reset configuration file to default. The eslint will reflect warnings and errors on the basis of recommended default rules.                

Advanced

Advanced functionality is provided to deal with custom rules. It provides environment for testing and deployment of custom rules

5. Create Rule

       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.

6. Select and Test Rule

      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.

7. Test Rule

      It will run analysis on active js file with earlier selected custom rule configuration.

8. Import Rule

       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.

About

It is a sublime plugin for JavaScript code analysis based on ESlint linting tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published