Created
July 29, 2019 07:23
-
-
Save kevinrodriguez-io/fb5eda739b94e43fd07d13cccb2ef0ce to your computer and use it in GitHub Desktop.
NextJS / React ESLINT + TS + PRETTIER SETUP
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
// .eslintrc.js | |
module.exports = { | |
parser: '@typescript-eslint/parser', | |
extends: [ | |
'plugin:@typescript-eslint/recommended', | |
'prettier/@typescript-eslint', | |
'react-app', | |
'plugin:prettier/recommended', | |
], | |
plugins: ['@typescript-eslint', 'react'], | |
rules: {}, | |
}; | |
// .prettierrc.js | |
module.exports = { | |
useTabs: false, | |
printWidth: 80, | |
singleQuote: true, | |
trailingComma: 'es5', | |
jsxBracketSameLine: true, | |
noSemi: false | |
}; | |
// Dev dependencies in package.json | |
"devDependencies": { | |
"@typescript-eslint/eslint-plugin": "^1.13.0", | |
"@typescript-eslint/parser": "^1.13.0", | |
"babel-eslint": "^10.0.2", | |
"eslint": "^5.16.0", | |
"eslint-config-prettier": "^6.0.0", | |
"eslint-config-react-app": "^4.0.1", | |
"eslint-plugin-flowtype": "^2", | |
"eslint-plugin-import": "^2.18.2", | |
"eslint-plugin-jsx-a11y": "^6.2.3", | |
"eslint-plugin-prettier": "^3.1.0", | |
"eslint-plugin-react": "^7.14.3", | |
"eslint-plugin-react-hooks": "^1.6.1", | |
"prettier": "^1.18.2", | |
"typescript": "^3.5.3", | |
"webpack": "^4.38.0" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment