Skip to content

Commit 45529ee

Browse files
committed
update eslint config
1 parent 3d9866a commit 45529ee

File tree

7 files changed

+19
-21
lines changed

7 files changed

+19
-21
lines changed

eslint.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-check
2-
31
import eslint from '@eslint/js';
42
import tseslint from 'typescript-eslint';
53
import react from 'eslint-plugin-react';
@@ -65,8 +63,8 @@ export default tseslint.config(
6563
readonly: 'generic',
6664
},
6765
],
68-
'@typescript-eslint/explicit-function-return-type': 'error',
69-
'@typescript-eslint/explicit-module-boundary-types': 'error',
66+
// '@typescript-eslint/explicit-function-return-type': 'error',
67+
// '@typescript-eslint/explicit-module-boundary-types': 'error',
7068
'@typescript-eslint/no-explicit-any': [
7169
'error',
7270
{

examples/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { JSX } from 'react';
2-
import { StyleSheet, View, FlatList, useColorScheme } from 'react-native';
3-
import { GestureHandlerRootView } from 'react-native-gesture-handler';
42
import DropDownPickerExample, { ExampleProps } from './example-src-files/example';
3+
import { FlatList, StyleSheet, View, useColorScheme } from 'react-native';
4+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
55

6-
const EXAMPLES: ExampleProps[] = [{
6+
const EXAMPLES: Array<ExampleProps> = [{
77
title: "Default Example",
88
description: "This is the default dropdown picker"
99
},{

examples/example-src-files/example.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React, { useState, JSX } from 'react';
2-
import { StyleSheet, Button, Text, View, useColorScheme } from 'react-native';
3-
import DropDownPicker, { ItemType,DropDownPickerProps } from 'react-native-dropdown-picker';
1+
import React, { JSX, useState } from 'react';
2+
import { Button, StyleSheet, Text, View, useColorScheme } from 'react-native';
3+
import DropDownPicker, { DropDownPickerProps,ItemType } from 'react-native-dropdown-picker';
44

5-
export type ExampleProps = {
5+
export interface ExampleProps {
66
multiple?: boolean;
77
title: string;
88
description?: string;
99
placeholder?: string;
1010
multipleText?: string;
1111
// For the sake of keeping the examples simple for now
12-
items?: ItemType<string>[];
12+
items?: Array<ItemType<string>>;
1313
dropdownProps?: Partial<DropDownPickerProps<string>>;
14-
};
14+
}
1515

1616
const DEFAULT_ITEMS = [
1717
{ label: 'Apple', value: 'apple' },

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ declare module 'react-native-dropdown-picker' {
8282
NOTHING_TO_SHOW: string;
8383
PLACEHOLDER: string;
8484
SEARCH_PLACEHOLDER: string;
85-
SELECTED_ITEMS_COUNT_TEXT: string | { [key in number | 'n']: string };
85+
SELECTED_ITEMS_COUNT_TEXT: string | Record<number | 'n', string>;
8686
}
8787

8888
export type ThemeNameType = 'DEFAULT' | 'LIGHT' | 'DARK';

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,6 @@
7373
"react-native": "*",
7474
"react-native-gesture-handler": "*",
7575
"react-native-safe-area-context": "*"
76-
}
76+
},
77+
"type": "module"
7778
}

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"exclude": [
6363
/* Filenames or patterns that should be skipped when resolving include. */
6464
"dist",
65-
"node_modules",
66-
"eslint.config.js"
65+
"node_modules"
6766
]
6867
}

0 commit comments

Comments
 (0)