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

Address #250 Normalise topics #291

Merged
merged 1 commit into from
Oct 16, 2019
Merged

Address #250 Normalise topics #291

merged 1 commit into from
Oct 16, 2019

Conversation

Roshanjossey
Copy link
Contributor

Fix topics for diamond, two-buckets and variable-length-quantity

Fix topics for `diamond`, `two-buckets` and `variable-length-quantity`
@pacman-bot
Copy link

8 Messages
📖 exercises/atbash-cipher/atbash-cipher.example.ts#L2 - Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/atbash-cipher/atbash-cipher.example.ts#L3 - Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/beer-song/beer-song.example.ts#L28 - Type number trivially inferred from a number literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/clock/clock.example.ts#L5 - Type number trivially inferred from a number literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/pangram/pangram.example.ts#L7 - Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/pythagorean-triplet/pythagorean-triplet.example.ts#L35 - Type number trivially inferred from a number literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/robot-simulator/robot-simulator.example.ts#L5 - Type number trivially inferred from a number literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
📖 exercises/robot-simulator/robot-simulator.example.ts#L5 - Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)

Generated by 🚫 Danger

@SleeplessByte
Copy link
Member

Don't mind these warnings :)

@SleeplessByte SleeplessByte merged commit 3adfc4e into exercism:master Oct 16, 2019
@Roshanjossey
Copy link
Contributor Author

Hi @SleeplessByte, I see that the errors are caused by explicitly adding types when it's not necessary.

Shall I submit a pull request to address this?

@SleeplessByte
Copy link
Member

We probably want to fine-tune @typescript-eslint/no-inferrable-types first. I'll accept a PR to add these lines https://github.com/exercism/javascript-analyzer/blob/master/.eslintrc#L42-L46, which will solve most of them.

@Roshanjossey
Copy link
Contributor Author

Got it.

Should this change be made in https://github.com/exercism/typescript-analyzer/blob/master/.eslintrc or individual .eslintrc in project directories? Is there a mechanism by which these are synced?

@Roshanjossey
Copy link
Contributor Author

Roshanjossey commented Oct 16, 2019

Also, even with the change you suggested

add these lines https://github.com/exercism/javascript-analyzer/blob/master/.eslintrc#L42-L46,

We need to fix these as these are properties, won't we?

This is my reference https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md

@SleeplessByte
Copy link
Member

That's right. These:

private alphabet: string = "abcdefghijklmnopqrstuvwxyz"

private numbers: string = "0123456789"

need to be fixed, but these

constructor(xcoord: number = 0, ycoord: number = 0, direction: string = 'north') {

for example don't :)

@Roshanjossey
Copy link
Contributor Author

Should this change be made in https://github.com/exercism/typescript-analyzer/blob/master/.eslintrc or individual .eslintrc in project directories? Is there a mechanism by which these are synced?

Roshanjossey pushed a commit to Roshanjossey/typescript that referenced this pull request Oct 16, 2019
Refer conversation in exercism#291 for information about this change
SleeplessByte pushed a commit that referenced this pull request Oct 21, 2019
* Remove explicit type anotations for inferrable types

Refer conversation in #291 for information about this change

* Update eslint config to silence no-inferrable-types error

* Add lint rule to maintainers eslint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants