mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
9ebb7a0ce7559cb944b0fcbdf2fbed71c2f7df9d
ESLint-plugin-Meteor
Meteor specific linting rules for ESLint
This gif shows integration of ESLint-plugin-Meteor into Atom. Find out more in the integration guide.
Quickstart
Installation
Install ESLint and this plugin either locally or globally.
$ npm install eslint --save-dev
$ npm install eslint-plugin-meteor --save-dev
Configuration
Add these keys to your .eslintrc.json file:
{
"plugins": [
"meteor"
],
"extends": [
"plugin:meteor/recommended",
]
}
For a more thorough introduction, read the setup guide.
List of supported rules
Best Practices
- audit-argument-checks: Enforce check on all arguments passed to methods and publish functions
- 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
- blaze-consistent-eventmap-params: Force consistent event handler parameters in event maps
- prefer-session-equals: Prefer
Session.equalsin conditions - template-naming-convention: Naming convention for templates
Core API
- currently no rules implemented
Limitations
ESLint-plugin-Meteor is not aware of where files are going to be executed, to keep the plugin simple. It will not warn when accessing client-only features on the server and vice versa.
Contributing
Read about set up of the development environment.
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%
