2.1.0 • Published 4 years ago
eslint-config-justinneff-ts-react v2.1.0
ESLint and Prettier Presets for Typescript + ReactJS
These are the ESLint and Prettier settings I like to use for Typescript and Typescript React projects.
Installing
- Ensure you have 
package.jsonfile - Install 
eslint-config-justinneff-ts-reactand it's peer dependencies. (This command works with yarn too) 
npx install-peerdeps -D eslint-config-justinneff-ts-react- Create a 
.eslintrcfile in the root of your project that looks like this: 
{
	"extends": ["justinneff-ts-react"]
}- Create a 
.prettierrcfile in the root of your project. These are the default settings I use: 
{
	"arrowParens": "always",
	"bracketSpacing": true,
	"jsxSingleQuote": false,
	"semi": false,
	"singleQuote": true,
	"tabWidth": 2,
	"trailingComma": "all",
	"useTabs": true
}- You can also add these scripts to the 
package.jsonfile to give you simple commands for linting and fixing files. 
"scripts": {
  "lint": "eslint .",
  "lint:fix": "eslint . --fix"
},