Skip to content

A plugin for the ESLint linter that adds more naming conventions for variables and functions. Forked from https://www.npmjs.com/package/eslint-plugin-travel-planet.

Notifications You must be signed in to change notification settings

4nds/eslint-plugin-travel-planet

Repository files navigation

tp-lint

tp-lint is a plugin for the ESLint JavaScript linting utility. It introduces rules that add more naming conventions for variables, functions, classes, and methods.

Setup

  1. Open up a terminal or command prompt in the project to lint.
  2. Follow the instructions to install ESLint here.
  3. Install @developpement/tp-lint with the NPM package manager:
npm install @developpement/tp-lint
  1. Follow the instructions to add the plugin to your configuration file here.
  2. Follow the instructions to add the plugin rules to your configuration file here.

Then configure the rules you want to use under the rules section.

Rules

All rules support fixing errors automatically.

snake-case-variables

snake-case-variables ensures that all variables defined are in snake case, consisting of all lower case letters, with words separated by underscores (_s).

Good:

  • variable_name
  • variable
  • CONSTANT_NAME
  • ClassName (For when the old class syntax is used for defining a class.)

Bad:

  • variableName

camel-case-functions

camel-case-functions ensures that all functions, classes, and methods defined are in camel case, consisting of lower and upper case letters, with words separated by the letter changing to upper case.

Good:

  • variableName
  • variable

Bad:

  • variable_name

Releases

No releases published

Packages

No packages published