Skip to content

Commit

Permalink
style: Resolve eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thehale committed Jul 28, 2024
1 parent b3c017f commit 4ce6622
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
extends: '@react-native',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['jest', '@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"babel-jest": "^29.6.3",
"dotenv-cli": "^7.2.1",
"eslint": "^8.19.0",
"eslint-plugin-jest": "^28.6.0",
"jest": "^29.2.1",
"prettier": "^2.8.8",
"react-native-svg-app-icon": "^0.6.1",
Expand Down
4 changes: 3 additions & 1 deletion src/components/settings/SettingRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

import React, {useCallback} from 'react';
import {StyleSheet, Text} from 'react-native';

import SettingItem from './SettingItem';
import Slider from '@react-native-community/slider';
import debounce from 'lodash/debounce';
import {useCallback} from 'react';

type Props = {
title: string;
Expand All @@ -30,6 +31,7 @@ const propDefaults = {
};

const SettingRange = (props: Props) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
const onValueChange = useCallback(
debounce(props.onValueChange, 25, {leading: true, trailing: true}),
[props.onValueChange],
Expand Down
21 changes: 20 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3738,7 +3738,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.17.0":
"@typescript-eslint/utils@npm:7.17.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0":
version: 7.17.0
resolution: "@typescript-eslint/utils@npm:7.17.0"
dependencies:
Expand Down Expand Up @@ -4355,6 +4355,7 @@ __metadata:
babel-jest: ^29.6.3
dotenv-cli: ^7.2.1
eslint: ^8.19.0
eslint-plugin-jest: ^28.6.0
jest: ^29.2.1
lodash: ^4.17.21
prettier: ^2.8.8
Expand Down Expand Up @@ -5721,6 +5722,24 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-jest@npm:^28.6.0":
version: 28.6.0
resolution: "eslint-plugin-jest@npm:28.6.0"
dependencies:
"@typescript-eslint/utils": ^6.0.0 || ^7.0.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
jest: "*"
peerDependenciesMeta:
"@typescript-eslint/eslint-plugin":
optional: true
jest:
optional: true
checksum: 5abcef6933445ae0017dcea6cafacb4aaab6619f8660d1097667dd040129b4efa3f1284ded1c2605c7d14c11c976c725912f660dcdec8278c6f6ce793ff9dab6
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.1
resolution: "eslint-plugin-prettier@npm:4.2.1"
Expand Down

0 comments on commit 4ce6622

Please sign in to comment.