Open sanjeetiitr opened 2 years ago
Any solutions to this currently in existence or workarounds using plain eslint files ?
Hi there, I solved it by fixing eslint-plugin-prettier
to "3.3.1"
✅
I am having same issue 😢
steps to reproduce
1) npx tsdx create mylib 2) cd ./mylib 3) yarn lint
Resulting in the error below:
I had to do the following in tsdx based project to fix this
Executeyarn add -D eslint-plugin-prettier
or npm
equivalent to add the latest package.
Shouldn't it be installed as part of tsdx, the way eslint or jest are installed?
I got some further eslint issues like this one and I also wanted to upgrade eslint independently of tsdx. Followed the answer inspired from this reply about installing Jest independently.
Here are the package.json resolutions overriding tsdx internal packages versions
{
"resolutions": {
"**/tsdx/jest": "27.5.1",
"**/tsdx/ts-jest": "27.1.5",
"**/tsdx/eslint": "^7.32.0"
}
}
It works but is this a correct way to override tsdx internal package versions? I think tsdx versions should upgrade more often to upgrade these packages, the last npm published package was 2 years ago.
If you have a separate eslint config file containing a number of plugins that you want to use, add each of them using yarn add -D <eslint-plugin-name>
or npm
equivalent to add the plugin packages.
Execute yarn run lint
now and it should report ESLint problems.
I think this is still broken on the main branch of tsdx
Current Behavior
I created a new tsdx app basic storybook app and run the lint command.
Error while running![image](https://user-images.githubusercontent.com/13379529/133941971-c5e1d664-9699-4d02-a00d-8782ee618685.png)
npm run lint
command