Shopify / tslint-config-shopify

Shopify’s TypeScript rules and configs.
https://www.npmjs.com/package/tslint-config-shopify
37 stars 3 forks source link

Update no-inferrable-types and no-console rule #25

Closed ismail-syed closed 7 years ago

ismail-syed commented 7 years ago
GoodForOneFare commented 7 years ago

I don't see the necessity of ignore-params (at least, for neutron). It's working around these warnings, which all look like "Why don't we just simplify this?" situations:

export function appPath(postfix: string = '') {

function queryMultipleInternal(queries: string[], options: Options, attempts: number = 2): Promise<Response<any>[]> {

function addOptionToSelected(option: Option, selected: string[], allowMultiple: boolean = false) {

Maybe I'm missing some context, though?

lemonmade commented 7 years ago

I agree, why force a type when one can be inferred so easily?

ismail-syed commented 7 years ago

I was on the fence between adding ignore-params or fixing the issues in neutron. I went with the 'easy route' to get the discussion going. I'll make the appropriate changes where required in our project.

Thanks for the feedback.