Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
typescript-eslint
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
Some rule's error report location seems too wide. I think it could be improved to report more accurate location where user should care about.For example,
no-unused-vars:fix(eslint-plugin): [no-unused-vars] clear error report range #8640
// AS-ISletunusedVar:{foo:number}|undefined=1;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^// TO-BEletunusedVar:{foo:number}|undefined=1;^^^^^^^^
explicit-member-accessibility :fix(eslint-plugin): [explicit-member-accessibility] refine report locations #8869
// AS-ISclassAnimal{getname():string{returnthis.animalName;}^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}// TO-BEclassAnimal{getname():string{returnthis.animalName;}^^^^^^^^^}
no-for-in-arrayfix(eslint-plugin): [no-for-in-array] refine report location #8874
// AS-ISdeclareconstarray:string[];for(constiinarray){console.log(array[i]);}^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^// TO-BEdeclareconstarray:string[];for(constiinarray){console.log(array[i]);}^^^^^^^^^^^^^^^^^^^^^
init-declarationsfix(eslint-plugin): [init-declarations] refine report locations #8893
// AS-ISletbar:number|undefined|string;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^bar=2;// TO-BEletbar:number|undefined|string;^^^^^bar=2;
prefer-readonlyfix(eslint-plugin): [prefer-readonly] refine report locations #8894
// AS-ISclassContainer{privateonClick=()=>{/* ... */};^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}// TO-BEclassContainer{privateonClick=()=>{/* ... */};^^^^^^^^^^^^^^^}
space-before-blocks(formatting/layout rule)
... maybe more
Additional Info
No response