Created
March 2, 2016 02:40
-
-
Save honewatson/fdcfefb49093a126ab00 to your computer and use it in GitHub Desktop.
Eslint Example For Vim with es6 babel-eslint parser
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
// Eslint npm install eslint-plugin-babel -D && ln -s node_modules/eslint/bin/eslint.js eslint | |
// Also the dependency for .vimrc | |
/* | |
let g:syntastic_javascript_checkers = ['eslint'] | |
" Override eslint with local version where necessary. | |
let local_eslint = finddir('node_modules', '.;') . '/.bin/eslint' | |
if matchstr(local_eslint, "^\/\\w") == '' | |
let local_eslint = getcwd() . "/" . local_eslint | |
endif | |
if executable(local_eslint) | |
let g:syntastic_javascript_eslint_exec = local_eslint | |
endif | |
*/ | |
{ | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true, | |
"templateStrings": true | |
}, | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"parser": "babel-eslint", | |
"rules": { | |
"quotes": [2, "single"], | |
"strict": [2, "never"], | |
"babel/generator-star-spacing": 1, | |
"babel/new-cap": 1, | |
"babel/object-shorthand": 1, | |
"babel/arrow-parens": 1, | |
"babel/no-await-in-loop": 1, | |
"react/jsx-uses-react": 2, | |
"react/jsx-uses-vars": 2, | |
"react/react-in-jsx-scope": 2 | |
}, | |
"plugins": [ | |
"babel", | |
"react" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment