Skip to content

Commit

Permalink
Update react plugins (#8)
Browse files Browse the repository at this point in the history
Update react plugins
  • Loading branch information
Bogdans authored Aug 13, 2019
2 parents 1837f27 + 21f0e63 commit 103af55
Show file tree
Hide file tree
Showing 3 changed files with 308 additions and 183 deletions.
19 changes: 11 additions & 8 deletions eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ plugins:
- react
- babel
- import
- react-hooks

settings:
import/resolver:
eslint-config-ttn/resolver:
alias:
"~": src
react:
version: detect

# enable all language features
parserOptions:
Expand Down Expand Up @@ -102,10 +105,7 @@ parserOptions:
rules:
# Handles destructuring arrays with flow type in function parameters
array-bracket-spacing:
- error
- always
- arraysInArrays: false
objectsInArrays: false
- off

# Enforce return statements in callbacks of array’s methods
array-callback-return:
Expand All @@ -127,10 +127,7 @@ rules:

# Correct spacing inside objects
babel/object-curly-spacing:
- error
- always
- arraysInObjects: false
objectsInObjects: false
- off

# Guard against awaiting async functions inside of a loop
no-await-in-loop:
Expand Down Expand Up @@ -633,4 +630,10 @@ rules:
- error
- both

# checks rules of hooks
react-hooks/rules-of-hooks: error

# checks effect dependencies
react-hooks/exhaustive-deps: warn

# vim: ft=yaml
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "eslint-config-ttn",
"version": "1.3.8",
"version": "1.4.0",
"description": "Eslint config for use within The Things Network",
"main": "index.js",
"author": "Romeo Van Snick <[email protected]>",
"license": "MIT",
"dependencies": {
"babel-eslint": "^10.0.1",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-react": "^7.11.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.7.0",
"js-yaml": "^3.13.1"
}
}
Loading

0 comments on commit 103af55

Please sign in to comment.