Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up all @typescript-eslint/no-unsafe-* linting issues #619

Open
amaury1093 opened this issue Jun 1, 2020 · 10 comments
Open

Clean up all @typescript-eslint/no-unsafe-* linting issues #619

amaury1093 opened this issue Jun 1, 2020 · 10 comments
Labels
good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com/

Comments

@amaury1093
Copy link
Member

I turned off these 3 rules:

	rules: {
		'@typescript-eslint/no-unsafe-assignment': 'off',
		'@typescript-eslint/no-unsafe-call': 'off',
		'@typescript-eslint/no-unsafe-member-access': 'off',
	},

because there were too many instances in the codebase. It would be nice to clean them up.

@amaury1093 amaury1093 added the good first issue Good for newcomers label Jun 1, 2020
@steveny9911
Copy link
Contributor

@amaurymartiny Hihi, could I take a stab at this?

@amaury1093
Copy link
Member Author

yes, please go ahead! Thanks 🙏

@steveny9911
Copy link
Contributor

steveny9911 commented Sep 26, 2020

I'm going through some no-unsafe-assignment; not sure how I should handle some remaining ones

1️⃣

// shoot-i-smoke/App/localization/index.ts (line 24 - 27)

i18n.translations = {
	en,
	'en-US': enUS,
};

^ not sure how I should handle this

2️⃣

// shoot-i-smoke/e2e/init.ts (line 20)

const config = require('../package.json').detox;

^ this seems ok as recommended by the doc and some googling; should I just flag eslint to ignore this line?

3️⃣
scripts/generateAppJson.js should probably get just get eslint ignored

@amaury1093
Copy link
Member Author

Thanks! Yes, you can add some eslint-disable for now. Ideally, when you have an initial version of your changes, could you push your code and create a PR? I'll then pull down your branch, fiddle a bit on my side if I can figure out the no-unsafe-assignments (especially the 1st one).

@steveny9911
Copy link
Contributor

I opened a work in progress pull request; feel free to look it over.

@steveny9911
Copy link
Contributor

I have started looking at no-unsafe-call
1️⃣ shoot-i-smoke\App\stores\util\hawk.ts
Seems like there's just no typescript support, I'll take a look at https://www.npmjs.com/package/@types/hapi__hawk/v/8.0.0 not sure if this could work

2️⃣ shoot-i-smoke\e2e\init.ts and shoot-i-smoke\e2e\locationDenied.spec.ts
Error around jasmine and reloadApp(); doesn't seem like there's any typescript support as well

3️⃣ scripts/generateAppJson.js could probably get just get eslint ignored

@amaury1093
Copy link
Member Author

  1. Yes, definitely give @types/hapi__hawk a try!
    2 & 3. Okay to just add eslint-ignore in those files

Thanks for this work @steveny9911 💪

@amaury1093 amaury1093 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 1, 2020
@BatDroid
Copy link

anything is left here to be done by someone else (me) ?

@amaury1093
Copy link
Member Author

I didn't hear back from @steveny9911, so I think you can go for it @BatDroid!

The items '@typescript-eslint/no-unsafe-call': 'off', and '@typescript-eslint/no-unsafe-member-access': 'off', are still up for grabs.

@BatDroid
Copy link

I'm new here. when i try to run the project on ios, it loads and when it reaches to 100% it crashes the whole expo app without any proper report in flipper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

3 participants