eslint-plugin-parse
v0.0.5
Published
ESLint rules for Parse
Downloads
6
Maintainers
Readme
eslint-plugin-parse
ESLint plugin for working with Parse.
Installation
Install ESLint either locally or globally.
$ npm install eslintIf you installed ESLint globally, you have to install Parse plugin globally too. Otherwise, install it locally.
$ npm install eslint-plugin-parseConfiguration
Add to plugins section parse on .eslintrc.
{
"plugins": [
"parse"
]
}After that, you can enable / disable rules by need, the default is:
{
"rules": {
"parse/does-not-exist": 2,
"parse/global-master": 1,
"parse/no-not-query": 2,
"parse/no-parse-promise-assign": 1,
"parse/no-promise-always": 1,
"parse/no-slow-query": 1,
"parse/prefer-parse-promise": 1,
"parse/save-with-master": 2
}
}List of supported rules
- does-not-exist: Prevent the use of slow
Parse.Query#doesNotExist - global-master: Prevent the use of
Parse.Cloud.useMasterKey() - no-not-query: Prevent the use of "not query" functions of
Parse.Query - no-parse-promise-assign: Prevent assigning a variable from a
Parse.Promiseinstance - no-promise-always: Prevent the use of
Parse.Promise#always - no-slow-query: Prevent the use of slow
Parse.Queryfunctions - prefer-parse-promise: Prevent the use of
success/errorscallbacks instead ofParse.Promise - save-with-master: Prevent creating a
useMasterKeyproperty by mistake when saving
License
eslint-plugin-parse is licensed under the MIT License.
