mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
8a3a759db512c1c958e92f5f4dee83b3ee780ce2
ESLint-plugin-Meteor
Meteor specific linting rules for ESLint
Installation
Install ESLint either locally or globally.
$ npm install eslint
If you installed ESLint globally, you have to install Meteor plugin globally too. Otherwise, install it locally.
$ npm install eslint-plugin-meteor
Configuration
Add plugins section and specify ESLint-plugin-Meteor as a plugin.
{
"plugins": [
"meteor"
]
}
Finally, enable all of the rules that you would like to use.
{
"rules": {
"meteor/no-session": 2,
"meteor/no-blaze-lifecycle-assignment": 2,
"meteor/no-blaze-zero-timeout": 2,
"meteor/audit-argument-checks": 2,
"meteor/pubsub": 2
}
}
For a more thorough introduction, read setting up a Meteor project.
List of supported rules
- no-session: Prevent usage of Session
- no-blaze-lifecycle-assignment: Prevent deprecated template lifecycle callback assignments
- no-zero-timeout: Prevent usage of Meteor.setTimeout with zero delay
- audit-argument-checks: Enforce check on all arguments passed to methods and publish functions
- pubsub: Prevent misusage of Publish and Subscribe
To Do
- Implement basic rules for Meteor API
Contributing
Read about set up of the development environment.
Essential Development Resources
These specs and tools help enormously when developing new rules.
Thanks
This plugin is inspired by eslint-plugin-react.
License
ESLint-plugin-Meteor is licensed under the MIT License.
Languages
JavaScript
91.1%
TypeScript
3.9%
Shell
0.9%
Java
0.7%
Swift
0.7%
Other
2.5%