Javascript eslint

From wikinotes

A linter for javascript/jsx.

Documentation

home https://eslint.org/
official docs https://eslint.org/docs/latest/
cli docs https://eslint.org/docs/latest/user-guide/command-line-interface
eslint configure comments (disable rules) https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments

Locations

${PROJECT}/.eslintrc config

Usage

npx eslint  ${optional_file_dir_or_glob}

Configure Comments

You can enable/disable linter-rules with comments

// eslint-disable-next-line rule-name-1, rule-name-2

console.log("hi there");  // eslint-disable-line no-console

// eslint-disable rule-name
// eslint-enable rule-name