I am using Eslint and Prettier to style and format my code. I have already set up my eslint and prettier configuration and everything is working fine. However, I am facing a problem on the bitbucket deployment. When my code is deployed, the pipeline fails due to eslint/prettier linting errors. However, these errors were not present when I run my code locally. It seems that the pipeline is not linting correctly?
Some advice or help will be much appreciated.
I ran into this error because of a version issue with eslint. Once we incremented the version, deleted the node-modules and package.lock file, we were able to resolve the errors successfully by formatting the erroring files individually
Related
I'm using VSCode. After the last update of the IDE, I see this error (Even if I didn't open any project to work on).
I googled it, and I tried several actions according to this link:
https://github.com/microsoft/TypeScript/issues/43838
but none of them seems to work.
Anyone faced the issue? (I'm not using TypeScript in any of my projects and I don't have any tsconfig.ts file). Is it related to one of my VSCode extensions?
It is a general update problem about visual-studio-code with the last update. Issue can be followed from here: https://github.com/microsoft/vscode/issues/168420
Installing JavaScript and TypeScript Nightly extension is helpful for me.
Configure .eslintrc.json in your folder again and reload the vs code
example:
.eslintrc.json file for salesforce
Or
you can refer below link to config your eslint file
https://eslint.org/docs/latest/user-guide/configuring/
My GitHub is hooked up to Vercel, and every time I push, it should deploy. It was working as it should - but then stopped. The main problem I am seeing is
error - ESLint: ESLint configuration in .eslintrc.json is invalid: - Property "parser" is the wrong type (expected string/null but got ["#babel/eslint-parser"]).
and then the last line reads:
Error: Command "next build" exited with 1
I have read through previous posts, and tried all things I've seen recommended to fix this issue, but I still cannot get a successful build. Any advice?
I believe you should just use "#babel/eslint-parser" for the parser option, no brackets, it should just be a string.
I highly doubt this is a Jest issue, but it's where the issue is popping up, so here goes.
My team is using Jest for tests. Today, I was writing tests, something I hadn't done in a project repo for about a week. When running the tests today, they all failed. I noticed that all the double quotes were being encoded like so:
Expected value to be (using ===):
"{\"data\":\"Important data\"}"
Received:
"{"data":"Important data"}"
Previously, the tests all ran and passed fine.
For my own sanity, I hopped unto the master branch and ran the tests, only to receive the same result. My teammates have also run the tests on their updated master branches but didn't have any issues.
It appears to be local to my machine. I delete node_modules and package-lock.json, and even re-cloned the entire repository. Unfortunately, I am still having the same issue and I'm not sure where to look. If this issue is remotely familiar to anyone, I'd love to hear suggestions.
Some maybe relevant info:
macOS 10.14.6
iterm2 (UTF-8 encoding)
node 8.10
npm 6.11.3
jest 24.8.0
Turns out the issue was with Node.js. I had not properly configured AVN to read from .node-version, causing the tests to run using another version of node.
I am currently building a Visual Studio Code extension in typescript and I want to write some tests for it. My tests work fine using the npm test --silent command, there are just annoying errors saying Rejected cached data from file: and then a file name in my AppData\Roaming\Code\CachedData folder. I tried to look up the error but the issue doesn't seem to be well documented.
FYI: VSCode extensions use mocha as their default testing framework.
For whatever reason deleting the CachedData folder fixed the issue. Not ideal but it works.
I am trying to figure out how to package an unchanged fork of VS Code.
My first steps were to follow the electron application distubution documentation, which has not been successful. I also found this post, where another user had the same question. However, the vscode-win32 gulp task seems to have been replaced by x64 and ia32 versions, and when I try running these tasks they generate an out-vscode folder as opposed to a full electron project.
This led me to believe that I can use this new out folder (as well as node modules, packages.json, etc.) with the electron release being used by VS Code to mimic the resources/app folder from the installed version of VS Code in Program Files, however when I try running electron.exe using this method I get:
The factory method of "vs/code/electron-main/main" has thrown an exception TypeError: Path must be a string. Received undefined
In short, I have been struggling with this for a couple of days, and I am out of ideas. If anyone has packaged the project and can offer a suggestion for how to do so, I would really appreciate it.
SOLVED
The issue seemed to be due to being branched off of master as opposed to release. I'd assume there are changes in main that aren't accounted for in the gulp task.
For anyone confused by my post, the expected behavior for a successful build is for a folder named VSCode-win32-x64 to be generated in the directory where your vscode clone is located.