Comments (9)
Looking good:
only 9.7% && 6.7%!
Rule | Time (ms) | Relative
:---------------------------------------|----------:|--------:
@typescript-eslint/no-misused-promises | 3327.775 | 26.8%
@typescript-eslint/no-floating-promises | 1862.377 | 15.0%
etc/deprecation | 1202.930 | 9.7%
react/prefer-stateless-function | 694.252 | 5.6%
import/extensions | 613.231 | 4.9%
@typescript-eslint/unbound-method | 489.783 | 4.0%
react/no-deprecated | 374.281 | 3.0%
react/void-dom-elements-no-children | 270.650 | 2.2%
react/jsx-no-bind | 231.381 | 1.9%
import/no-self-import | 193.985 | 1.6%
Rule | Time (ms) | Relative
:---------------------------------------|----------:|--------:
@typescript-eslint/no-misused-promises | 7968.406 | 28.2%
@typescript-eslint/unbound-method | 2493.286 | 8.8%
@typescript-eslint/no-floating-promises | 2093.141 | 7.4%
import/extensions | 2050.360 | 7.3%
etc/deprecation | 1888.401 | 6.7%
react/prefer-stateless-function | 1402.873 | 5.0%
react/no-deprecated | 919.743 | 3.3%
react/jsx-no-bind | 780.526 | 2.8%
react/void-dom-elements-no-children | 663.284 | 2.3%
react/no-string-refs | 526.400 | 1.9%
from eslint-plugin-etc.
Nice. Now that some other rule is at the top of the list, I'm going to deem this no-longer-a-bug. There are some other things I might play with, at some later stage, so I'll leave this open, but labelled as an enhancement.
from eslint-plugin-etc.
Yeah, I can think of a few ways to make it more performant. Thanks for raising this.
from eslint-plugin-etc.
This should be a little quicker in 0.0.1-beta.19
- which has just been published.
from eslint-plugin-etc.
Confirmed!
From 31.7% && 38.0% down to 23.4% && 26.7%
Rule | Time (ms) | Relative
:---------------------------------------|----------:|--------:
etc/deprecation | 2339.867 | 23.4%
@typescript-eslint/no-misused-promises | 1112.053 | 11.1%
@typescript-eslint/no-floating-promises | 1095.841 | 11.0%
react/prefer-stateless-function | 655.819 | 6.6%
import/extensions | 594.468 | 5.9%
react/no-deprecated | 371.769 | 3.7%
react/void-dom-elements-no-children | 319.616 | 3.2%
react/jsx-no-bind | 239.463 | 2.4%
import/no-self-import | 222.715 | 2.2%
react/no-typos | 188.193 | 1.9%
Rule | Time (ms) | Relative
:---------------------------------------|----------:|--------:
etc/deprecation | 5012.399 | 26.7%
@typescript-eslint/no-misused-promises | 1573.824 | 8.4%
import/extensions | 1542.515 | 8.2%
react/prefer-stateless-function | 1205.946 | 6.4%
@typescript-eslint/no-floating-promises | 1114.325 | 5.9%
react/no-deprecated | 739.743 | 3.9%
react/jsx-no-bind | 664.616 | 3.5%
react/void-dom-elements-no-children | 558.648 | 3.0%
react/no-string-refs | 402.614 | 2.1%
react/no-typos | 393.122 | 2.1%
from eslint-plugin-etc.
Hmm. Still pretty shitty. Hopefully, this can be made faster still using ESLint's variables thingy, but that's a little more complicated. I'll have a look a little later.
from eslint-plugin-etc.
I've had some time to play around with this a bit. Try 0.0.1-beta.20
. It should be quicker.
from eslint-plugin-etc.
yes, agree!
from eslint-plugin-etc.
FWIW, etc/no-deprecated
and etc/no-internal
are currently at the top slowest rules in a project where ESLint is noticeably slow. Not sure if related or if I should open a new issue for performance.
Rule | Time (ms) | Relative
:-----------------------------------------|----------:|--------:
etc/no-deprecated | 2515.552 | 20.5%
import/no-duplicates | 1993.658 | 16.3%
etc/no-internal | 1440.442 | 11.7%
import/export | 1396.381 | 11.4%
total-functions/no-unsafe-enum-assignment | 554.410 | 4.5%
@typescript-eslint/no-floating-promises | 395.713 | 3.2%
@typescript-eslint/no-unsafe-assignment | 215.030 | 1.8%
@typescript-eslint/no-redeclare | 195.273 | 1.6%
camelcase | 188.976 | 1.5%
unicorn/prevent-abbreviations | 175.437 | 1.4%
(on certain uncached runs, etc/no-deprecated
can get up to 10s)
And this was on a recent --fix
run that affected lots of files:
Rule | Time (ms) | Relative
:-----------------------------------------|-----------:|--------:
etc/no-deprecated | 646137.513 | 60.8%
etc/no-internal | 390563.923 | 36.8%
@nrwl/nx/enforce-module-boundaries | 6730.989 | 0.6%
import/no-duplicates | 5080.625 | 0.5%
@typescript-eslint/no-floating-promises | 1931.164 | 0.2%
import/export | 1879.495 | 0.2%
total-functions/no-unsafe-enum-assignment | 1532.563 | 0.1%
@typescript-eslint/no-unsafe-assignment | 596.325 | 0.1%
@typescript-eslint/no-redeclare | 412.016 | 0.0%
rxjs/no-exposed-subjects | 402.550 | 0.0%
from eslint-plugin-etc.
Related Issues (20)
- Feature request, prefer-less-than rule: Add exception for literals, be consistent with eslint native "yoda" rule
- Feature request: Add option to avoid conflict with @typescript-eslint/prefer-function-type rule
- Feature request: prefer-type
- etc/no-deprecated: support detection within `exports`
- [etc/prefer-interface]: Does not report constructor signature
- `etc/prefer-interface` conflicts with `@typescript-eslint/prefer-function-type` HOT 1
- It seems much similar to `eslint-plugin-sonar` and `eslint-plugin-unicorn`
- `etc/throw-error` crash when rejecting with no value
- `no-commented-out-code` thinks that `// TODO: SOME-TICKET-NR-123` is code
- no-commented-out-code can't detect the chinese comment HOT 1
- `prefer-interface` rule fixer causes compilation error". An interface can only extend an object type or intersection of object types with statically known members"
- no-internal: Ignore internals defined in the same file
- TypeScript 5 support HOT 4
- Is there a way to set no-commented-out-code HOT 1
- Upgrade eslint-etc to v5.2.1
- TypeError: Cannot read properties of undefined (reading 'parent') HOT 2
- Cannot read properties of undefined 'typeAnnotation'
- Library is broken with Typescript v5.2 HOT 12
- Specify what rules are compatible with Javascript and what ones can only work with Typescript
- [Feature request] `prefer-readonly-array`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-etc.