Shopware 6 How to disable ESLint during watch scripts? - shopware6

I am trying to use bin/watch-administration.sh but due to linting errors in third party plugins the compilation fails.
How can I disable ESLint?

In order to disable ESLint during either bin/watch-administration.sh or bin/watch-storefront.sh the environment variable ESLINT_DISABLE can be set to true in the projects .env file:
ESLINT_DISABLE=true

Related

YAML development dependencies required for YAML configuration format handling

I follow the fluent-bit https://docs.fluentbit.io/manual/installation/sources/build-and-install documentation. But when cmake, It show the log below.I know I can just disable the yaml feature. If I do not disable, what should I do to add the "YAML development dependencies"?
CMake Error at CMakeLists.txt:678 (message):
YAML development dependencies required for YAML configuration format
handling.
This is a build time dependency, you can either install the dependencies or
disable the feature setting the CMake option -DFLB_CONFIG_YAML=Off .

Plugin '*' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies

I am writing a small plugin for PhpStorm. During development, I run it in IDEA and everything works fine there. However, after I try to enable it in PhpStorm I get the following error:
Plugin 'name' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies
How can this problem be solved?
The documentation plugin compatibility says that if your plugin does not have module dependencies (built-in plugins that are non-removable parts of the IDE), then it is considered legacy and will load only in IDEA, as reported by the error message.
In order to fix this error, you need to explicitly add a dependency to one of the modules. For example, com.intellij.modules.platform:
Add the following line to plugin.xml:
<depends>com.intellij.modules.platform</depends>
And the plugin should load successfully in PhpStorm.

Serverless deprecation warning on .env files

I am using serverless framework to deploy react web application. I've set up a CI/CD pipeline for deployment. when serverless template gets executed I am receiving several deprecation warnings.
Serverless: Deprecation warning: Detected ".env" files. In the next major release variables from ".env" files will be automatically loaded into the serverless build process. Set "useDotenv: true" to adopt that behavior now.
More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES
Serverless: Deprecation warning: Variables resolver reports following resolution errors:
- Cannot resolve variable at "provider.profile": Value not found at "env" source
From a next major this will be communicated with a thrown error.
Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
The way I understand these warnings, it is trying to load environment variables from .env file from the serverless directory. But I've stored my variables from other files(abc.config) and loading them to the serverless template through that file and not from the .env file. and for this reason I am getting these warnings.
Also I've used serverless-dotenv-plugin to use environment variables in .env file for local deployment and that's why the .env file has to be there in the serverless directory. But for now loading variables from abc.config file is working fine and in the future, I want to load variables from the same file(abc.config). But in the future, if I use the same approach for environment variables, that will throw an error instead of giving a warning.
Questions 1: I am not sure how would I tackle this issue. because in the upcoming serverless version release this will throw an error.
Question 2: What if I install a specific serverless version. for example; npm install -g serverless#2.45.0 in that case, in the future will I still get these deprecation warnings? In theory, I'll be still using the old serverless version and this version supports loading variables from other files. So I should not be getting these warnings. I can be wrong. but what should be the ideal approach to resolve these warnings ahead of time?
Any help would be greatly appreciated.
Thank you.
You should set the deprecation variables in your serverless.yml file and verify that serverless deploy is successful and the framework interpolates your variables as you intend.
The warning messages explain the process. Simply add the rules to your serverless.yml file:
useDotenv: true
variablesResolutionMode: 20210326
The second warning message will be an error, provider.profile wasn't able to be resolved. You can solve this with a conditional, ie:
${provider.profile, 'default'}
Or you can ensure that provider.profile is always set. It's not possible to help further without seeing the serverless.yml file.

Targeting ES5 with TypeScript in IntelliJ IDEA 14

I want to use getters and setters in Typescript. At the moment when I try this I get the following:
error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
How do I configure my compiler in IntelliJ 14?
Are there any disadvantages to this? DOes this produce a different type of Javascript that will only work on certain browsers?
Thanks
To change the compiler options you need to go to the FileWatcher Dialogue.
Settings -> Tools -> File Watchers
Select TypeScript and hit the edit (pencil) button.
Add
--target es5
to the arguments field
You can set the target version in your tsconfig.json:
"compilerOptions": {
"target": "es5"
}
Here is a list of all the compiler options.
Setup the watcher to use the compiler flag --target es5.
Are there any disadvantages to this?
Properties (getter/setter) are not supported where es5 isn't supported (obsolete versions of browsers : see http://kangax.github.io/compat-table/es5/)
I solved mine by compiling the file in command prompt using "tsc --target ES5 YourFile.ts"

Debugging mocha tests run by gulp in Intellij Idea

I have the following configuration in my gulpfile.js:
gulp.task('spec', function() {
gulp.src('spec/runner.html')
.pipe(mocha({reporter: 'dot'}))
})
When I run nodejs inside IntelliJ Idea, the scripts files imported by spec/runner.html are not loaded by the IDE and therefore the breakpoints are ignored. Is there a solution to this?
In your run configuration options, for "JavaScript file" put the value:
node_modules/gulp/bin/gulp.js
Then put your gulp parameters in the "Application parameters".
WebStorm 9 EAP has native gulp integration, but this works until that is final.