Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-urbanladder

pastelsky12ISC0.0.1

A set of rules for enforcing naming conventions and coding styles specific to Urban Ladder

eslint, eslintplugin, eslint-plugin

readme

eslint-plugin-urbanladder

A set of rules for enforcing naming conventions and coding styles specific to Urban Ladder.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-urbanladder:

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

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-urbanladder globally.

Usage

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

{
    "plugins": [
        "urbanladder"
    ]
}

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

{
    "rules": {
        "urbanladder/analytics-event-naming": 2
    }
}

or you can choose to enable rules for particular files by adding

/* eslint-enable urbanladder/analytics-event-naming */

var foo = 1
...

Supported Rules

  • urbanladder/analytics-event-naming - Make sure event categories, actions and label literals follow the event naming convention. Enable this rule in files that contain the categories, actions and labels for it to take effect.
// error
const categories = {
  HOME: 'Home'
}

const categories = {
  HOME: 'home_page'
}

// correct

const categories = {
  HOME: 'home'
}