diff --git a/.eslintrc.js b/.eslintrc.js index d36ff91..9abf1ba 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { root: true, parserOptions: { ecmaVersion: 2020, - // project: './tsconfig.eslint.json', + project: './tsconfig.json', }, extends: [ 'airbnb', @@ -18,6 +18,7 @@ module.exports = { plugins: ['compat', 'react-hooks'], rules: { 'compat/compat': 'error', + 'import/prefer-default-export': 'off', 'no-underscore-dangle': 'off', 'react/jsx-filename-extension': 'off', 'react/jsx-props-no-spreading': 'off', @@ -25,6 +26,7 @@ module.exports = { 'react/require-default-props': 'off', 'react/prop-types': 'off', 'react-hooks/rules-of-hooks': 'error', + "react-hooks/exhaustive-deps": "warn", 'jsx-a11y/click-events-have-key-events': 'off', 'jsx-a11y/label-has-associated-control': 'off', 'jsx-a11y/label-has-for': 'off', diff --git a/jest.setup.ts b/jest.setup.ts index aa5a853..33b2c72 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -1,2 +1,3 @@ +/* eslint-disable import/no-extraneous-dependencies */ // https://github.com/testing-library/jest-dom import '@testing-library/jest-dom/extend-expect'; diff --git a/src/utils/canUse.ts b/src/utils/canUse.ts index fd52be9..250d49c 100644 --- a/src/utils/canUse.ts +++ b/src/utils/canUse.ts @@ -15,12 +15,8 @@ const testCache = { } return supportsPassive; }, - smoothScroll: () => { - return 'scrollBehavior' in document.documentElement.style; - }, - touch: () => { - return 'ontouchstart' in window; - }, + smoothScroll: () => 'scrollBehavior' in document.documentElement.style, + touch: () => 'ontouchstart' in window, }; export function addTest(name: string, test: Function) { diff --git a/src/utils/importScript.tsx b/src/utils/importScript.ts similarity index 100% rename from src/utils/importScript.tsx rename to src/utils/importScript.ts diff --git a/src/utils/style.ts b/src/utils/style.ts index 2c8d2d9..8be422a 100644 --- a/src/utils/style.ts +++ b/src/utils/style.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-param-reassign */ export const setTransform = (el: HTMLElement, value: string) => { el.style.transform = value; el.style.webkitTransform = value; diff --git a/tsconfig.json b/tsconfig.json index cb9344a..8eef9f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -35,6 +35,5 @@ }, /* File Inclusion */ - "exclude": ["node_modules", "dist", "es", "lib"], - "include": ["src", "types"], + "exclude": ["node_modules", "dist", "es", "lib", "./*.js"] }