blakeembrey / tslint-config-standard

A TSLint config for JavaScript Standard Style
Other
358 stars 43 forks source link

suggestion: remove no-use-before-declare #54

Closed Hotell closed 6 years ago

Hotell commented 6 years ago

I think this rule should be removed. It's not really necessary because no-var-keyword and also it's very slow to compute

Taken from TSlint docs:

Since most modern TypeScript doesn’t use var, this rule is generally discouraged and is kept around for legacy purposes. It is slow to compute, is not enabled in the built-in configuration presets, and should not be used to inform TSLint design decisions.

blakeembrey commented 6 years ago

@Hotell This is relevant in more places than just variables, e.g. functions and classes. I'd prefer not to disable this, but also no-use-before-declare doesn't correctly implement https://eslint.org/docs/rules/no-use-before-define from ESLint. We need the ability to disable the options from out-of-scope. I'll disable until we can update the ESLint rules.

Reference from standard: https://github.com/standard/eslint-config-standard/blob/f7d50e01310866458fd844625cf588d4ee39823b/eslintrc.json#L151.

blakeembrey commented 6 years ago

Created https://github.com/buzinas/tslint-eslint-rules/issues/354 and released https://github.com/blakeembrey/tslint-config-standard/releases/tag/v8.0.1

Hotell commented 6 years ago

looks good! thanks a lot @blakeembrey 🥇