Skip to content

Commit

Permalink
Configure eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmi Linkola committed Nov 20, 2019
1 parent 4a926ef commit f81b1cc
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 5 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/prop-types": 0
}
}
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react": "16.12.0",
"react-dom": "16.12.0"
},
"devDependencies": {
"eslint": "6.6.0",
"eslint-plugin-react": "7.16.0",
"husky": "^3.1.0",
"prettier": "1.19.1",
"pretty-quick": "^2.0.1",
"react-scripts": "3.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"lint": "eslint src",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand All @@ -29,5 +35,10 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
Loading

0 comments on commit f81b1cc

Please sign in to comment.