Skip to content

Instantly share code, notes, and snippets.

@dferber90
Last active June 21, 2019 13:27
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dferber90/1055222bc02358d03a40 to your computer and use it in GitHub Desktop.
Save dferber90/1055222bc02358d03a40 to your computer and use it in GitHub Desktop.
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