-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: r is not a constructor #26
Comments
Same with React, my package json:
|
These are the default configurations for a fresh project using NestJS CLI command: |
@dangjoeltang @bithavoc This extension does not support ESLint 8. There is a breaking change where they removed functionality from their API. Please downgrade and try again 🙂 |
and please please please, when posting code don't use screenshots, don't be an end user :) |
@idahogurl thank you for writing and maintaining this extension!
Do you have plans to add support for newer versions of eslint, or are there reasons why this is unlikely/impossible? |
@el-ethan I'd love to support newer versions of ESLint. My pain point right now is the I am working on this PR but I noticed how they have approved PRs that are nearly a year old and not merged. The last time the package was updated was 6 months ago. I'm hesitant to diverge and create my own version of their package. That is the reason behind the extension not supporting ESLint 8+ |
Sorry this is my first ever comment on a github issue, so I don't know proper etiquette :( |
So should my case work? How to debug, and why there is nothing in "Prettier Eslient" output? |
@idahogurl that is totally understandable. Thanks for the information! |
@wclr
|
@idahogurl I installed |
@wclr Alright could I get an example project? |
@wclr I found a fix for your issue. It could not find the your package.json {
"name": "vscode-prettier-eslint-issue",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.0",
"eslint": "^7.32.0",
"prettier": "^2.5.1",
"prettier-eslint": "^13.0.0",
"prettier-eslint-cli": "^5.0.1",
"typescript": "^4.5.5"
}
} Rename .eslintrc.js module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname, // instead of '.'
},
rules: {
eqeqeq: ["warn", "always"],
"array-bracket-spacing": ["warn", "always"],
},
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
}; |
@idahogurl worked, thanks. |
same issue here with nuxt/ts/eslint/prettier |
@SushyDev Sample repo? |
Good news is: "DanielKlys7 approved these changes 13 days ago" |
This issue is stale because it has been open for 14 days with no activity. |
Bump |
@idahogurl did you see?! 👀 🎉 Congrats on your code merge. We all appreciate your hard work! |
@gdibble Close but no cigar. Release is broken https://github.com/prettier/prettier-eslint/runs/6070047136?check_suite_focus=true |
"Close but no cigar" just means more "fun" 😉 😉 |
Hey! Thanks for the update to This is the error I receive when I try to format now:
Here are the relevant package versions as set in the NPM project
And my ESLint config (YAML in this case)
At first I though this was related to my project being a Node.js ESM module, but I reverted back to CJS to test and received the same results. I am not using TypeScript. Am I missing something else compatibility-wise? EDIT: Let me know if this error is ultimately unrelated to the original issue, and I'll open another one. |
@schmannie Maybe see Prerequisites. |
@k-utsumi yep. I'm running a version of |
@schmannie Yes |
Hey! I hope I'm not derailing this issue, but I was trying to update this extension myself — just to see what that might be like — have you managed to bundle the new ESLint with Rollup? No matter what methods I use, Rollup has refused to cooperate. My changes are at schmannie/vs-code-prettier-eslint:4.0.0-beta. P.S. there are definitely a few, unnecessary changes I've made in an effort to get this to work. 😬 |
@schmannie Interesting... 🤔 I will take a look on my side and see if I have the same behavior with Rollbar. |
@schmannie I was able to get Rollbar to run but its output was causing an error when I tried running the extension tests. I used your branch and switched to I just released v5.0.0 as a pre-release. P.S. I was was blown away by how fast |
I use the vue3-recommended, then throw Error: r is not a constructor
The text was updated successfully, but these errors were encountered: