ESLint does not work in VSCode - node.js

I have a global install of ESLint via npm. I can successfully lint a file from the command line, but not from within VS Code. I have followed the instructions to use ESLint within Visual Studio Code, but it fails to work. I do have an eslintrc file. I have also uninstalled and reinstalled eslint a number of times.
VS Code does not produce any error message, it just does not lint the file. I was able to use JSHint very easily, but even though the ESLint installation seems similar, it just does not work. I am just a student, and don't know what other details may be helpful. I'm happy to provide any additional information needed.

Related

CodeMix/Eclipse cannot find 'react/jsx-dev-runtime'

I'm completely new to React, Node, NPM, and CodeMix in Eclipse. I'm a veteran java developer and so want to use eclipse over VSCode for familiarity. I'm following this tutorial:
https://www.genuitec.com/react-tutorial-getting-started/
I get to step 5 and run
react-scripts start
The result:
./src/index.js
Module not found: Can't resolve 'react/jsx-dev-runtime' in 'C:\temp\workspace\CCFPortal\src'
I created my project via the new project to create a React project. The wizard added all the standard code. Bringing up the terminal gave me some issues because the terminal doesn't seem to set the path to bring nodejs.exe into scope, so I did it manually in the terminal window. Adjusting the properties in window->preferences terminal+ doesn't seem to ever take effect.
I did the following in npm (in addition to the steps in the tutorial) because there were two 'warnings' in the markers view that suggested it. As near as I can tell, all commands were successful whether from the tutorial or these two (though it does flag some 'vulnerabilities' in npm that I force fixed).
npm install #types/react
npm install #types/react-dom
It is indeed true that there is no react/jsx-dev-runtime under that src folder. There's NOTHING there but the src. But I'm unclear why it wasn't there given that I ran npm install and the other things suggested in the tutorial.
Can someone help explain my pathing issue in the terminal and especially why npm is doing this when I run react-scripts start?

How can I solve the prettier/prettier problem

I'm using nuxtjs, and I installed eslint on my project, and upon using npm run dev, I get a bombardment of errors. How can I fix this:
This error is related to Windows Line endings being different from Unix ones. Try running npx prettier --write . on your project's directory. This command will tell prettier to fix simple errors (such as this one) when found.
To prevent this error from happening again you can either set "end-of-line" to auto on your .prettierrc file or try setting line endings to "Unix"/LF on your editor: instructions for VSCode and for IntelliJ-based editors

Gulp warnings getting started with JointsWP

I discovered JointsWP starter theme which looks promising.
However, I'm having troubles getting started with the sass version which I would like to use.
I did a fresh installation of wordpress, and installed the jointswp theme.
When I do npm install, it installs the dependencies.
But when I do 'gulp', I get a bunch of warnings.
Doing gulp watch and gulp styles seems to work but doing gulp vendor-js gives a "Too many errors. (67% scanned)." reply.
When I install a fresh copy of foundation 6 and use the foundation-cli, I have no problems what so ever.
Does anyone know what might be causing this?
Image of errors
Sorry for the slow response.
Those errors are normal - they're actually warnings. Your code will compile fine.
It looks like JSLint has some "issues" with how some of the Foundation JavaScript is implemented.

Node.JS, CLI with VSCode not finding path to NPM modules, launch.json

I want to write a command line program to use via node.js and CLI module. VSCode is not finding .require('cli') so no intellisense.
Then when I launch for debug it isn't looking in the right place, it's looking at APP\npm_modules\cli.js when it is APP\npm_modules\cli\cli.js.
I do have cli installed both locally and globally and I have a NODE_PATH environment pointing accordingly.
The same code works correctly when run at the command line, so it's a VSCode issue. Perhaps, there is a different editor that offers debugging that I should consider?
My mistake. Turns out that I had enabled the debugger to break on all exceptions and as .require resolves, it is looking in several places, eventually the module is found, but there are a number of caught exceptions along the way. I was stuck at looking at the first exception.

Issues installing swiper.js (node.js/grunt noob)

Having issues getting swiper.js to work. Requires grunt/bower. I'm completely new to js generators and am only able to get through about half the walkthrough before running into issues.
When I type $grunt dist into terminal, I get the following response: -bash: dist: command not found
What step am I missing?
Followed the idangerous steps to the letter: http://www.idangero.us/sliders/swiper/plugins/scrollbar.php
I have most often see "X command not found" for one of the following reasons:
The project's Grunt dependencies aren't installed or aren't installed properly
Your Gruntfile is mis-configured or missing
To fix this, first make sure there is a package.json file in your project. This will tell the npm what dependencies the project has and install them accordingly (assuming the package.json file is also configured correctly).
Next, make sure you have installed grunt correctly.
If you're still having issues, open your Gruntfile and search for:
grunt.registerTask('dist
This will show where the "dist" task is being defined. If you for some reason don't find it, then there's your problem. If you do find it, then check the proceeding commands inside square brackets that look like this:
grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']);
'clean', 'dist-css', etc. are all other tasks defined in the Gruntfile, and there could be an issue with those as well.
If there's an issue with your package.json or Gruntfile, then trying re-installing the project with bower and repeat the above steps to ensure that it's not an issue on your end.
If it's not, then something is probably wrong with the author's source code.

Resources