diff --git a/scripts/annotationsExtractor.js b/scripts/annotationsExtractor.js
index 69de305..3838290 100644
--- a/scripts/annotationsExtractor.js
+++ b/scripts/annotationsExtractor.js
@@ -68,7 +68,6 @@ pdfExtract.extract(
let currentAnnotationNumber = ';';
fileContentArray.forEach((rule) => {
try {
- let indentation, header;
if (rule.match(/^\d+\.\d+/)) {
// New annotation
const annotationNumber = rule.match(/^\d+\.\d+/)[0];
@@ -100,9 +99,8 @@ pdfExtract.extract(
const lastContentIndex = fileContentHash[currentRuleNumber][currentAnnotationNumber].content.length - 1;
if (fileContentHash[currentRuleNumber][currentAnnotationNumber].content[lastContentIndex])
- fileContentHash[currentRuleNumber][currentAnnotationNumber].content[
- lastContentIndex
- ].text += `\n\n${rule}\n\n`;
+ fileContentHash[currentRuleNumber][currentAnnotationNumber].content[lastContentIndex].text +=
+ `\n\n${rule}\n\n`;
}
});
diff --git a/src/components/rules/NestedPressableHighlighter.js b/src/components/rules/NestedPressableHighlighter.js
index 7abb7af..66c7214 100644
--- a/src/components/rules/NestedPressableHighlighter.js
+++ b/src/components/rules/NestedPressableHighlighter.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { Text, TouchableOpacity } from 'react-native';
+import { Text } from 'react-native';
import { findAll } from 'highlight-words-core';
import Highlighter from '../shared/Highlighter.js';
diff --git a/src/components/shared/BottomSheet.js b/src/components/shared/BottomSheet.js
index 36bcb3a..ccdc710 100644
--- a/src/components/shared/BottomSheet.js
+++ b/src/components/shared/BottomSheet.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { StyleSheet, View, Pressable } from 'react-native';
+import { StyleSheet, Pressable } from 'react-native';
import { BottomSheet, Button } from 'react-native-elements';
import { MaterialCommunityIcons } from '@expo/vector-icons';
diff --git a/src/screens/QuizzScreen.js b/src/screens/QuizzScreen.js
index 443ec99..7676b01 100644
--- a/src/screens/QuizzScreen.js
+++ b/src/screens/QuizzScreen.js
@@ -12,13 +12,13 @@ import I18n from '../utils/i18n';
// Taken from https://stackoverflow.com/a/19270021
function getRandomElementsFromArray(arr, n) {
let number = Math.min(n, arr.length);
- let result = new Array(number),
- len = arr.length,
- taken = new Array(len);
+ const result = new Array(number);
+ let length = arr.length;
+ const taken = new Array(length);
while (number--) {
- const x = Math.floor(Math.random() * len);
+ const x = Math.floor(Math.random() * length);
result[number] = arr[x in taken ? taken[x] : x];
- taken[x] = --len in taken ? taken[len] : len;
+ taken[x] = --length in taken ? taken[length] : length;
}
return result;
}
diff --git a/src/screens/__tests__/AboutScreen.test.js b/src/screens/__tests__/AboutScreen.test.js
index 0b6e78b..c08f2e5 100644
--- a/src/screens/__tests__/AboutScreen.test.js
+++ b/src/screens/__tests__/AboutScreen.test.js
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react-native';
import AboutScreen from '../AboutScreen';
describe('', () => {
- it('renders correctly', async () => {
+ it('renders correctly', () => {
const { toJSON } = render();
expect(toJSON()).toMatchSnapshot();
diff --git a/src/screens/__tests__/HomeScreen.test.js b/src/screens/__tests__/HomeScreen.test.js
index eb238a6..80530ad 100644
--- a/src/screens/__tests__/HomeScreen.test.js
+++ b/src/screens/__tests__/HomeScreen.test.js
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react-native';
import HomeScreen from '../HomeScreen';
describe('', () => {
- it('renders correctly', async () => {
+ it('renders correctly', () => {
const { toJSON } = render();
expect(toJSON()).toMatchSnapshot();
diff --git a/src/screens/__tests__/OptionsScreen.test.js b/src/screens/__tests__/OptionsScreen.test.js
index 8ac2c7e..db711bd 100644
--- a/src/screens/__tests__/OptionsScreen.test.js
+++ b/src/screens/__tests__/OptionsScreen.test.js
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react-native';
import OptionsScreen from '../OptionsScreen';
describe('', () => {
- it('renders correctly', async () => {
+ it('renders correctly', () => {
const { toJSON } = render();
expect(toJSON()).toMatchSnapshot();
diff --git a/src/screens/__tests__/RulesScreen.test.js b/src/screens/__tests__/RulesScreen.test.js
index e1b99fa..a10d241 100644
--- a/src/screens/__tests__/RulesScreen.test.js
+++ b/src/screens/__tests__/RulesScreen.test.js
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react-native';
import RulesScreen from '../RulesScreen';
describe('', () => {
- it('renders correctly', async () => {
+ it('renders correctly', () => {
const navigation = { setOptions: jest.fn() };
const { toJSON } = render();