linter for javascript code example

Example 1: what is linter javascript

JavaScript Linters. JavaScript linters are
tools that you can use to help you debug your code.
They scan your scripts for common issues and errors, 
  and give you back a report with line numbers that you
  can use to fix things

Example 2: javascript linting

// alternative linting for javascript developer using standard zero configuration follow this step by step
 
1.install standard to development mode - npm i standard -D or install standard to global - npm i standard -g
2.install standard extension for vscode
3.add this configuration to vscode json config
  "standard.enable": true,
  "standard.run": "onSave",
  "standard.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
  "standard.autoFixOnSave": true,
  "standard.engine": "standard",
4. enjoy linting is active