-
-
Save orangecms/ff2c37443c5b4637335ba659cf9d6ddf to your computer and use it in GitHub Desktop.
Example setup of ESLint-plugin-Meteor with AirBnB's code style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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