ESLint Plugin to enforce Momentum Design System
npm install eslint-plugin-momentumESLint Plugin to enforce Momentum Design System
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
Add eslint-plugin-momentum at your .eslintrc config file.`json`
{
"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:`json`
{
"rules": {
"momentum/import-from-index": "error"
}
}
> 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.
`bash``
yarn publish: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
- Talks