diff --git a/.eslintrc.js b/.eslintrc.js index 1a0792103..465696394 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,11 @@ module.exports = { }, "parser": "@typescript-eslint/parser", 'extends': ['eslint:recommended'], + "settings": { + 'react': { + 'version': '16.12', + }, + }, 'globals': { 'Atomics': 'readonly', 'SharedArrayBuffer': 'readonly', diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7982bf90e..4a8ae1dcd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,27 +54,9 @@ The tests are under CliClient/tests. To get them running, you first need to buil cd CliClient npm i + ./build.sh -To run the test units, you must have an instance of the cli app running. In a first window navigate into `CliClient` and run: - -```sh -./run.sh -``` - -> If you get an error like `Error: Cannot find module '../locales/index.js'`, this means you must (a) rebuild translations or (b) take > them from one of the other apps. To do option b, you can run the following command to copy them from the `ReactNativeClient` directory:> -> -> ```sh -> cd .. # Return to the root of the project -> rsync -aP ./ReactNativeClient/locales/ ./CliClient/build/locales/ -> ``` - -> If you get an error like `Error: Cannot find module './path/to/node_sqlite3.node'`, that likely means you need to install sqlite: -> -> ```sh -> npm install sqlite3 --build-from-source -> ``` - -Then run the tests in a second window. To run all the test units: +To run all the test units: ./run_test.sh diff --git a/Clipper/joplin-webclipper/popup/src/App.js b/Clipper/joplin-webclipper/popup/src/App.js index 0f59594cb..3b70f476c 100644 --- a/Clipper/joplin-webclipper/popup/src/App.js +++ b/Clipper/joplin-webclipper/popup/src/App.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + import React, { Component } from 'react'; import './App.css'; import led_red from './led_red.png'; diff --git a/ElectronClient/app/gui/ClipperConfigScreen.jsx b/ElectronClient/app/gui/ClipperConfigScreen.jsx index 80060ed17..f0ac52ca1 100644 --- a/ElectronClient/app/gui/ClipperConfigScreen.jsx +++ b/ElectronClient/app/gui/ClipperConfigScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { bridge } = require('electron').remote.require('./bridge'); diff --git a/ElectronClient/app/gui/ConfigMenuBar.jsx b/ElectronClient/app/gui/ConfigMenuBar.jsx index 49fb2e0c8..748dc7565 100644 --- a/ElectronClient/app/gui/ConfigMenuBar.jsx +++ b/ElectronClient/app/gui/ConfigMenuBar.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const styleSelector = require('./style/ConfigMenuBar'); const Setting = require('lib/models/Setting'); diff --git a/ElectronClient/app/gui/ConfigScreen.jsx b/ElectronClient/app/gui/ConfigScreen.jsx index 38bf1eb21..28b31d47f 100644 --- a/ElectronClient/app/gui/ConfigScreen.jsx +++ b/ElectronClient/app/gui/ConfigScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const Setting = require('lib/models/Setting.js'); diff --git a/ElectronClient/app/gui/DialogButtonRow.jsx b/ElectronClient/app/gui/DialogButtonRow.jsx index e4bd2cf09..93f69944d 100644 --- a/ElectronClient/app/gui/DialogButtonRow.jsx +++ b/ElectronClient/app/gui/DialogButtonRow.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { _ } = require('lib/locale.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/DropboxLoginScreen.jsx b/ElectronClient/app/gui/DropboxLoginScreen.jsx index 88be59f61..7adb38218 100644 --- a/ElectronClient/app/gui/DropboxLoginScreen.jsx +++ b/ElectronClient/app/gui/DropboxLoginScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { bridge } = require('electron').remote.require('./bridge'); diff --git a/ElectronClient/app/gui/EncryptionConfigScreen.jsx b/ElectronClient/app/gui/EncryptionConfigScreen.jsx index 0ae093f56..864d96edd 100644 --- a/ElectronClient/app/gui/EncryptionConfigScreen.jsx +++ b/ElectronClient/app/gui/EncryptionConfigScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const Setting = require('lib/models/Setting'); diff --git a/ElectronClient/app/gui/ExtensionBadge.jsx b/ElectronClient/app/gui/ExtensionBadge.jsx index 0d4a03b30..3eb53228c 100644 --- a/ElectronClient/app/gui/ExtensionBadge.jsx +++ b/ElectronClient/app/gui/ExtensionBadge.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { bridge } = require('electron').remote.require('./bridge'); const styleSelector = require('./style/ExtensionBadge'); diff --git a/ElectronClient/app/gui/Header.jsx b/ElectronClient/app/gui/Header.jsx index 24bd1d3e2..3d3b18f46 100644 --- a/ElectronClient/app/gui/Header.jsx +++ b/ElectronClient/app/gui/Header.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/HelpButton.jsx b/ElectronClient/app/gui/HelpButton.jsx index 923ff84a4..b13bd3cd7 100644 --- a/ElectronClient/app/gui/HelpButton.jsx +++ b/ElectronClient/app/gui/HelpButton.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/IconButton.jsx b/ElectronClient/app/gui/IconButton.jsx index 92199b7d7..ec909e2d2 100644 --- a/ElectronClient/app/gui/IconButton.jsx +++ b/ElectronClient/app/gui/IconButton.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/ImportScreen.jsx b/ElectronClient/app/gui/ImportScreen.jsx index 6a46c0f4d..41c860c9b 100644 --- a/ElectronClient/app/gui/ImportScreen.jsx +++ b/ElectronClient/app/gui/ImportScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const Folder = require('lib/models/Folder.js'); diff --git a/ElectronClient/app/gui/ItemList.jsx b/ElectronClient/app/gui/ItemList.jsx index 4d2e516a0..7b6a8bf9c 100644 --- a/ElectronClient/app/gui/ItemList.jsx +++ b/ElectronClient/app/gui/ItemList.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); class ItemList extends React.Component { diff --git a/ElectronClient/app/gui/MainScreen.jsx b/ElectronClient/app/gui/MainScreen.jsx index 05f1ff314..47bc370af 100644 --- a/ElectronClient/app/gui/MainScreen.jsx +++ b/ElectronClient/app/gui/MainScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { Header } = require('./Header.min.js'); diff --git a/ElectronClient/app/gui/Navigator.jsx b/ElectronClient/app/gui/Navigator.jsx index d87fccaa7..ed105cc18 100644 --- a/ElectronClient/app/gui/Navigator.jsx +++ b/ElectronClient/app/gui/Navigator.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); diff --git a/ElectronClient/app/gui/NoteList.jsx b/ElectronClient/app/gui/NoteList.jsx index 5d8278d7e..c87572e41 100644 --- a/ElectronClient/app/gui/NoteList.jsx +++ b/ElectronClient/app/gui/NoteList.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const { ItemList } = require('./ItemList.min.js'); const React = require('react'); const { connect } = require('react-redux'); diff --git a/ElectronClient/app/gui/NotePropertiesDialog.jsx b/ElectronClient/app/gui/NotePropertiesDialog.jsx index b9046d4c1..4de7d1458 100644 --- a/ElectronClient/app/gui/NotePropertiesDialog.jsx +++ b/ElectronClient/app/gui/NotePropertiesDialog.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { _ } = require('lib/locale.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/NoteRevisionViewer.jsx b/ElectronClient/app/gui/NoteRevisionViewer.jsx index a1e5d78d4..7346a99f5 100644 --- a/ElectronClient/app/gui/NoteRevisionViewer.jsx +++ b/ElectronClient/app/gui/NoteRevisionViewer.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/NoteSearchBar.jsx b/ElectronClient/app/gui/NoteSearchBar.jsx index 97a23dca9..97e061682 100644 --- a/ElectronClient/app/gui/NoteSearchBar.jsx +++ b/ElectronClient/app/gui/NoteSearchBar.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/NoteStatusBar.jsx b/ElectronClient/app/gui/NoteStatusBar.jsx index 714fd8594..04beab9d5 100644 --- a/ElectronClient/app/gui/NoteStatusBar.jsx +++ b/ElectronClient/app/gui/NoteStatusBar.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { time } = require('lib/time-utils.js'); diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index 8344ceadf..8258139ae 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Note = require('lib/models/Note.js'); const BaseItem = require('lib/models/BaseItem.js'); diff --git a/ElectronClient/app/gui/NoteTextViewer.jsx b/ElectronClient/app/gui/NoteTextViewer.jsx index 84e2984de..f84b89506 100644 --- a/ElectronClient/app/gui/NoteTextViewer.jsx +++ b/ElectronClient/app/gui/NoteTextViewer.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); diff --git a/ElectronClient/app/gui/OneDriveLoginScreen.jsx b/ElectronClient/app/gui/OneDriveLoginScreen.jsx index 513301881..3fc6a7cc5 100644 --- a/ElectronClient/app/gui/OneDriveLoginScreen.jsx +++ b/ElectronClient/app/gui/OneDriveLoginScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { reg } = require('lib/registry.js'); diff --git a/ElectronClient/app/gui/PromptDialog.jsx b/ElectronClient/app/gui/PromptDialog.jsx index 9d2127c9e..bb0a6a21e 100644 --- a/ElectronClient/app/gui/PromptDialog.jsx +++ b/ElectronClient/app/gui/PromptDialog.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { _ } = require('lib/locale.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/Root.jsx b/ElectronClient/app/gui/Root.jsx index c33346392..af80e5a91 100644 --- a/ElectronClient/app/gui/Root.jsx +++ b/ElectronClient/app/gui/Root.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { render } = require('react-dom'); const { connect, Provider } = require('react-redux'); diff --git a/ElectronClient/app/gui/ShareNoteDialog.tsx b/ElectronClient/app/gui/ShareNoteDialog.tsx index 9b652d698..dc7073f99 100644 --- a/ElectronClient/app/gui/ShareNoteDialog.tsx +++ b/ElectronClient/app/gui/ShareNoteDialog.tsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + import * as React from 'react'; import { useState, useEffect } from 'react'; import JoplinServerApi from '../lib/JoplinServerApi'; diff --git a/ElectronClient/app/gui/SideBar.jsx b/ElectronClient/app/gui/SideBar.jsx index b5add24c3..0df02664c 100644 --- a/ElectronClient/app/gui/SideBar.jsx +++ b/ElectronClient/app/gui/SideBar.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const shared = require('lib/components/shared/side-menu-shared.js'); diff --git a/ElectronClient/app/gui/StatusScreen.jsx b/ElectronClient/app/gui/StatusScreen.jsx index 006c4ed3b..1f8c9f584 100644 --- a/ElectronClient/app/gui/StatusScreen.jsx +++ b/ElectronClient/app/gui/StatusScreen.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const Setting = require('lib/models/Setting.js'); diff --git a/ElectronClient/app/gui/TagItem.jsx b/ElectronClient/app/gui/TagItem.jsx index ebad306d9..a0cd9dc40 100644 --- a/ElectronClient/app/gui/TagItem.jsx +++ b/ElectronClient/app/gui/TagItem.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/TagList.jsx b/ElectronClient/app/gui/TagList.jsx index 25d4c011f..cdf15578f 100644 --- a/ElectronClient/app/gui/TagList.jsx +++ b/ElectronClient/app/gui/TagList.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/Toolbar.jsx b/ElectronClient/app/gui/Toolbar.jsx index 8b8753533..e9bba6b14 100644 --- a/ElectronClient/app/gui/Toolbar.jsx +++ b/ElectronClient/app/gui/Toolbar.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/ToolbarButton.jsx b/ElectronClient/app/gui/ToolbarButton.jsx index 828b10e08..cca4ff9da 100644 --- a/ElectronClient/app/gui/ToolbarButton.jsx +++ b/ElectronClient/app/gui/ToolbarButton.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/ToolbarSpace.jsx b/ElectronClient/app/gui/ToolbarSpace.jsx index 92d7a7a1e..376c8efc3 100644 --- a/ElectronClient/app/gui/ToolbarSpace.jsx +++ b/ElectronClient/app/gui/ToolbarSpace.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/VerticalResizer.jsx b/ElectronClient/app/gui/VerticalResizer.jsx index a10eab698..e5a74fb82 100644 --- a/ElectronClient/app/gui/VerticalResizer.jsx +++ b/ElectronClient/app/gui/VerticalResizer.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { bridge } = require('electron').remote.require('./bridge'); diff --git a/ElectronClient/app/gui/dialogs.js b/ElectronClient/app/gui/dialogs.js index 6d36acec1..7131048d4 100644 --- a/ElectronClient/app/gui/dialogs.js +++ b/ElectronClient/app/gui/dialogs.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const smalltalk = require('smalltalk'); class Dialogs { diff --git a/ElectronClient/app/plugins/GotoAnything.jsx b/ElectronClient/app/plugins/GotoAnything.jsx index e219d6be9..3d9ab98ef 100644 --- a/ElectronClient/app/plugins/GotoAnything.jsx +++ b/ElectronClient/app/plugins/GotoAnything.jsx @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); const { _ } = require('lib/locale.js'); diff --git a/ReactNativeClient/lib/components/CameraView.js b/ReactNativeClient/lib/components/CameraView.js index 5e3939bee..40b0f63e3 100644 --- a/ReactNativeClient/lib/components/CameraView.js +++ b/ReactNativeClient/lib/components/CameraView.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/Dropdown.js b/ReactNativeClient/lib/components/Dropdown.js index 6fa90af61..6a713735e 100644 --- a/ReactNativeClient/lib/components/Dropdown.js +++ b/ReactNativeClient/lib/components/Dropdown.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { TouchableOpacity, TouchableWithoutFeedback, Dimensions, Text, Modal, View } = require('react-native'); const { ItemList } = require('lib/components/ItemList.js'); diff --git a/ReactNativeClient/lib/components/ItemList.js b/ReactNativeClient/lib/components/ItemList.js index e4cafb819..7b939a686 100644 --- a/ReactNativeClient/lib/components/ItemList.js +++ b/ReactNativeClient/lib/components/ItemList.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { View, ScrollView } = require('react-native'); diff --git a/ReactNativeClient/lib/components/ModalDialog.js b/ReactNativeClient/lib/components/ModalDialog.js index bb6a483f7..322e20398 100644 --- a/ReactNativeClient/lib/components/ModalDialog.js +++ b/ReactNativeClient/lib/components/ModalDialog.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { Text, Modal, View, StyleSheet, Button } = require('react-native'); const { themeStyle } = require('lib/components/global-style.js'); diff --git a/ReactNativeClient/lib/components/action-button.js b/ReactNativeClient/lib/components/action-button.js index dbe698436..32dee63c8 100644 --- a/ReactNativeClient/lib/components/action-button.js +++ b/ReactNativeClient/lib/components/action-button.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { StyleSheet } = require('react-native'); diff --git a/ReactNativeClient/lib/components/app-nav.js b/ReactNativeClient/lib/components/app-nav.js index 8ea3836ce..4103bfac2 100644 --- a/ReactNativeClient/lib/components/app-nav.js +++ b/ReactNativeClient/lib/components/app-nav.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/base-screen.js b/ReactNativeClient/lib/components/base-screen.js index 0a2db7de7..d154078af 100644 --- a/ReactNativeClient/lib/components/base-screen.js +++ b/ReactNativeClient/lib/components/base-screen.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { StyleSheet } = require('react-native'); diff --git a/ReactNativeClient/lib/components/checkbox.js b/ReactNativeClient/lib/components/checkbox.js index 89d5e2cc3..3f81a18a6 100644 --- a/ReactNativeClient/lib/components/checkbox.js +++ b/ReactNativeClient/lib/components/checkbox.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { View, TouchableHighlight } = require('react-native'); diff --git a/ReactNativeClient/lib/components/global-style.js b/ReactNativeClient/lib/components/global-style.js index 86902e2ea..00e9ebc1c 100644 --- a/ReactNativeClient/lib/components/global-style.js +++ b/ReactNativeClient/lib/components/global-style.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const Setting = require('lib/models/Setting.js'); const { Platform } = require('react-native'); diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index 9a2d468af..321059e8b 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { Platform, View, Text } = require('react-native'); diff --git a/ReactNativeClient/lib/components/note-item.js b/ReactNativeClient/lib/components/note-item.js index 4a2401fb2..b8b899787 100644 --- a/ReactNativeClient/lib/components/note-item.js +++ b/ReactNativeClient/lib/components/note-item.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/note-list.js b/ReactNativeClient/lib/components/note-list.js index d45fc4831..cf7a1d272 100644 --- a/ReactNativeClient/lib/components/note-list.js +++ b/ReactNativeClient/lib/components/note-list.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/screen-header.js b/ReactNativeClient/lib/components/screen-header.js index 77de2266a..ce39ab9f4 100644 --- a/ReactNativeClient/lib/components/screen-header.js +++ b/ReactNativeClient/lib/components/screen-header.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/screens/NoteTagsDialog.js b/ReactNativeClient/lib/components/screens/NoteTagsDialog.js index cf29b9207..db21ce6b1 100644 --- a/ReactNativeClient/lib/components/screens/NoteTagsDialog.js +++ b/ReactNativeClient/lib/components/screens/NoteTagsDialog.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { StyleSheet, View, Text, FlatList, TouchableOpacity, TextInput } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js index 2460f790c..2da7130ce 100644 --- a/ReactNativeClient/lib/components/screens/config.js +++ b/ReactNativeClient/lib/components/screens/config.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { Platform, TouchableOpacity, Linking, View, Switch, StyleSheet, Text, Button, ScrollView, TextInput, Alert } = require('react-native'); const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/screens/dropbox-login.js b/ReactNativeClient/lib/components/screens/dropbox-login.js index bb8b3caac..ef054fa2f 100644 --- a/ReactNativeClient/lib/components/screens/dropbox-login.js +++ b/ReactNativeClient/lib/components/screens/dropbox-login.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { View, Button, Text, TextInput, TouchableOpacity, StyleSheet, ScrollView } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/encryption-config.js b/ReactNativeClient/lib/components/screens/encryption-config.js index deabc41da..d930f9e6c 100644 --- a/ReactNativeClient/lib/components/screens/encryption-config.js +++ b/ReactNativeClient/lib/components/screens/encryption-config.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { TextInput, TouchableOpacity, Linking, View, StyleSheet, Text, Button, ScrollView } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/folder.js b/ReactNativeClient/lib/components/screens/folder.js index 87f6111c0..cc900e56b 100644 --- a/ReactNativeClient/lib/components/screens/folder.js +++ b/ReactNativeClient/lib/components/screens/folder.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { View, TextInput, StyleSheet } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/log.js b/ReactNativeClient/lib/components/screens/log.js index 7b56713a9..efa6c3e25 100644 --- a/ReactNativeClient/lib/components/screens/log.js +++ b/ReactNativeClient/lib/components/screens/log.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { ListView, View, Text, Button, StyleSheet, Platform } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index f4c93b328..2135af8ca 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { Platform, Clipboard, Keyboard, View, TextInput, StyleSheet, Linking, Image, Share } = require('react-native'); const { connect } = require('react-redux'); diff --git a/ReactNativeClient/lib/components/screens/notes.js b/ReactNativeClient/lib/components/screens/notes.js index e18cfe523..7992c49f5 100644 --- a/ReactNativeClient/lib/components/screens/notes.js +++ b/ReactNativeClient/lib/components/screens/notes.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { AppState, View, StyleSheet } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/onedrive-login.js b/ReactNativeClient/lib/components/screens/onedrive-login.js index 5fd81a077..533a8a07f 100644 --- a/ReactNativeClient/lib/components/screens/onedrive-login.js +++ b/ReactNativeClient/lib/components/screens/onedrive-login.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { View } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/search.js b/ReactNativeClient/lib/components/screens/search.js index a7793a49a..543229a41 100644 --- a/ReactNativeClient/lib/components/screens/search.js +++ b/ReactNativeClient/lib/components/screens/search.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { StyleSheet, View, TextInput, FlatList, TouchableHighlight } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/status.js b/ReactNativeClient/lib/components/screens/status.js index e1538132f..e9377db57 100644 --- a/ReactNativeClient/lib/components/screens/status.js +++ b/ReactNativeClient/lib/components/screens/status.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { StyleSheet, View, Text, Button, FlatList } = require('react-native'); diff --git a/ReactNativeClient/lib/components/screens/tags.js b/ReactNativeClient/lib/components/screens/tags.js index a24645cee..ab27af94c 100644 --- a/ReactNativeClient/lib/components/screens/tags.js +++ b/ReactNativeClient/lib/components/screens/tags.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { View, Text, FlatList, StyleSheet, TouchableOpacity } = require('react-native'); diff --git a/ReactNativeClient/lib/components/select-date-time-dialog.js b/ReactNativeClient/lib/components/select-date-time-dialog.js index a66fe6d3c..4947f12c2 100644 --- a/ReactNativeClient/lib/components/select-date-time-dialog.js +++ b/ReactNativeClient/lib/components/select-date-time-dialog.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + import React from 'react'; import { View } from 'react-native'; import PopupDialog, { DialogTitle, DialogButton } from 'react-native-popup-dialog'; diff --git a/ReactNativeClient/lib/components/side-menu-content-note.js b/ReactNativeClient/lib/components/side-menu-content-note.js index f0f04d346..e09d9f610 100644 --- a/ReactNativeClient/lib/components/side-menu-content-note.js +++ b/ReactNativeClient/lib/components/side-menu-content-note.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { TouchableOpacity, Text, StyleSheet, ScrollView, View } = require('react-native'); diff --git a/ReactNativeClient/lib/components/side-menu-content.js b/ReactNativeClient/lib/components/side-menu-content.js index 5a5f31499..1512e504a 100644 --- a/ReactNativeClient/lib/components/side-menu-content.js +++ b/ReactNativeClient/lib/components/side-menu-content.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const Component = React.Component; const { Easing, Animated, TouchableOpacity, Text, StyleSheet, ScrollView, View, Alert } = require('react-native'); diff --git a/ReactNativeClient/lib/components/side-menu.js b/ReactNativeClient/lib/components/side-menu.js index b30ee1d52..d9e847015 100644 --- a/ReactNativeClient/lib/components/side-menu.js +++ b/ReactNativeClient/lib/components/side-menu.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const { connect } = require('react-redux'); const SideMenu_ = require('react-native-side-menu').default; diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index fbb13c932..681980a4f 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -1,3 +1,5 @@ +/* eslint-disable enforce-react-hooks/enforce-react-hooks */ + const React = require('react'); const { AppState, Keyboard, NativeModules, BackHandler, Platform, Animated } = require('react-native'); const { SafeAreaView } = require('react-navigation');