A limiting toll helps to avoid silly mistakes when writing Java scripts. A good listing tool or a lender will indicate to avoid the write the wrong typing of of a variable name or incorrectly or to make syntax errors and. A good listing tool can also help make sure a project adheres to a coding standard.
These are the available linters here: JSLINT, JSHINT, JSCS AND ESLINT.
JSLINT:-
Pros:-
- Comes configured and ready to go
- Cons:-
- JSLint doesn’t have a configuration file, that may create a problem on changing the setting
- Limited number of configuration options, many rules cannot be disabled
- You can’t add custom rules
- Undocumented features
- Difficult to know which rule is causing which error
JSHINT:-
Pros
- Most settings can be configured
- Supports a configuration file, making it easier to use in larger projects Cons
- Difficult to know which rule is causing an error
- Has two types of option: enforcing and relaxing (which can be used to make JSHINT stricter, or to suppress its warnings). This can make configuration slightly confusing
- No custom rule support
JSCS:-
Pros
- Supports custom reporters, which can make it easier to integrate with other tools
- Presets and ready-made configuration files can make it easy to set up if you follow one of the available coding styles
- Has a flag to include rule names in reports, so it’s easy to figure out which rule is causing which error
- Can be extended with custom plugins
- Cons
- Only detects coding style violations. JSCS doesn’t detect potential bugs such as unused variables, or accidental global s, etc.
- Slowest of the four, but this is not a problem in typical use
ESLINT:-
Pros
- Flexible: any rule can be toggled, and many rules have extra settings that can be tweaked
- Very extensible and has many plugins available
- Easy to understand output
- Includes many rules not available in other linters, making ESLint more useful for detecting problems
- Best ES6 support, and also the only tool to support JSX
- Supports custom reporters
- Cons
- Some configuration required slow, but not a hindrance

Blogger Comment
Facebook Comment