pinterest / esprint Goto Github PK
View Code? Open in Web Editor NEWFast eslint runner
License: Apache License 2.0
Fast eslint runner
License: Apache License 2.0
As title. Right now, the lint worker, client, and server all use slightly different instantiations of the CLIEngine. It would be good to consolidate their usage for consistency's sake.
Hey,
i'm trying to use esprint with existing eslint config and can't have any lint when running esprint
.
Here's an example with errors with eslint and with esprint :
❯ yarn linter
yarn run v1.22.10
$ esprint
✨ Done in 1.61s.
I got simple .esprintrc
{
"paths": ["src/**/*.js", "src/**/*.vue"],
"ignored": ["**/node_modules/**/*"],
"port": 5004
}
this is my structure
├── README.md
├── jsconfig.json
├── mabrouk.png
├── netlify.toml
├── nuxt.config.js
├── package-lock.json
├── package.json
├── src
│ ├── components
│ │ ├── Button.vue
│ │ ├── Logo.vue
│ ├── helpers
│ │ ├── has-cookies.js
│ │ ├── isMobileUA.js
│ │ └── prefetch-images-with-fallback.js
│ ├── pages
│ │ ├── index.vue
│ │ ├── inspire.vue
│ │ ├── privacy.vue
│ ├── plugins
│ │ ├── README.md
│ │ ├── global.js
│ │ ├── gtm.js
│ │ ├── html-serializer.js
│ │ ├── link-resolver.js
│ ├── static
│ └── store
│ ├── README.md
│ ├── index.js
│ ├── modal.js
│ └── profileBuilder.js
├── stylelint.config.js
├── .eslintrc.js
├── .esprintrc.js
├── stylelint.config.js
└── yarn.lock
Did I miss something in the configuration ?
Device
Model Name: MacBook Pro
Model Identifier: MacBookPro17,1
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
Tests sometimes fail due to ECONNREFUSED. Need to debug the flakiness
Can we get a new release? Would love to update to a version with fa407b9.
esprint
isn't working for me on Node.js v12.14.0 due to weak
failing to install
There are two open issues on weak
that note that the module doesn't work on Node.js 10 and Node.js 12:
There is an issue recommending weak-napi
: TooTallNate/node-weak#97
Right now, it defaults to require('os').cpus().length
, which has led to bottlenecks in CPU perf before, so we should experiment with passing in different numbers through the command line.
When you run esprint check
in a folder below the project root, only the folder's files are linted, instead of the whole project's
After cloning and running yarn install
, I tried running the tests and about half of them fail:
> yarn run test
yarn run v1.16.0
$ yarn run build
$ rm -rf build && mkdir build && babel src --out-dir build
src/Client.js -> build/Client.js
src/LintRunner.js -> build/LintRunner.js
src/LintWorker.js -> build/LintWorker.js
src/Server.js -> build/Server.js
src/cli.js -> build/cli.js
src/cliUtils.js -> build/cliUtils.js
src/commands/check.js -> build/commands/check.js
src/commands/connect.js -> build/commands/connect.js
src/commands/index.js -> build/commands/index.js
src/commands/stop.js -> build/commands/stop.js
src/startServer.js -> build/startServer.js
src/util.js -> build/util.js
$ jest tests --runInBand
FAIL tests/file-deletion/__tests__/file-deletion.test.js
● Properly updates the cache upon deleting a file
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/file-deletion/__tests__/file-deletion.test.js:36:25)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/failure/__tests__/failure.test.js
● Properly lints and returns errors with server
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/failure/__tests__/failure.test.js:26:25)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/warning/__tests__/warning.test.js
● Properly lints and returns errors with server
expect(received).toEqual(expected)
Expected value to equal:
StringContaining "warning Unexpected var, use let or const instead no-var"
Received:
""
at Object.<anonymous> (tests/warning/__tests__/warning.test.js:27:37)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/subfolders/__tests__/subfolders.test.js
● Properly lints and returns errors with server
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/subfolders/__tests__/subfolders.test.js:26:25)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/suppress-warnings/__tests__/suppress-warnings.test.js
● Properly lints and returns errors with server
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/suppress-warnings/__tests__/suppress-warnings.test.js:19:20)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/fail-on-warning/__tests__/fail-on-warning.test.js
● Properly lints and returns errors with server
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/fail-on-warning/__tests__/fail-on-warning.test.js:17:25)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/success/__tests__/success.test.js
● Properly lints and returns errors with server
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/success/__tests__/success.test.js:26:20)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
FAIL tests/stop/__tests__/stop.test.js
● Server is properly killed after the stop command
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous> (tests/stop/__tests__/stop.test.js:25:20)
at new Promise (<anonymous>)
at Promise.resolve.then.el (node_modules/p-map/index.js:42:16)
Unable to find `.esprintrc` file. Exiting...
PASS tests/noconfig/__tests__/noconfig.test.js
Test Suites: 8 failed, 1 passed, 9 total
Tests: 8 failed, 7 passed, 15 total
Snapshots: 0 total
Time: 17.438s
Ran all test suites matching "tests".
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Looks like esprint is caching something it shouldn't be.
Omers-MacBook-Pro:sigma-monorepo-2point0 omer$ npm run lint
> [email protected] lint /Users/omer/code/sigma-monorepo-2point0
> esprint
/Users/omer/code/sigma-monorepo-2point0/src/react/webapp/src/mutations/index.js
7:1 error More than 1 blank line not allowed no-multiple-empty-lines
✖ 1 problem (1 error, 0 warnings)
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "lint"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `esprint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script 'esprint'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sigma-monorepo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! esprint
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sigma-monorepo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sigma-monorepo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/omer/.npm/_logs/2017-07-07T05_30_17_507Z-debug.log
Omers-MacBook-Pro:sigma-monorepo-2point0 omer$ cat /Users/omer/code/sigma-monorepo-2point0/src/react/webapp/src/mutations/index.js
cat: /Users/omer/code/sigma-monorepo-2point0/src/react/webapp/src/mutations/index.js: No such file or directory
TL;DR: Please create and push git tags to GitHub.
The latest tag pushed is 2.0.0:
but there's a commit that indicates 3.1.0 is the latest:
So it appears like 2.0.0 is the latest:
I'm just uninstalling esprint from my monorepo project with approx 7k lines of code spread across about 150 files because the background servers it is spawning is absolutely hosing my system.
This is a screenshot of htop
from just now. the top four on that list are the esprint servers. A few days ago I found it was using as much as about 2gb memory per server, so about 8gb collectively. Its a shame, because it did work very well, but I can't really use it when it does that to my system :/
Esprint is the tool that ESlint needed to be usable in a fast development workflow. It speeds up a lot the work.
That why I think it would be an awesome addition to ESlint itself. It would improve the life of many dev and would faster a lot it's daily usage.
It could be available via a --watch
option, like what is available for jest.
I installed esprint with yarn set my config
{
"paths": [
"**/*.ts"
],
"ignored": [
"schematics/*",
"node_modules/*",
"coverage/*",
"**/dist/*",
"bazel-out/*",
"external/*",
"deployments/*"
],
"port": 5001
}
and ran esprint
and got this error:
internal/streams/legacy.js:57
throw er; // Unhandled stream error in pipe.
^
Error: connect ECONNREFUSED 127.0.0.1:5001
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
node: 10.16.3
yarn: 1.17.3
(fifteen5) > yarn run esprint ~/Documents/fifteen5(dev✗)
yarn run v1.22.4
$ /home/caleb/Documents/fifteen5/node_modules/.bin/esprint
Rule | Time (ms) | Relative
:----|----------:|--------:
/home/caleb/Documents/fifteen5/node_modules/esprint/node_modules/yargs/yargs.js:1193
else throw err
^
SyntaxError: Unexpected token } in JSON at position 75
at JSON.parse (<anonymous>)
at getEsprintOptions (/home/caleb/Documents/fifteen5/node_modules/esprint/build/cli.js:32:21)
at Object.handler (/home/caleb/Documents/fifteen5/node_modules/esprint/build/cli.js:73:19)
at Object.runCommand (/home/caleb/Documents/fifteen5/node_modules/esprint/node_modules/yargs/lib/command.js:240:40)
at Object.parseArgs [as _parseArgs] (/home/caleb/Documents/fifteen5/node_modules/esprint/node_modules/yargs/yargs.js:1133:35)
at Object.get [as argv] (/home/caleb/Documents/fifteen5/node_modules/esprint/node_modules/yargs/yargs.js:1033:21)
at Object.<anonymous> (/home/caleb/Documents/fifteen5/node_modules/esprint/build/cli.js:80:10)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
(fifteen5) > node --version ~/Documents/fifteen5(dev✗)
'Tipz:' nodejs --version
v12.18.1
The error also happened with yarn run esprint check
esprint version 0.7.0
OS: ubuntu 18
.esprintrc: (located in root of repo)
{
"paths": ["ff/static/modules"],
"ignored": ["**/node_modules/**/*"],
}
Might fix #56 and allow for concurrent test runs. Write port number to a temp file in the project
Currently, adding esprint to a project results in a security issue, as reported by yarn audit
:
$ yarn audit
yarn audit v1.17.3
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ low │ Regular Expression Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ braces │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=2.3.1 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ esprint │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ esprint > sane > anymatch > micromatch > braces │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://www.npmjs.com/advisories/786 │
└───────────────┴──────────────────────────────────────────────────────────────┘
1 vulnerabilities found - Packages audited: 969858
Severity: 1 Low
In order to pull in a version of braces >= 2.3.1, we would need...
esprint should update its dependencies to something that's not ancient. Currently, esprint is asking for ^1.6.0
for sane, which corresponds to a release that's over 2 years old. Upgrading to ^2.5.0
would be pulling in a package that's still more than a year old, but would address the security issue at hand.
This command should stop the esprint server running in the background.
esprint check
is just fine (and seems to spawn 4 workers, based on the output of Task Manager), but manually specifying --workers=2
causes the process to hang.
It seems to actually do the linting (again, based on what I'm seeing in Task Manager), but once the Node processes disappear, control is never returned to the shell.
Hey there,
I installed esprint (^0.7.0) with yarn (1.12.3) and am running yarn esprint check
with a list of ~1k files as xargs.
I was at first experiencing ENOMEM failures, but then started using a circleci node with resource_class: large
(4 vCPUs and 8GB RAM) which caused the job to pass.
However, when I look at the output it looks like I am still hitting Error: ENOMEM: not enough memory, read
at the beginning of the run.
It appears esprint keeps retrying after running out of memory and the job eventually succeeds - can you confirm that this is the case?
If so, it looks like the retries cause the task to take about as long as running eslint. Let me know where I could be going wrong here.
Thanks!
Steps to repro:
Have you considered switching from fb-watchman, which is made by Facebook; to Chokidar, which VS Code uses by itself?
The switch will ensure there's one less native dependency, which means less chance of something going wrong during compilation phase. Chokidar uses fsevents macos-native pkg, but it's n-api-exposed (effectively no compilation).
The eslint CLIEngine class accepts all the same runtime configuration as the cli does if we were to run eslint directly on a set of files.
It would be great if esprint could also accept those same flags on the cli, or even as part of .esprintrc
and forward them in to the engine. Then we could use options like --config
, --fix
or --rules-dir
.
Constructor params: https://eslint.org/docs/developer-guide/nodejs-api#cliengine
Cli options: https://eslint.org/docs/user-guide/command-line-interface#options
Looks like we'd want to get the values into this constructor: https://github.com/pinterest/esprint/blob/master/src/LintWorker.js#L3
When running esprint --fix
it outputs
100 problems (7401 errors, 4 warnings)
51 errors and 0 warnings potentially fixable with the `--fix` option.
Those errors are not fixed. Running esprint check --fix
will fix the errors. Is there some issue with caching?
It seems that the latest published version on npm does not correspond to source code here. Specifically the code for supporting the --quiet option is missing.
Do you think you could publish updated package or make a new release?
Got error 'propTypes' is not defined no-undef when running esprint but works fine when using eslint.
Is esprint using fixed version of eslint and babel-lint?
Dogfooding
0:0 warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override
I just tried to upgrade Eslint from V7 to V8 and Esprint stopped working.
Any hint on why is that?
Our command is "lint:js": "esprint check",
and dependencies:
"eslint": "^8.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-nuxt": "^2.0.0",
It's a Nuxt.js project.
esprint config as follow:
{
"paths": ["**/*.vue", "**/*.js"],
"ignored": ["**/node_modules/**/*"],
"port": 5004
}
The error I have on running the lint is:
> esprint check
esprint check
Runs eslint in parallel with no background server
Options:
--version Show version number [boolean]
--help Show help [boolean]
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/util/glob-util' is not defined by "exports" in /private/var/www/html/my_project/node_modules/eslint/package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:437:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:477:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/private/var/www/html/my_project/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js:43:34)
at Module._compile (internal/modules/cjs/loader.js:1068:30) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
{
"paths": [
"app/*.js",
"app/*.jsx",
"app/**/*.js",
"app/**/*.jsx"
],
"ignored": [
"app/**/*.sandbox.js",
"app/vendor/*/lib/*.js",
"app/vendor/**/lib/*.js",
"app/vendor/*/lib/**/*.js",
"app/vendor/**/lib/**/*.js",
"app/**/__tests__/*.js",
"app/**/__tests__/**/*.js"
],
"port": 5004
}
BUT I see errors like next
....../app/components/chart/Chart/__tests__/Chart.sandbox.test.js
2:19 error 'react/jsx-no-bind' rule is disabled but never reported eslint-comments/no-unused-disable
File must be matched in ignore pattern. but not
Example:
$ yarn
/home/travis/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/lib/cli.js:46083
let {
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/travis/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js:24:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Steps to reproduce
The solution at the moment was to run esprint stop
then esprint
which basically restarts the server
Similar to flow -- helpful for building UIs/Clients on top of esprint
I noticed an unusual error recently during yarn install
in my project:
fatal: unable to access 'https://github.com/christianvuerings/dnode/': Failed to connect to github.com port 443: Connection timed out
It seems very unconventional for any connection to GitHub, so I looked up where this came from:
$ yarn why dnode
yarn why v1.22.0
[1/4] Why do we have the module "dnode"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
- "esprint" depends on it
- Hoisted from "esprint#dnode"
Done in 2.08s.
Sure enough, when I look in package.json
in this repo, I see this:
"dnode": "https://github.com/christianvuerings/dnode#e08e620b18c9086d47fe68e08328b19465c62fb7",
Why is this URL being used instead of the normal npm package? This seems highly unusual to me and a lot less reliable than pulling the package from npm. If that repo ever becomes unavailable (like if GitHub is down or the user deletes the repo), then all installs of esprint will fail. This wouldn't happen with npm packages since old versions are never taken down.
Hello,
it seems that esprint
used with lint-staged
still lints all files instead of only the files staged.
Is there an option to set to make it work correctly with lint-staged
?
We should have the ability to support autofixing
Followup based on what's referenced in the ticket #122
Using the default number of workers on a MacBook pro results in the system grinding to a halt. 100% CPU/Memory utilization for a ~10k LOC project.
With defaults:
time TIMING=true npm run lint
>lint /Users/jpowers/workspace/project/server
> esprint check
Rule | Time (ms) | Relative
:----|----------:|--------:
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2405.702 | 69.4%
@typescript-eslint/await-thenable | 813.312 | 23.5%
import/order | 119.299 | 3.4%
@typescript-eslint/no-misused-promises | 25.982 | 0.7%
@typescript-eslint/no-unused-vars | 20.091 | 0.6%
quote-props | 16.679 | 0.5%
@typescript-eslint/no-unnecessary-type-assertion | 13.511 | 0.4%
one-var | 7.027 | 0.2%
@typescript-eslint/type-annotation-spacing | 4.930 | 0.1%
@typescript-eslint/prefer-function-type | 4.844 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1815.848 | 59.0%
@typescript-eslint/await-thenable | 646.832 | 21.0%
@typescript-eslint/no-unnecessary-type-assertion | 287.133 | 9.3%
import/order | 178.274 | 5.8%
@typescript-eslint/no-misused-promises | 43.354 | 1.4%
@typescript-eslint/no-unused-vars | 24.754 | 0.8%
quote-props | 15.292 | 0.5%
no-undef-init | 8.347 | 0.3%
@typescript-eslint/unified-signatures | 6.827 | 0.2%
constructor-super | 5.520 | 0.2%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1954.114 | 50.7%
@typescript-eslint/await-thenable | 977.483 | 25.3%
@typRule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2357.169 | 60.2%
@typescript-eslint/await-thenable | 634.642 | 16.2%
@typescript-eslint/no-unnecessary-type-assertion | 379.759 | 9.7%
@typescript-eslint/no-misused-promises | 297.357 | 7.6%
import/order | 124.817 | 3.2%
@typescript-eslint/no-unused-vars | 37.274 | 1.0%
quote-props | 35.337 | 0.9%
@typescript-eslint/type-annotation-spacing | 5.664 | 0.1%
no-undef-init | 5.323 | 0.1%
no-multiple-empty-lines | 3.612 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1934.117 | 50.6%
@typescript-eslint/await-thenable | 1615.115 | 42.2%
import/order | 151.284 | 4.0%
@typescript-eslint/no-unnecessary-type-assertion | 22.628 | 0.6%
@typescript-eslint/no-unused-vars | 20.450 | 0.5%
quote-props | 13.902 | 0.4%
@typescript-eslint/no-misused-promises | 7.386 | 0.2%
@typescript-eslint/type-annotation-spacing | 7.214 | 0.2%
one-var | 6.300 | 0.2%
@typescript-eslint/triple-slash-reference | 6.231 | 0.2%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2083.999 | 70.9%
@typescript-eslint/await-thenable | 545.413 | 18.5%
import/order | 108.218 | 3.7%
@typescript-eslint/no-misused-promises | 95.606 | 3.3%
@typescript-eslint/no-unused-vars | 40.991 | 1.4%
quote-props | 10.765 | 0.4%
@typescript-eslint/no-unnecessary-type-assertion | 8.610 | 0.3%
@typescript-eslint/triple-slash-reference | 5.154 | 0.2%
object-shorthand | 4.409 | 0.1%
prefer-const | 3.790 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1828.159 | 55.2%
@typescript-eslint/await-thenable | 791.248 | 23.9%
@typescript-eslint/no-unnecessary-type-assertion | 374.754 | 11.3%
import/order | 160.821 | 4.9%
@typesescript-eslint/no-unnecessary-type-assertion | 647.662 | 16.8%
import/order | 115.840 | 3.0%
@typescript-eslint/no-misused-promises | 53.599 | 1.4%
@typescript-eslint/no-unused-vars | 38.657 | 1.0%
@typescript-eslint/type-annotation-spacing | 10.788 | 0.3%
no-eval | 10.223 | 0.3%
@typescript-eslint/triple-slash-reference | 7.961 | 0.2%
no-undef-init | 7.169 | 0.2%
cript-eslint/no-misused-promises | 83.192 | 2.5%
@typescript-eslint/no-unused-vars | 16.090 | 0.5%
quote-props | 15.594 | 0.5%
object-shorthand | 3.882 | 0.1%
@typescript-eslint/triple-slash-reference | 3.781 | 0.1%
no-undef-init | 3.481 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1968.008 | 71.4%
@typescript-eslint/await-thenable | 353.530 | 12.8%
@typescript-eslint/no-unnecessary-type-assertion | 193.051 | 7.0%
import/order | 107.403 | 3.9%
@typescript-eslint/no-misused-promises | 34.862 | 1.3%
@typescript-eslint/no-unused-vars | 27.230 | 1.0%
quote-props | 23.326 | 0.8%
@typescript-eslint/type-annotation-spacing | 6.214 | 0.2%
object-shorthand | 5.387 | 0.2%
no-unsafe-finally | 3.939 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1906.192 | 69.6%
@typescript-eslint/await-thenable | 673.993 | 24.6%
import/order | 67.404 | 2.5%
@typescript-eslint/no-unused-vars | 24.295 | 0.9%
@typescript-eslint/no-misused-promises | 21.142 | 0.8%
@typescript-eslint/no-unnecessary-type-assertion | 8.853 | 0.3%
quote-props | 4.491 | 0.2%
one-var | 4.461 | 0.2%
@typescript-eslint/triple-slash-reference | 3.839 | 0.1%
@typescript-eslint/type-annotation-spacing | 3.559 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2052.226 | 76.5%
@typescript-eslint/await-thenable | 249.864 | 9.3%
@typescript-eslint/no-misused-promises | 214.061 | 8.0%
import/order | 70.266 | 2.6%
@typescript-eslint/no-unnecessary-type-assertion | 37.768 | 1.4%
@typescript-eslint/no-unused-vars | 12.217 | 0.5%
quote-props | 11.349 | 0.4%
no-trailing-spaces | 8.992 | 0.3%
constructor-super | 5.879 | 0.2%
object-shorthand | 4.490 | 0.2%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2671.810 | 81.2%
@typescript-eslint/await-thenable | 436.855 | 13.3%
import/order | 85.942 | 2.6%
@typescript-eslint/no-unnecessary-type-assertion | 25.398 | 0.8%
@typescript-eslint/no-unused-vars | 12.903 | 0.4%
@typescript-eslint/no-misused-promises | 8.031 | 0.2%
quote-props | 5.421 | 0.2%
@typescript-eslint/ban-ts-ignore | 4.919 | 0.1%
no-undef-init | 3.972 | 0.1%
one-var | 3.893 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prRule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1787.264 | 58.8%
@typescript-eslint/await-thenable | 488.108 | 16.1%
@typescript-eslint/no-unnecessary-type-assertion | 418.249 | 13.8%
@typescript-eslint/no-misused-promises | 157.097 | 5.2%
import/order | 102.093 | 3.4%
quote-props | 23.257 | 0.8%
@typescript-eslint/no-unused-vars | 15.112 | 0.5%
no-console | 8.238 | 0.3%
@typescript-eslint/type-annotation-spacing | 5.045 | 0.2%
@typescript-eslint/triple-slash-reference | 4.734 | 0.2%
Rule | Time (ms) | Relative
:------------------------------------------|----------:|--------:
prettier/prettier | 2219.086 | 84.4%
@typescript-eslint/await-thenable | 317.094 | 12.1%
import/order | 45.439 | 1.7%
@typescript-eslint/no-unused-vars | 13.673 | 0.5%
eol-last | 6.244 | 0.2%
@typescript-eslint/triple-slash-reference | 3.785 | 0.1%
object-shorthand | 3.248 | 0.1%
@typescript-eslint/no-misused-promises | 2.678 | 0.1%
@typescript-eslint/type-annotation-spacing | 1.825 | 0.1%
no-eval | 1.711 | 0.1%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2624.948 | 69.5%
@typescript-eslint/await-thenable | 675.807 | 17.9%
import/order | 222.969 | 5.9%
@typescript-eslint/no-misused-promises | 109.236 | 2.9%
@typescript-eslint/no-unnecessary-type-assertion | 57.721 | 1.5%
@typescript-eslint/no-unused-vars | 33.332 | 0.9%
quote-props | 16.972 | 0.4%
@typescript-eslint/type-annotation-spacing | 3.856 | 0.1%
constructor-super | 3.192 | 0.1%
prefer-const | 2.962 | 0.1%
ettier/prettier | 2147.697 | 77.3%
@typescript-eslint/await-thenable | 355.747 | 12.8%
@typescript-eslint/no-unnecessary-type-assertion | 99.543 | 3.6%
import/order | 93.347 | 3.4%
quote-props | 16.467 | 0.6%
@typeRule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 2068.428 | 57.6%
@typescript-eslint/await-thenable | 1082.621 | 30.2%
import/order | 170.699 | 4.8%
@typescript-eslint/no-unnecessary-type-assertion | 143.324 | 4.0%
@typescript-eslint/no-misused-promises | 49.256 | 1.4%
@typescript-eslint/no-unused-vars | 17.106 | 0.5%
quote-props | 10.092 | 0.3%
prefer-const | 8.666 | 0.2%
@typescript-eslint/type-annotation-spacing | 8.607 | 0.2%
one-var | 5.899 | 0.2%
script-eslint/no-misused-promises | 16.311 | 0.6%
@typescript-eslint/no-unused-vars | 13.947 | 0.5%
no-undef-init | 4.402 | 0.2%
@typescript-eslint/triple-slash-reference | 4.317 | 0.2%
object-shorthand | 3.775 | 0.1%
TIMING=true npm run lint 1.14s user 0.50s system 2% cpu 56.361 total
With --workers=2
:
$ time TIMING=true npm run lint
> /Users/jpowers/workspace/project/server
> esprint --workers=2 check
Rule | Time (ms) | Relative
:----|----------:|--------:
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1389.799 | 64.3%
@typescript-eslint/await-thenable | 480.108 | 22.2%
import/order | 121.040 | 5.6%
@typescript-eslint/no-unnecessary-type-assertion | 55.078 | 2.5%
@typescript-eslint/no-unused-vars | 36.622 | 1.7%
@typescript-eslint/no-misused-promises | 26.087 | 1.2%
object-shorthand | 6.845 | 0.3%
no-undef-init | 5.523 | 0.3%
@typescript-eslint/type-annotation-spacing | 5.049 | 0.2%
one-var | 4.668 | 0.2%
Rule | Time (ms) | Relative
:------------------------------------------------|----------:|--------:
prettier/prettier | 1235.131 | 64.8%
@typescript-eslint/await-thenable | 402.469 | 21.1%
import/order | 121.505 | 6.4%
@typescript-eslint/no-unused-vars | 35.038 | 1.8%
@typescript-eslint/no-unnecessary-type-assertion | 34.936 | 1.8%
@typescript-eslint/no-misused-promises | 34.211 | 1.8%
object-shorthand | 5.669 | 0.3%
quote-props | 4.658 | 0.2%
no-undef-init | 4.370 | 0.2%
one-var | 3.521 | 0.2%
TIMING=true npm run lint 0.85s user 0.19s system 7% cpu 14.785 total
Environment:
$ esprint --version
0.7.0
$ eslint --version
v6.8.0
We removed the lint status updates in #41 , but I think that it may be good to bring that back. We should figure out an elegant way of approaching and logging to the console
We need to be able to override values in .esprintrc
, either via CLI arguments or an alternative .esprintrc
file. If we do have an alternative config file ideally we could extend from some base set of configs and override those, so we don't have to have a lot of duplicate configuration.
We should have a suite of benchmarks in place to have a baseline and keep track of perf regressions.
The code has been merged but not released -- 9629d33
Right now, we've been defaulting to 5004
as our port, and as of right now our kill
command is just hard-coded to kill port 5004. Let's make this better :)
We should set up some sort of testing infrastructure to make sure things don't break whenever we make changes :)
Beef up the documentation explaining what goes into an .esprintrc
file, what commands are available, and what options are available.
Right now, we have to run yarn run start
in a separate terminal tab in order to watch for code changes and compile them back down to ES5. babel-register
would make developing for esprint a bit easier.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.