JSCS can not find jscs files on PhpStorm and WebStorm - phpstorm

I work adonis.js. I have a problem. When I open adonis project in WebStorm and PhpStorm, editors create a problem "jscs can not find".
It is a general view. I try on both editor.
The same problem occur. I search it on the Google, they say we solve the problem, but it is alive.

Please try disabling JSCS support by clearing Enable checkbox in Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSCS - can you still see the error?
Also, from screenshot it seems that ES6 syntax in your file is not accepted; please make sure to switch Javascript Language version (Settings | Languages & Frameworks | JavaScript) to ECMAScript 6

Related

Viewing function parameters in VSCode

In PhpStorm, we see the expected parameter when using the function. Is this possible with VSCode? I searched but found no answer.
As described here, inlay hints are available with VSCode 1.60 (for Javascript and Typescript.
This was requested in microsoft/language-server-protocol issue 956 and is not directly supported by LSP yet.
But for the languages (javascript/Typescript) that VSCode currently supports, VSCode 1.65 (Feb. 2022) will come with "inlay hint double click gesture", and the setting vscode.InlayHint.command to associate a command to said double-click.

Create Vanila HTML / JS project inside PhpStorm where PHP has already been configured

I use Storm daily for PHP/Laravel, and hence have PHP configured. When I want to create a vanilla HTML / JS side project, Storm takes it upon itself to add the PHP libraries without asking. I don't want any PHP Libraries. When initially creating the project, I used "empty project".
Here is a screen shot to illustrate.
So, how to create an empty project without PHP libraries?
You are using PhpStorm, an IDE that supports PHP. That entry that you see there is a list of stubs for PHP (the stuff that IDE knows about core PHP and other common extensions: classes/functions/constants etc).
AFAIK it always will be there (as it's a PHP oriented IDE) and you cannot remove it. But you try this:
Settings (Preferences on macOS)
Languages & Frameworks | PHP
PHP Runtime tab
Uncheck ALL entries there.
If the above will not get rid of the whole node then you will have to ignore that entry. And I do not see any problems in having it here: it will not affect your JS/HTML in any way.
P.S. Whatever will be in a default/new project can be configured at File | New Projects Settings | Settings for New Projects...

How to export jshint config file from WebStorm

I used to work alone on a project. I used to use WebStorm's JSHint plugin for code quality testing.
Now couple of friends joined me so I thought to create a .jshintrc file for all of us to use. But it is quite boring to do it manually and I'm perfectly happy with my current settings.
Is there a way to export my project-wide settings in order to share it with co-worker?
JSHint configuration from Settings(Preferences) | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint is stored in <project_dir>\.idea\jsLinters\jshint.xml. You can share this file with your co-workers

Configure PHP CodeSniffer to fix code on the fly in PhpStorm

I have PhpStorm 10 and want to setup php Code Sniffer to automatically correct me code. This article https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm points to "Project Settings | Code Style" and I cannot even find that. I have File | Edit | View | Navigate | Code | Refactor | Run | Tools | VCS | Window | Help at the top and have no idea where to find project settings. I do have File > Settings but cannot figure it out.
My project is a web portal built in Symfony. I saw a colleague run Atom and when he saves a file it is code-fixed on the fly - that is what I want. Help please.
PhpStorm does not support code fixing on the fly with Code Sniffer.
https://youtrack.jetbrains.com/issue/WI-25815 -- watch this ticket (star/vote/comment) to get notified on any progress.
Right now, if you wish you may create an External Tools entry for that and run it manually when needed.
Find this from web (how to config the external tools)
https://thiagoponte.wordpress.com/2015/08/03/run-php-codesniffer-code-beautifier-and-fixer-from-phpstorm/

How do you resolve references to gulp.src().pipe() in webstorm 10

This is a tooling question, so I'm not sure if it's appropriate for stack overflow. I'm using gulp in WebStorm 10 to concatenate my .js files into a dist folder. In my gulpfile.js, WebStorm is warning me that gulp.src(...).pipe() can not be resolved.
I've added the gulp-util typescript community map file to the libraries list in settings, which is the only place a function called pipe() exists that I can find in node_modules.
I've also confirmed that the gulp-util library is being used to try to resolve references in gulpfile.js. It's the only warning I have left in my app and I'd sure love to get it resolved.
I posted a similar question on the Webstorm site and got the following answer:
to resolve pipe open ’Settings | 'languages & Frameworks | JavaScript
| Libraries’ and choose ’Node.js Core Modules’
https://disqus.com/home/discussion/jetbrains/using_gulp_task_runner/?utm_source=reply&utm_medium=email&utm_content=read_more#comment-2240193852
In the end of 2019 faced the same issue but in PHPStorm.
i got the "Unresolved function or method pipe()" and
the "Unresolved function or method require()" error messages in PHPStorm.
Downloading the #types/gulp library in PHPStorm resolved both issues.
I had same problem and enabling Node.js Core didn't help.
For me solution was to delete whole .idea directory and import project from scratch. Be careful this will remove all your project settings.
This option helped me. All I did, was install node.d.ts from DefinitelyTyped on GitHub.
The answer is from a similar question:
https://stackoverflow.com/a/39415394/4637577