-
-
Save ktpm489/d164de0bace161ecce8be7ad7f606710 to your computer and use it in GitHub Desktop.
Prettier + ESLint for React Native
This file contains hidden or 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
{ | |
"extends": [ | |
"plugin:flowtype/recommended", | |
"plugin:react/recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings", | |
"prettier", | |
"prettier/flowtype", | |
"prettier/react" | |
], | |
"plugins": ["flowtype", "react", "prettier"], | |
"globals": { | |
"document": false | |
}, | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true, | |
"experimentalDecorators": true | |
} | |
}, | |
"env": { | |
"jest": true, | |
"node": true | |
}, | |
"rules": { | |
"no-unused-vars": 1, | |
"no-duplicate-imports": 0, | |
"import/no-duplicates": 2, | |
"import/named": 0, | |
"import/no-unresolved": 0, | |
"react/prop-types": [1, { "skipUndeclared": true }], | |
"react/display-name": 0 | |
} | |
} |
This file contains hidden or 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
{ | |
"printWidth": 100, | |
"trailingComma": "es5", | |
"singleQuote": true | |
} |
This file contains hidden or 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
{ | |
"name": "ReactNativePrettier", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node node_modules/react-native/local-cli/cli.js start", | |
"test": "jest", | |
"precommit": "lint-staged" | |
}, | |
"dependencies": { | |
"react": "16.3.1", | |
"react-native": "0.55.4" | |
}, | |
"devDependencies": { | |
"babel-eslint": "^8.2.3", | |
"babel-jest": "23.0.0", | |
"babel-preset-react-native": "4.0.0", | |
"eslint": "^4.19.1", | |
"eslint-config-prettier": "^2.9.0", | |
"eslint-plugin-babel": "^5.1.0", | |
"eslint-plugin-flowtype": "^2.46.3", | |
"eslint-plugin-import": "^2.12.0", | |
"eslint-plugin-prettier": "^2.6.0", | |
"eslint-plugin-react": "^7.8.2", | |
"flow-bin": "^0.67.1", | |
"husky": "^0.14.3", | |
"jest": "23.0.0", | |
"lint-staged": "^7.1.1", | |
"prettier": "^1.12.1", | |
"react-test-renderer": "16.3.1" | |
}, | |
"jest": { | |
"preset": "react-native" | |
}, | |
"lint-staged": { | |
"linters": { | |
"**/*.{js,json,md}": ["eslint --fix", "git add"] | |
}, | |
"ignore": ["package.json"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment