Skip to content

Commit

Permalink
Adds eslint and configuration
Browse files Browse the repository at this point in the history
For #13
  • Loading branch information
matthewgrill authored and justafish committed Nov 2, 2019
1 parent 44e5411 commit 281f7e6
Show file tree
Hide file tree
Showing 3 changed files with 606 additions and 20 deletions.
43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"prettier": "prettier --write vfancy/**/*.js component/**/*.js"
},
"devDependencies": {
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^2.2.0",
"parcel": "^1.12.4",
"prettier": "^1.18.2"
},
Expand All @@ -18,6 +24,43 @@
"react": "^16.11.0",
"react-dom": "^16.11.0"
},
"eslintConfig": {
"env": {
"browser": true,
"es6": true
},
"parserOptions": {
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"react-hooks",
"jsx-a11y"
],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
],
"react/prop-types": [
"off"
],
"react/display-name": [
"off"
]
}
},
"prettier": {
"trailingComma": "es5",
"tabWidth": 2,
Expand Down
4 changes: 2 additions & 2 deletions vfancy/src/component/Example/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

function Example(props) {
return <h1>Hello, {props.name}</h1>;
return <h1>Hello, {props.name}</h1>;
}

export default Example
export default Example;
Loading

0 comments on commit 281f7e6

Please sign in to comment.