Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example setup of ESLint-plugin-Meteor with AirBnB's code style
# enable ES6
parserOptions:
ecmaVersion: 6
sourceType: "module"
ecmaFeatures:
jsx: true # enable React's JSX
# register plugins
plugins:
- meteor
# use the rules of eslint-config-airbnb
# and the recommended rules of eslint-plugin-meteor
extends:
- airbnb/base
- plugin:meteor/recommended
# registerenvironments
env:
meteor: true
browser: true
node: true
rules:
# overwrite some rules (avoid semicolons)
semi: [2, 'never']
no-unexpected-multiline: 2
no-throw-literal: 0
# eslint-plugin-meteor
meteor/no-session: [0] # allow Session
meteor/prefer-session-equals: [2] # prefer Session.equals instead
globals:
# collections
Foo: false
Bar: false
# packages
FlowRouter: false # kadira:flow-router
GoogleMaps: false # dburles:google-maps
moment: false # momentjs:moment
{
"name": "your-meteor-project",
"private": true,
"devDependencies": {
"eslint": "2.3.0",
"eslint-config-airbnb": "6.1.0",
"eslint-plugin-meteor": "3.0.1",
"eslint-plugin-react": "4.0.0"
},
"scripts": {
"lint": "eslint .",
"test": "npm run lint"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.