SublimeLinter-Csslint not showing error why? - sublimelinter

I have install sublimelinter and csslint but when i make a error in the css file nothing happens I have install all the neccesary documentation like :
Install Node.js (and npm on Linux).
2.Install csslint by typing the following in a terminal:
npm install -g csslint
what i do wrong ?

Sometimes Sublime doesn't pickup the linter after installing it via Package Manager, so you may need to restart your editor.
Verify that csslint really works by executing it from command line, e.g.:
csslint yourfile.css
If the above works, enable debug mode for SublimeLinter in the command palette (Shift+Cmd+P -> Enable Debug Mode) and then show the console (View menu -> Show Console). Check if there are any errors.
Open your CSS file and try to invoke the linter explicitly from the command palette (Shift+Cmd+P -> SublimeLinter: Lint This View)
If everything is setup correctly, the linter will show the errors automatically as soon as you open your CSS file.

Related

Why do I keep getting this error every time I try to use 'create-react-app react-hello' in my terminal

I got this error
create-react-app : File C:\Users\Username\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170
after running this command;
create-react-app react-hello
I am just trying to understand what I should do to make it work because when I use
npx create-react-app react-hello
it's working perfectly.
can I make sure that I do not get this error when I run the command?

hardhat, truffle, brownie, react stopped working?!? error Command failed with exit code 1

I was working with brownie and everything was working smoothly, launched my first useDapp app and it was a lot of fun. I wanted to see what truffle was about and installed it via npm and there were a bunch of warnings and it didn't seem smooth when it came to functionality so I might have installed it via yarn, expecting the package installer to fix things. It worked for a while then it started to timeout upon migration with tested code that used to launch perfectly fine? I thought it might of been a bug or some form of overlapping installation. I moved on to hardhat and installed it via NPM and it wouldn't compile, so I installed it via Yarn and it compiled fine. I went on to creating a new file and accidentally hit Esc when it was initializing a new file and setting the root. Somewhere in between there I tried to install the shorthand and it didn't work. It only opened a Windows help window instead of call hardhat when I typed hh --help. After that I couldn't call hardhat via yarn hardhat nor npx hardhat outside of the file....the file that previously wouldn't compile was still able to compile via npx hardhat compile?
It sometimes says "module not found", other times it says something about local installation.
I kind of got frustrated and wanted to play with react a little more and when I went to start yarn I got an error message. I followed the prompt and it didn't work, I googled it and had no luck with their common resolutions. I tried to upgrade eslint and even install 7.11.0 and it keeps saying I have version 5.16.0?.
EDIT: not sure if it is relevant, I tried to update my yarn to 1.22.17 and it said it did, although it says im running 1.22.15.
windows 7
node = v12.13.0
npm =6.12.0
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^7.11.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
C:\Users\Nancy\node_modules\eslint (version: 5.16.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if C:\Users\Nancy\node_modules\eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
error Command failed with exit code 1.
Kind of embarrassing, the answer was in the error message.
6. Check if C:\Users\Nancy\node_modules\eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Hardhat set root in the wrong directory and I ended up with a node_module folder in a parent directory that was messing things up
Reinstalled truffle globally via yarn add global truffle and it ran smoothly. Evidently, truffle acts up with certain NPM versions.
Hardhat doesn't seem to support global installations yet. Its been working fine being locally installed into each separate hardhat project via yarn add -D hardhat
I haven't been able to get the shorthand to work without invoking yarn first, such as yarn hh <command>

Error with babel-macros when create npm package

I've a problem with babel-plugin-macros, currently I created a component package with twin.macro, the compiler shows a success message, and the npm publish command too. But, if I install the library and use on my project shows the next error:
MacroError: The macro you imported from "undefined" is being executed
outside the context of compilation with babel-plugin-macros. This
indicates that you don't have the babel plugin "babel-plugin-macros"
configured correctly. Please see the documentation for how to
configure babel-plugin-macros properly:
https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/user.md
The libraries babel-macros-plugin and tailwind already been setup in the project
I go this same error because we changed some files to .tsx and forgot to update the babel extensions.

React Webpack creating boilerplate

I'm trying to make react boilerplate with webpack with this tutorial
enter link description here
But getting an error when trying run the code (npm run start). I'm getting the error when reaching the section -> Setting up webpack-dev-server
. Error message is this
From what I can tell, you lack the #babel/core npm package...
This is a classic example of when to do exactly what the error message is telling you to do. This took me A VERY LONG TIME to figure out as a developer, and I still waste time NOT following the directions on screen from time-to-time... So you are not alone if this is indeed the case.
The first issue in the error message that you have control over, is a missing #babel/core package in your node_modules/ directory. I say try satisfying the dependency by installing the package exactly as specified.
I'm sure you know how to do so already, but for clarity's sake, you'll want to enter the following command into your terminal prompt, from your project's root directory:
$ npm i #babel/core
after it's finished installing, re-enter $ npm run start and see if that fixed it.
If it doesn't, and the error message doesn't change, my only other idea would be to install babel-loader#7 like the error message is telling you to do.
$ npm i babel-loader#7
If it doesn't fix it and a new error is displayed, repeat the process until your dependencies are worked out.
Or, you can also move or rename your node_modules/ directory and enter $ npm i to rebuild your package dependencies.
make sure to keep your original node_modules/ folder handy though, just in case you need it. Once you have everything running, you are free to get rid of it.
I hope this helps!!!
run npm install --save-dev #babel/core then try building again.

How can i write React.js code in Visual Studio code?

When i write react code in Visual Studio Code, it is showing me error. How can i get rid of those errors?
Thanks in Advance,
Amala
Go to File-> Preferences -> Workspace Settings
Then enter the following lines in settings.json file
{
"javascript.validate.enable": false
}
Step 1 :
Press Ctrl Shift X
It shows Extensions Screen.
Or
navigate to Extensions Screen manually
Step 2 :
Search for jsx Extension.
and after result comes install Extension with name jsx.
then visual Studio code not showing error on html element.
First make sure you have installed all extensions for VS Code for proper code coloring and hitting for React.js, I think React-Native extensions work as well.
If you have npm installed in your system install eslint
npm install -g eslint
There is a cool add on to configure eslint to properly hitting JSX and you need to install it in your project directory. Go to your project directory on the terminal, or open the internal terminal on VS Code with the project open and type in:
npm install --save eslint-config-rallycoding
After this package is installed I suggest to create a .eslintrc file on the root of your project. This should be a proper JSON formatted code:
{
"extends": "rallycoding"
}
save the file and then restart VSCode, just in case. This should fix those errors. The ESLint configuration package belongs to Stephen Grider, pretty sure is open source, but giving credit just in case, and I found it on a real nice tutorial on React-Native and Redux.
The Complete React Native and Redux Course
I had the same issue and I fixed it by saving the file as a .jsx.
I tried all the suggestions here but none works if the file is saved as a .js(which I think is what you are experiencing).
I am hoping a better fix is available somewhere as at this time.

Resources