Skip to content

Instantly share code, notes, and snippets.

@sunnylqm
Created August 18, 2016 15:21
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save sunnylqm/819173a40c7b2097b0c0c7c74ecab5a5 to your computer and use it in GitHub Desktop.
Save sunnylqm/819173a40c7b2097b0c0c7c74ecab5a5 to your computer and use it in GitHub Desktop.
eslint for reactnative
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"mocha": true
},
"rules": {
// Disable for __DEV__, __SERVER__ usage.
"no-undef" : 0,
// Disable for console/alert
"no-console": 0,
"no-alert": 0,
"indent": [2, 2, {"SwitchCase": 1}]
},
"plugins": [
"react", "import"
],
"settings": {
"import/parser": "babel-eslint",
"import/resolve": {
"moduleDirectory": ["node_modules", "src"]
}
},
"globals": {
"__DEV__": true
}
}
@freedomct
Copy link

"globals": {
"DEV": true
}
cannot parse checkstyle xml
最后如果加这个 就报错 解析不了 XML 是我哪里配置出错了吗???

@neo-6
Copy link

neo-6 commented Mar 8, 2018

DEV两边少了__,应该是"DEV": true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment