Mouette
Mouette is a linter for your MongoDB.
Try it out
yarn global add mouette
mouette lint --summary mongodb://...
mouette lint mongodb://...
To see all functions, run mouette --help
Rules
Features
- Completely schemaless, mouette needs no information about your db to run.
- Suggests fixes when possible
- Prints queries ready to be pasted into the MongoDB shell that print all the documents that need fixing
- Includes a diffing function that can be used to find all rule violations that were added since your last lint
Develop
git clone https://github.com/jsoendermann/mouette/
cd mouette
yarn
npm run watch
node dist/bin/mouette.js lint <your mongodb://...>
Add a new rule
- Copy
src/rules/_RULE_TEMPLATE.ts
to a new file in the src/rules/
folder. - Follow the instructions in that file to implement your rule.
- Add default options for your new rule to
defaultConfig.toml
. - Write tests and add them to the
__tests__/rules/
folder. - Send me a pull request and share your new rule with the world.