Skip to content

Instantly share code, notes, and snippets.

@rafael84
Created June 10, 2018 20:34
Show Gist options
  • Save rafael84/76911f1da1db8e3e7aca99dbd53c16cb to your computer and use it in GitHub Desktop.
Save rafael84/76911f1da1db8e3e7aca99dbd53c16cb to your computer and use it in GitHub Desktop.
Eslint + Prettier
module.exports = {
env: {
browser: true,
es6: true,
node: true,
"react-native/react-native": true
},
extends: ["plugin:react/recommended"],
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
},
sourceType: "module"
},
plugins: ["react", "react-native"],
rules: {
indent: ["error", "tab"],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "never"],
"react-native/no-unused-styles": 2,
"react-native/split-platform-components": 2,
"react-native/no-inline-styles": 2
}
};
{
"name": "template",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4"
},
"devDependencies": {
"babel-jest": "23.0.1",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.19.1",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"eslint-plugin-react-native": "^3.2.1",
"jest": "23.1.0",
"prettier": "1.13.5",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment