Skip to content

Commit 84ffb1e

Browse files
committed
chore(eslint): add parserOptions.project
1 parent 4961f54 commit 84ffb1e

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
root: true,
33
parserOptions: {
44
ecmaVersion: 2020,
5-
// project: './tsconfig.eslint.json',
5+
project: './tsconfig.json',
66
},
77
extends: [
88
'airbnb',
@@ -18,13 +18,15 @@ module.exports = {
1818
plugins: ['compat', 'react-hooks'],
1919
rules: {
2020
'compat/compat': 'error',
21+
'import/prefer-default-export': 'off',
2122
'no-underscore-dangle': 'off',
2223
'react/jsx-filename-extension': 'off',
2324
'react/jsx-props-no-spreading': 'off',
2425
'react/no-array-index-key': 'off',
2526
'react/require-default-props': 'off',
2627
'react/prop-types': 'off',
2728
'react-hooks/rules-of-hooks': 'error',
29+
"react-hooks/exhaustive-deps": "warn",
2830
'jsx-a11y/click-events-have-key-events': 'off',
2931
'jsx-a11y/label-has-associated-control': 'off',
3032
'jsx-a11y/label-has-for': 'off',

jest.setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
// https://github.com/testing-library/jest-dom
23
import '@testing-library/jest-dom/extend-expect';

src/utils/canUse.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ const testCache = {
1515
}
1616
return supportsPassive;
1717
},
18-
smoothScroll: () => {
19-
return 'scrollBehavior' in document.documentElement.style;
20-
},
21-
touch: () => {
22-
return 'ontouchstart' in window;
23-
},
18+
smoothScroll: () => 'scrollBehavior' in document.documentElement.style,
19+
touch: () => 'ontouchstart' in window,
2420
};
2521

2622
export function addTest(name: string, test: Function) {
File renamed without changes.

src/utils/style.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-param-reassign */
12
export const setTransform = (el: HTMLElement, value: string) => {
23
el.style.transform = value;
34
el.style.webkitTransform = value;

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@
3535
},
3636

3737
/* File Inclusion */
38-
"exclude": ["node_modules", "dist", "es", "lib"],
39-
"include": ["src", "types"],
38+
"exclude": ["node_modules", "dist", "es", "lib", "./*.js"]
4039
}

0 commit comments

Comments
 (0)