eslint-plugin-momentum

ESLint Plugin to enforce Momentum Design System

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-momentum
0.0.25 years ago5 years agoMinified + gzip package size for eslint-plugin-momentum in KB

Readme

eslint-plugin-momentum
ESLint Plugin to enforce Momentum Design System

Installation

First, make sure that you have ESLint installed in your project:
$ yarn add eslint --dev

Then, you can simply install eslint-plugin-momentum:
$ yarn add eslint-plugin-momentum --dev

Usage

Add eslint-plugin-momentum at your .eslintrc config file.
{
  "plugins": ["momentum"]
}

Then, you can add any available rules. For example, if you want to add import-from-index rule, simply declare it at rules section:
{
  "rules": {
    "momentum/import-from-index": "error"
  }
}

Rules

Publishing

This section is applicable only for @traveloka/district-core and @traveloka/momentum-wg members

To publish the package, run this command on the package root directory.
Note: Make sure to stash or commit your uncommited changes. This command will make you push a tag and a commit directly to the master branch of traveloka/eslint-plugin-momentum repo.

yarn publish:git [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
# make sure everything is right before pushing it into upstream
git push upstream master --follow-tags # Push the commit and tag directly to upstream

References