export PKG=eslint-config-airbnb;
npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs sudo npm install --global "$PKG"
~/.eslintrc
를 생성하고 다음 내용을 입력{
"extends": "airbnb",
"globals": {
"_": true,
"$": true,
}
}
~/.eslintrc
를 생성Vundle
과 Syntastic
Plugin 설치
.vimrc
에 Syntastic
설정 추가
let g:syntastic_javascript_checkers = ['eslint']
Syntastic
+ eslint
+ es6,airbnb 컨벤션 적용된 모습
만약 뭔가 잘 안된다면 vim 내에서 :SyntasticInfo
명령어로 eslint
가 잘 잡혀있는지 확인해 볼 수 있다.