2.4.3 • Published 3 years ago

eslint-plugin-belgradian v2.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

eslint-plugin-belgradian

The plugin is supposed to help write elements in cascalCase and prefix them with a scope:

  • m_ for field members
  • g_ for global variables (outside of the Module or Class)

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-belgradian:

$ npm install eslint-plugin-belgradian --save-dev

Basic usage

Add belgradian to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["belgradian"]
}

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

{
  "rules": {
    "belgradian/member-prefix-rule": "error"
  }
}

Or:

{
  "rules": {
    "belgradian/member-prefix-rule": [
		2, 
		{ "include": ["g_"], "exceptions": ["reservedVariable"] }
	]
  }
}

Inspired by Sander Verweij's budapestian.