Kuzzle Coding Standard
npm install eslint-plugin-kuzzleKuzzle Coding Standard.
This plugin is standalone, meaning that eslint and prettier are included in the package so you don't need to install them yourself.
1) Install the plugin
``sh`
npm i eslint-plugin-kuzzle --save-dev
2) Add kuzzle to the plugins section of your .eslintrc configuration file and select the default rule set:
`json`
{
"extends": [
"plugin:kuzzle/default",
"plugin:kuzzle/node",
"plugin:kuzzle/typescript"
]
}
3) Remove unused eslint-related dependencies (such as @typescript-eslint/eslint-plugin, eslint etc)
4) Commit relevant files
- plugin:kuzzle/default: default rules between all javascript projectsplugin:kuzzle/node
- : rules for Node.js projectsplugin:kuzzle/typescript
- : rules for Typescript projects
You can disable the sort-keys rule on project that are not libraries:
`json``
{
"extends": [
"plugin:kuzzle/default",
"plugin:kuzzle/node",
"plugin:kuzzle/typescript"
],
"rules": {
"sort-keys": ["off"]
}
}