3.0.0 • Published 2 years ago

eslint-plugin-ngxs-style-guide v3.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
2 years ago

eslint-plugin-ngxs-style-guide

ESLint rules for ngxs state manager.

Install

npm install --save-dev eslint-plugin-ngxs-style-guide

Usage

Configure it in your configuration file:

  1. Add to plugins section:
ngxs-style-guide
  1. Add to extends section (optional):
plugin:ngxs-style-guide/recommended
  1. Configure rules

Rules

NGXS style guide - https://www.ngxs.io/recipes/style-guide

  • ngxs-style-guide/state-suffix A state should always be suffixed with the word State. Right: ZooState Wrong: Zoo
  • ngxs-style-guide/state-filenames States should have a .state.ts suffix for the filename
  • ngxs-style-guide/state-interfaces State interfaces should be named the name of the state followed by the Model suffix
  • ngxs-style-guide/select-suffix Selects should have a $ suffix
  • ngxs-style-guide/action-suffixes Actions should NOT have a suffix
  • ngxs-style-guide/plugin-suffix Plugins should end with the Plugin suffix

Other rules

Todo

  • return observable from action
  • selector inject it must be after @State({ name: 'supplier', defaults: defaultState, }) @Injectable({ providedIn: 'root' })
3.0.0

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.3.0

4 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago