Skip to content

Commit

Permalink
chore(eslint): add parserOptions.project
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Jan 18, 2021
1 parent 4961f54 commit 84ffb1e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2020,
// project: './tsconfig.eslint.json',
project: './tsconfig.json',
},
extends: [
'airbnb',
Expand All @@ -18,13 +18,15 @@ 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',
'react/no-array-index-key': 'off',
'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',
Expand Down
1 change: 1 addition & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies */
// https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
8 changes: 2 additions & 6 deletions src/utils/canUse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/utils/style.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-param-reassign */
export const setTransform = (el: HTMLElement, value: string) => {
el.style.transform = value;
el.style.webkitTransform = value;
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
},

/* File Inclusion */
"exclude": ["node_modules", "dist", "es", "lib"],
"include": ["src", "types"],
"exclude": ["node_modules", "dist", "es", "lib", "./*.js"]
}

0 comments on commit 84ffb1e

Please sign in to comment.