Skip to content

Commit

Permalink
chore: eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Efstathios Ntonas committed Jul 31, 2023
1 parent 6ca18a8 commit f25cbd5
Show file tree
Hide file tree
Showing 8 changed files with 866 additions and 76 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ auto-changelog.js
# generated by bob
lib/

# jest
jest.config.*
9 changes: 5 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
"extends": [
"airbnb-typescript",
"plugin:prettier/recommended",
"@react-native-community",
"@react-native",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"overrides": [
{
Expand Down Expand Up @@ -54,6 +53,8 @@
"rules": {
"import/named": "off",
"@typescript-eslint/no-unnecessary-type-assertion": 0,
"@typescript-eslint/consistent-indexed-object-style": 0,
"@typescript-eslint/prefer-nullish-coalescing": 0,
"prefer-template": "off",
"no-param-reassign": "off",
"react/no-unused-prop-types": "off",
Expand Down
3 changes: 3 additions & 0 deletions example/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ index.js
metro.config.js
babel.config.js
routes.tsx

# jest
jest.config.*
22 changes: 11 additions & 11 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"react": "18.2.0",
"react-native": "0.72.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"add": "^2.0.6",
"crypto-js": "^4.1.1",
"lodash": "^4.17.21",
"react": "18.2.0",
"react-native": "0.72.3",
"react-native-file-access": "^3.0.4",
"react-native-gesture-handler": "^2.12.0",
"react-native-reanimated": "^3.4.1",
Expand All @@ -30,25 +30,25 @@
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.3",
"@types/react": "^18.2.17",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.2",
"eslint": "^8.46.0",
"jest": "^29.6.2",
"metro-react-native-babel-preset": "0.77.0",
"prettier": "^3.0.0",
"react-test-renderer": "18.2.0",
"typescript": "5.1.6",
"@types/react-native": "^0.72.2",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"babel-jest": "^29.6.2",
"eslint": "^8.46.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.9.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react-hooks": "^4.6.0"
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.6.2",
"metro-react-native-babel-preset": "0.77.0",
"prettier": "^3.0.0",
"react-test-renderer": "18.2.0",
"typescript": "5.1.6"
},
"engines": {
"node": ">=16"
Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: 'react-native',
};
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"devDependencies": {
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"@react-native-community/eslint-config": "^3.2.0",
"@react-native/eslint-config": "^0.72.2",
"@release-it/conventional-changelog": "^7.0.0",
"@types/lodash": "^4.14.196",
"@types/react": "^18.2.11",
Expand All @@ -60,10 +60,12 @@
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native-a11y": "^3.3.0",
"husky": "^8.0.3",
"jest": "^29.6.2",
"prettier": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.3",
Expand All @@ -76,8 +78,8 @@
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-reanimated": ">=2.2.0",
"react-native-file-access": ">=3.0.0"
"react-native-file-access": ">=3.0.0",
"react-native-reanimated": ">=2.2.0"
},
"husky": {
"hooks": {
Expand Down
4 changes: 2 additions & 2 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface ImageState {
uri: string | undefined;
}

export type ImageProps = {
export interface ImageProps {
cacheKey?: string;
defaultSource?: ImageURISource | number;
maxAge?: number;
Expand All @@ -33,7 +33,7 @@ export type ImageProps = {
source: string;
style?: StyleProp<ImageStyle>;
thumbnailSource?: string;
};
}

export interface IProps {
accessibilityHint?: string;
Expand Down
Loading

0 comments on commit f25cbd5

Please sign in to comment.