Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit 6388fba

Browse files
committed
fix build and eslint
1 parent 0506b49 commit 6388fba

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'plugin:@typescript-eslint/recommended',
5+
'plugin:react/recommended',
6+
],
7+
parserOptions: {
8+
ecmaVersion: 2018,
9+
sourceType: 'module',
10+
},
11+
plugins: ['react-hooks'],
12+
rules: {
13+
curly: 'error',
14+
'@typescript-eslint/indent': 'off',
15+
'@typescript-eslint/no-non-null-assertion': 'off',
16+
'@typescript-eslint/no-explicit-any': 'off',
17+
'@typescript-eslint/explicit-function-return-type': 'off',
18+
'@typescript-eslint/no-object-literal-type-assertion': 'off',
19+
'react-hooks/rules-of-hooks': 'error',
20+
'react-hooks/exhaustive-deps': 'error',
21+
},
22+
settings: {
23+
react: {
24+
pragma: 'React',
25+
version: '16.9',
26+
},
27+
},
28+
};

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
"license": "MIT",
99
"types": "dist/index.d.ts",
1010
"scripts": {
11+
"clean": "rm -rf dist",
1112
"build": "rollup -c",
1213
"prettier": "prettier --write './src/**/*.ts' './src/**/*.tsx' --config ./.prettierrc",
1314
"lint": "yarn lint:check --fix && yarn prettier",
14-
"lint:check": "eslint ./src --ext .jsx,.ts --ignore-pattern *.test.ts --report-unused-disable-directives",
15+
"lint:check": "eslint ./src --ext .tsx,.ts --ignore-pattern *.test.ts --report-unused-disable-directives",
1516
"postrelease": "yarn publish && git push --follow-tags",
16-
"prepublishOnly": "yarn lint && yarn test && yarn run clean && yarn build"
17+
"prepublishOnly": "yarn lint && yarn run clean && yarn build"
1718
},
1819
"devDependencies": {
1920
"@testing-library/react": "^9.3.2",

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ const HookFormInput = (props: Props) => {
4343
});
4444
};
4545

46-
47-
export { HookFormInput }
46+
export { HookFormInput };

0 commit comments

Comments
 (0)