Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
chore: upgrade eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Sep 28, 2019
1 parent 7393464 commit 1345a8f
Show file tree
Hide file tree
Showing 15 changed files with 147 additions and 353 deletions.
2 changes: 0 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/no-commonjs */

module.exports = {
presets: [
[
Expand Down
2 changes: 0 additions & 2 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/no-commonjs */

module.exports = {
extends: ['@commitlint/config-conventional'],
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"codecov": "^3.5.0",
"commitlint": "^8.0.0",
"core-js": "^3.2.1",
"eslint": "^5.16.0",
"eslint-config-satya164": "^2.4.1",
"eslint": "^6.4.0",
"eslint-config-satya164": "^3.0.0",
"husky": "^2.4.0",
"jest": "^24.8.0",
"lerna": "^3.16.4",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/CommonActions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-cycle
import { NavigationState, PartialState } from './types';

export type Action =
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/NavigationContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/__tests__/useOnAction.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/types.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-cycle
import * as CommonActions from './CommonActions';
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/useDevTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type DevTools = {
};

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace NodeJS {
interface Global {
__REDUX_DEVTOOLS_EXTENSION__:
Expand Down
2 changes: 0 additions & 2 deletions packages/example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/no-commonjs */

module.exports = function(api) {
api.cache(true);
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/example/metro.config.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 0 additions & 2 deletions packages/example/src/Screens/BottomTabs.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 1 addition & 0 deletions packages/example/src/Shared/Albums.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions packages/example/src/Shared/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
>
Expand Down
Loading

0 comments on commit 1345a8f

Please sign in to comment.