Last active
January 7, 2019 22:10
-
-
Save YannickLeRoux/9cdf7555bfea964a6f9c693fe3fa0082 to your computer and use it in GitHub Desktop.
My Eslint config file to work with React Native
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
// npm install -g eslint | |
// eslint --init | |
module.exports = { | |
"extends": "airbnb", | |
"env": { | |
"browser": true, | |
"node": true, | |
"mocha": true | |
}, | |
"rules": { | |
"new-cap": [2, { | |
"capIsNewExceptions": ["List", "Map", "Set"] | |
}], | |
"react/no-multi-comp": 0, | |
"import/default": 0, | |
"import/no-duplicates": 0, | |
"import/named": 0, | |
"import/namespace": 0, | |
"import/no-unresolved": 0, | |
"import/no-named-as-default": 2, | |
"comma-dangle": 0, // not sure why airbnb turned this on. gross! | |
"indent": [2, 2, { | |
"SwitchCase": 1 | |
}], | |
"no-console": 0, | |
"no-alert": 0, | |
"linebreak-style": 0, | |
"react/prefer-stateless-function": "off", | |
"react/jsx-filename-extension": [1, { | |
"extensions": [".js", ".jsx"] | |
}] | |
}, | |
"plugins": [ | |
"react", "import" | |
], | |
"settings": { | |
"import/parser": "babel-eslint", | |
"import/resolve": { | |
"moduleDirectory": ["node_modules", "src"] | |
} | |
}, | |
"globals": { | |
"__DEVELOPMENT__": true, | |
"__CLIENT__": true, | |
"__SERVER__": true, | |
"__DISABLE_SSR__": true, | |
"__DEVTOOLS__": true, | |
"socket": true, | |
"webpackIsomorphicTools": true | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment