mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
Tools: Ignore existing components for react-hook rule
This commit is contained in:
parent
73d12e1ed5
commit
759d59c2e6
@ -6,6 +6,11 @@ module.exports = {
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
'extends': ['eslint:recommended'],
|
||||
"settings": {
|
||||
'react': {
|
||||
'version': '16.12',
|
||||
},
|
||||
},
|
||||
'globals': {
|
||||
'Atomics': 'readonly',
|
||||
'SharedArrayBuffer': 'readonly',
|
||||
|
@ -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
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
class ItemList extends React.Component {
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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';
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { themeStyle } = require('../theme.js');
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { bridge } = require('electron').remote.require('./bridge');
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const smalltalk = require('smalltalk');
|
||||
|
||||
class Dialogs {
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
const { View, ScrollView } = require('react-native');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { StyleSheet } = require('react-native');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { StyleSheet } = require('react-native');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
const { Platform } = require('react-native');
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { connect } = require('react-redux');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { View, TextInput, StyleSheet } = require('react-native');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { AppState, View, StyleSheet } = require('react-native');
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* eslint-disable enforce-react-hooks/enforce-react-hooks */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const { View } = require('react-native');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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';
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user