Stylelint error in PhpStorm IDE : no configuration provided - ide

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.

Related

Activating extension ' failed: Cannot find module 'file.js' when keeping /out in .gitignore

while vs code extension development, there is /out folder which keep generated js files for respective typescript file but committing these files in remote repo seems not useful so adding the entry in .gitignore but now when I run the extension it say module not found
Activating extension 'xkeshav.<extension-name>' failed: Cannot find module 'd:\Developer\extension-folder\out\extension.js'
Require stack:
- c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
- .
so my question is
when not keeping /out entry in .gitignore, it works file so whether we need to commit these files in remote or not ?
Make sure you have a .vscodeignore file in your repo. VS Code only uses .gitignore if there's no .vscodeignore. The .vscodeignore file is then used to exclude files/folders from the extension bundle instead of .gitignore. A typical .vscodeignore looks like this:
.vscode/**
.vscode-test/**
out/test/**
test/**
src/**
images/**
**/*.map
.gitignore
.eslintignore
.eslintrc.json
tsconfig.json
typings/**
As you see out/ itself is not excluded, just the tests which end up there.

'Cypress Config File does not exist' - Lambdatest can't see cypress configuration file

I've got installed Cypress on my Vue project and created just a few simple tests that perform great when I run Cypress with this command npx cypress open.
I am trying to implement automatisation with the help of Lambdatest but when I run command lambdatest-cypress run I receive this message in return:
Checking Lambda Config in current directory
Validating CLI
validating config
Error!! Cypress Config File does not exist
I have installed Lambdatest cli globally, added lambdatest-config.json in the root of my project, and updated "lambdatest_auth" data in this file. Also I've got cypress.config.js on the same root level in project's directory. Cypress's config file does not show any errors excluding eslint saying that
on this part
setupNodeEvents(on, config) {
// implement node event listeners here
},
on and config are declared but never used.
Do you have any ideas why I can not run this one using Lambdatest?
As always maybe someone will find it useful.
So... it would seem that in some cases lambdatest get's a little bit lost and it's config is not filled with the things it should be :)
The solution was to remove this line of code in lambdatest-config.json file which is located in the project root directory.
"cypress_config_file": "cypress.config.js", <-- remove this line

Visual Studio Code, how to set a config to show scripts only from the root package.json

I have multiple package.json files in my project in different folders. VSCode reads scripts from all the files and shows them up in the "NPM SCRIPTS" panel. I want to show scripts only from the root package.json file. How to add config to the project to read only the root package.json or maybe set a precise path to it. Is it possible? Thanks for any help
Not exactly sure why this glob works, but this setting (in settings.json) seems to work:
"npm.exclude": "**/folder-operations/**"
where folder-operations would be your root folder.

disable the warnings in VS code

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

WebStorm run configuration - package.json path relative to project directory

Question: In WebStorm's npm run configuration: How to make the package.json path relative to project directory?
Goal: To be able to share the run configuration in VCS, it must not depend on where the project is on my machine.
Screenshot: I.e., I want to change ~\WebStormProjects\x-nest\ to PROJECT_DIR\.
package.json field doesn't support variables; but you do not need to use macros or do anything at all to make configurations shareable, this case is handled automatically: if you look inside the .idea/workspace.xml (or .idea\runConfigurations\<config name>.xml if Share through VCS is enabled for it) file you'll notice that IDE stores this path as $PROJECT_DIR$/path/to/package.json, like:
<package-json value="$PROJECT_DIR$/package.json" />
So you can safely keep this .xml file under Version Control and your colleagues will have the correct path to the file even if local path to project is different.