oclif
oclif copied to clipboard
Bug: `oclif generate` initialises a project that produces a typescript version warning when running eslint
Do you want to request a feature or report a bug?
A bug.
Steps to reproduce
npm -g install oclif
oclif generate mynewcli
cd mynewcli
yarn test
What is the current behavior?
The tests pass but eslint shows the following warning:
=============
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0
YOUR TYPESCRIPT VERSION: 4.5.3
Please only submit bug reports when using the officially supported version.
=============
What is the expected behavior?
There should be no such warning in a freshly bootstrapped project.
My node version is v14.18.1
I don't have typescript installed globally on the system.
Not sure why the error says your typescript version is 4.5.3 given that the project uses 4.4.3.
yarn why @typescript-eslint/typescript-estree reports the following:
yarn why v1.22.17
[1/4] Why do we have the module "@typescript-eslint/typescript-estree"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@typescript-eslint/[email protected]"
info Reasons this module exists
- "eslint-config-oclif-typescript#@typescript-eslint#parser" depends on it
- Hoisted from "eslint-config-oclif-typescript#@typescript-eslint#parser#@typescript-eslint#typescript-estree"
- Hoisted from "eslint-config-oclif-typescript#@typescript-eslint#eslint-plugin#@typescript-eslint#experimental-utils#@typescript-eslint#typescript-estree"
info Disk size without dependencies: "792KB"
info Disk size with unique dependencies: "2.51MB"
info Disk size with transitive dependencies: "4.52MB"
info Number of shared dependencies: 30
Done in 0.84s.
Adding the following the .eslintrc works as a workaround, but it doesn't sound a good long term solution.
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false
}
Thanks.