chore: upgrade eslint config

This commit is contained in:
satyajit.happy
2019-09-28 11:58:21 +02:00
parent 7393464515
commit 1345a8fec6
15 changed files with 147 additions and 353 deletions

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-cycle
import { NavigationState, PartialState } from './types';
export type Action =

View File

@@ -140,7 +140,6 @@ const Container = React.forwardRef(function NavigationContainer(
>((acc, name) => {
acc[name] = (...args: any[]) =>
dispatch(
// eslint-disable-next-line import/namespace
CommonActions[name](
// @ts-ignore
...args

View File

@@ -655,6 +655,7 @@ it('throws when a React Element is not the direct children', () => {
);
});
// eslint-disable-next-line jest/expect-expect
it("doesn't throw when direct children is Screen or empty element", () => {
const TestNavigator = (props: any) => {
useNavigationBuilder(MockRouter, props);

View File

@@ -296,6 +296,7 @@ it("action doesn't bubble if target is specified", () => {
expect(onStateChange).not.toBeCalled();
});
// eslint-disable-next-line jest/expect-expect
it("doesn't crash if no navigator handled the action", () => {
const TestRouter = MockRouter;

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-cycle
import * as CommonActions from './CommonActions';
import * as React from 'react';

View File

@@ -18,6 +18,7 @@ type DevTools = {
};
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace NodeJS {
interface Global {
__REDUX_DEVTOOLS_EXTENSION__:

View File

@@ -1,5 +1,3 @@
/* eslint-disable import/no-commonjs */
module.exports = function(api) {
api.cache(true);
return {

View File

@@ -1,4 +1,4 @@
/* eslint-disable import/no-commonjs, import/no-extraneous-dependencies */
/* eslint-disable import/no-extraneous-dependencies */
const path = require('path');
const fs = require('fs');

View File

@@ -1,5 +1,3 @@
/* eslint-disable import/namespace, import/default */
import * as React from 'react';
import { MaterialIcons } from '@expo/vector-icons';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';

View File

@@ -25,6 +25,7 @@ export default function Albums() {
contentContainerStyle={styles.content}
>
{COVERS.map((source, i) => (
// eslint-disable-next-line react/no-array-index-key
<Image key={i} source={source} style={styles.cover} />
))}
</ScrollView>

View File

@@ -32,6 +32,7 @@ export default function Chat() {
return (
<View
// eslint-disable-next-line react/no-array-index-key
key={i}
style={[odd ? styles.odd : styles.even, styles.inverted]}
>