disable the warnings in VS code - react-native

enter image description here
When I click Disable(Workspace) the error is:
Cannot disable extension 'ESLint'. Extension 'Node.js Extension Pack' depends on this.
In what other way can react-native errors be eliminated???

You need to define .eslintignore file in your root directory and add the path of the folder you wish to ignore from linting.
Reference: https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories

The suggested way to solve the issue is to resolve all the linter issues as they can help you to overcome some scaling issues and make your code consistent.
Workaround for the problem is you can create a file .eslintignore in the root directory of your project and add the file path for which you want to disable the linter.
To disable the Eslint. You can follow the steps.
Navigate to the folder where you defined package.json (Project root directory).
Create a new file with the name .eslintignore
Edit the .eslintignore to add the files where you do not want the linter. Example, you have an src directory where all the react code is present, you want to diable linters for whole src directory. Add the following line in .eslintignore.
src/*

Don't know if you can disable it all but this worked for me for the time being add this // eslint-disable-next-line before the line it warned about

Related

Vue - Disable Eslint

I did some research, but could not find a quick fix to this situation:
Vue-cli 3.4.0 - Webpack 4.29.0
My project does not have config/index.js as mentioned here.
I tried to open vue.config.js and disable eslint does not work.
I removed the cli-plugin-eslint package.
Don't have .eslintrc.js.
Could not find any other configuration about eslint in project.
--- Fix ---
I realize that I didn't control my settings well. It was built in vetur.
the easiest way to ignore eslint is to ignore the files you dont want to be linted. For example, create .eslintignore in your project root folder. then just add the following folder which you dont want to lint like,
add src\

Stylelint error in PhpStorm IDE : no configuration provided

I cannot make stylelint to work in PhpStorm
"C:\Program Files\nodejs\node.exe" "K:/dev/npm packages/node_modules/stylelint/bin/stylelint.js" -f json --stdin-filename ..\..\..\..\..\..\..\..\:/dev/D8/themes/amu_www/css/style.css
K:\:\dev\D8\themes\amu_www\css\style.css
Error: No configuration provided for K:\:\dev\D8\themes\amu_www\css\style.css
at module.exports (K:\dev\npm packages\node_modules\stylelint\lib\utils\configurationError.js:8:28)
at stylelint._fullExplorer.load.then.then.config (K:\dev\npm packages\node_modules\stylelint\lib\getConfigForFile.js:47:15)
Process finished with exit code 78
I have placed a stylelintrc.json config file about everywhere I could think of but I don't know in which folder it is supposed to be put.
it was a .stylintrc.json and placing it just above the app working directory makes it foundable
In my case, the problem was that my Webstorm IDE is always looking for the configuration file in the project root directory, while my stylelint.config.js was located in configs/stylelint.config.js.
I've solved by moving it to the root.

Include Files for autocompletion outside src-directory in Intelij

Intellij always index every file in my project to give me the best autocompletion-suggestions. But there is one probelm it only indexs the files from src - directory for autocompletion.
now i got some css styles from a node-module which i also want to get autocompletion-suggestions.
i could fix this with 2 bad solutions:
by copying those css files directly inside the src
dir. The problem is now that when the styles inside node modules gets
updated the copyied files, didn't got there update.
by marking the complete node_modules dir as src folder,
but then i get autocompletion and Ctrl+Shift+N - suggestion also from
this dir that should happen only for one specific node-module.
Can i tell intellij that it should also use those specifics files for autocompletion? And not only those from the src-folder?
I'm using Intellij IDEA 2016.1.3

Force IntelliJ to use another Home Directory?

I have read this... it does not answer the question.
I would like to have IntelliJ use another location for all of my project files. Currently, it goes to c:\users\ as a default project location.
I want to change that to c:\git.
I tried to change the "Start in" link properties, to no avail.
I don't want to force all of the configuration (ie: the .IdeaIC15 folder) to be relocated, I just want it to go to c:\git when I click "Open project".
To change the directory where project files are located to C:\git:
Select Help->Edit Custom VM Options...
Add the following line to the end of the file that comes up in the editor (*):
-Duser.home=C:\git
Restart IntelliJ.
(*) The file that comes up in the editor will either be idea64.exe.vmoptions or idea.exe.vmoptions.
Notes:
This will update/create a .vmoptions file in your config directory. It does not modify the vmoptions file in your install directory.
The above steps do not change the default directory that is used
when cloning git repositories. This is the directory that is used in
the File->New->Project from Version Control->Git window. You
still need to set that directory to C:\git and clone one remote repo
into C:\git. Once you have done that IntelliJ remembers the directory and
uses it for subsequent clones.
https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults, make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)