Skip to content

Commit 51dc856

Browse files
authored
🚨 add eslint react hooks (#32)
1 parent 32b1bcc commit 51dc856

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
'eslint:recommended',
55
'plugin:prettier/recommended',
66
'plugin:react/recommended',
7+
'plugin:react-hooks/recommended',
78
],
89
plugins: ['prettier', 'react-native'],
910
env: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"eslint-config-prettier": "^7.2.0",
5656
"eslint-plugin-prettier": "^3.3.1",
5757
"eslint-plugin-react": "^7.22.0",
58+
"eslint-plugin-react-hooks": "^4.2.0",
5859
"eslint-plugin-react-native": "^3.10.0",
5960
"husky": "^5.0.9",
6061
"jest": "^26.6.3",

src/helpers/typeSafePaddings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SingleSize } from '../types/Padding'
1+
import type { SingleSize } from '../types/Padding'
22

33
export const typeSafePaddings = (padding: SingleSize) => {
44
if (typeof padding === 'string') {

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,6 +3974,11 @@ eslint-plugin-prettier@^3.3.1:
39743974
dependencies:
39753975
prettier-linter-helpers "^1.0.0"
39763976

3977+
eslint-plugin-react-hooks@^4.2.0:
3978+
version "4.2.0"
3979+
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556"
3980+
integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==
3981+
39773982
eslint-plugin-react-native-globals@^0.1.1:
39783983
version "0.1.2"
39793984
resolved "https://registry.yarnpkg.com/eslint-plugin-react-native-globals/-/eslint-plugin-react-native-globals-0.1.2.tgz#ee1348bc2ceb912303ce6bdbd22e2f045ea86ea2"

0 commit comments

Comments
 (0)