@scandipwa/magento-scripts 1.14.1-alpha.8 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/cli.js +9 -4
- package/lib/commands/logs.js +1 -0
- package/lib/commands/start.js +18 -5
- package/lib/config/check-configuration-file.js +16 -1
- package/lib/config/cma-config.js +16 -0
- package/lib/config/dependencies-for-platforms.js +15 -3
- package/lib/config/docker.js +45 -12
- package/lib/config/get-port-config.js +7 -2
- package/lib/config/index.js +2 -1
- package/lib/config/php/extensions/libsodium.js +2 -1
- package/lib/config/port-config.js +2 -1
- package/lib/config/scandipwa-versions.js +2 -1
- package/lib/config/ssl-terminator/index.js +10 -0
- package/lib/config/system-config.js +34 -5
- package/lib/config/templates/magentorc.template +2 -0
- package/lib/config/templates/nginx.template.conf +0 -31
- package/lib/config/templates/ssl-terminator.template.conf +27 -0
- package/lib/config/templates/varnish.template.vcl +9 -4
- package/lib/config/versions/magento-2.3.0.js +3 -1
- package/lib/config/versions/magento-2.3.1.js +3 -1
- package/lib/config/versions/magento-2.3.2-p2.js +3 -1
- package/lib/config/versions/magento-2.3.2.js +3 -1
- package/lib/config/versions/magento-2.3.3-p1.js +3 -1
- package/lib/config/versions/magento-2.3.3.js +3 -1
- package/lib/config/versions/magento-2.3.4-p2.js +3 -1
- package/lib/config/versions/magento-2.3.4.js +3 -1
- package/lib/config/versions/magento-2.3.5-p1.js +3 -1
- package/lib/config/versions/magento-2.3.5-p2.js +3 -1
- package/lib/config/versions/magento-2.3.5.js +3 -1
- package/lib/config/versions/magento-2.3.6-p1.js +3 -1
- package/lib/config/versions/magento-2.3.6.js +3 -1
- package/lib/config/versions/magento-2.3.7-p1.js +3 -1
- package/lib/config/versions/magento-2.3.7-p2.js +3 -1
- package/lib/config/versions/magento-2.3.7-p3.js +3 -1
- package/lib/config/versions/magento-2.3.7.js +3 -1
- package/lib/config/versions/magento-2.4.0-p1.js +3 -1
- package/lib/config/versions/magento-2.4.0.js +3 -1
- package/lib/config/versions/magento-2.4.1-p1.js +3 -1
- package/lib/config/versions/magento-2.4.1.js +3 -1
- package/lib/config/versions/magento-2.4.2-p1.js +3 -1
- package/lib/config/versions/magento-2.4.2-p2.js +3 -1
- package/lib/config/versions/magento-2.4.2.js +3 -1
- package/lib/config/versions/magento-2.4.3-p1.js +3 -1
- package/lib/config/versions/magento-2.4.3-p2.js +3 -1
- package/lib/config/versions/magento-2.4.3.js +3 -1
- package/lib/config/versions/magento-2.4.4.js +3 -1
- package/lib/config/xml-parser.js +63 -0
- package/lib/errors/known-error.js +15 -0
- package/lib/errors/unknown-error.js +15 -0
- package/lib/tasks/cli/create-bashrc-config.js +2 -1
- package/lib/tasks/composer/index.js +5 -3
- package/lib/tasks/composer/local-auth-json.js +8 -4
- package/lib/tasks/docker/network.js +2 -1
- package/lib/tasks/execute/index.js +2 -3
- package/lib/tasks/file-system/create-nginx-config.js +4 -43
- package/lib/tasks/file-system/create-php-config.js +2 -1
- package/lib/tasks/file-system/create-php-fpm-config.js +2 -1
- package/lib/tasks/file-system/create-phpstorm-config/database-config.js +249 -0
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +85 -0
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +154 -0
- package/lib/tasks/file-system/create-phpstorm-config/index.js +27 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +28 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +42 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +80 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +142 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +20 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +60 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +116 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/keys.js +14 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +67 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +58 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +59 -0
- package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +77 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +97 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +49 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +5 -0
- package/lib/tasks/file-system/create-ssl-terminator-config.js +96 -0
- package/lib/tasks/file-system/create-varnish-config.js +2 -1
- package/lib/tasks/file-system/create-vscode-config.js +3 -2
- package/lib/tasks/file-system/index.js +3 -1
- package/lib/tasks/magento/enable-magento-composer-plugins.js +3 -2
- package/lib/tasks/magento/install-magento.js +7 -5
- package/lib/tasks/magento/setup-magento/adjust-full-page-cache.js +26 -0
- package/lib/tasks/magento/setup-magento/delete-admin-users.js +1 -1
- package/lib/tasks/magento/setup-magento/delete-customers.js +7 -4
- package/lib/tasks/magento/setup-magento/delete-orders.js +6 -4
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +2 -1
- package/lib/tasks/magento/setup-magento/index.js +3 -1
- package/lib/tasks/magento/setup-magento/install-magento.js +2 -1
- package/lib/tasks/magento/setup-magento/set-base-url.js +7 -2
- package/lib/tasks/magento/setup-magento/upgrade-magento.js +11 -1
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +41 -0
- package/lib/tasks/mysql/connect-to-mysql.js +2 -1
- package/lib/tasks/mysql/import-dump-to-mysql.js +13 -2
- package/lib/tasks/mysql/import-remote-db/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/regular-server.js +2 -1
- package/lib/tasks/php/bundled-extensions.js +28 -0
- package/lib/tasks/php/compile-options.js +27 -54
- package/lib/tasks/php/compile.js +6 -4
- package/lib/tasks/php/configure.js +7 -66
- package/lib/tasks/php/extensions/disable.js +2 -1
- package/lib/tasks/php/extensions/enable.js +2 -1
- package/lib/tasks/php/extensions/index.js +74 -0
- package/lib/tasks/php/extensions/install.js +3 -3
- package/lib/tasks/php/index.js +7 -6
- package/lib/tasks/php/install-sodium.js +93 -0
- package/lib/tasks/php/update-phpbrew.js +7 -3
- package/lib/tasks/php/validate-php.js +67 -0
- package/lib/tasks/php-fpm/start-php-fpm.js +4 -2
- package/lib/tasks/requirements/composer.js +59 -5
- package/lib/tasks/requirements/dependency/arch.js +2 -1
- package/lib/tasks/requirements/dependency/centos.js +2 -1
- package/lib/tasks/requirements/dependency/fedora.js +2 -1
- package/lib/tasks/requirements/dependency/mac.js +18 -3
- package/lib/tasks/requirements/docker/index.js +94 -40
- package/lib/tasks/requirements/docker/install-on-mac.js +29 -0
- package/lib/tasks/requirements/docker/install.js +2 -1
- package/lib/tasks/requirements/docker/running-status.js +32 -31
- package/lib/tasks/requirements/docker/version.js +2 -1
- package/lib/tasks/requirements/index.js +3 -0
- package/lib/tasks/requirements/node-version.js +2 -1
- package/lib/tasks/requirements/php-version.js +26 -24
- package/lib/tasks/requirements/phpbrew/index.js +2 -1
- package/lib/tasks/requirements/phpbrew/install.js +14 -2
- package/lib/tasks/requirements/phpbrew/version.js +2 -1
- package/lib/tasks/requirements/platform.js +5 -3
- package/lib/tasks/requirements/rosetta.js +32 -0
- package/lib/tasks/start.js +10 -2
- package/lib/tasks/status/index.js +24 -8
- package/lib/tasks/theme/build-theme.js +2 -1
- package/lib/tasks/theme/install-theme.js +2 -1
- package/lib/tasks/theme/link-theme.js +2 -2
- package/lib/tasks/theme/retrieve-theme-data.js +2 -1
- package/lib/tasks/theme/setup-persisted-query.js +2 -1
- package/lib/tasks/theme/setup-themes.js +10 -3
- package/lib/tasks/theme/symlink-theme.js +8 -1
- package/lib/util/CSA-theme.js +4 -0
- package/lib/util/analytics.js +320 -0
- package/lib/util/arch.js +1 -1
- package/lib/util/config-file-validator.js +4 -2
- package/lib/util/config-php-json.js +3 -2
- package/lib/util/env-php-json.js +3 -2
- package/lib/util/exec-async-command.d.ts +2 -0
- package/lib/util/exec-async-command.js +31 -15
- package/lib/util/exec-async.js +9 -0
- package/lib/util/get-brew-bin-path.js +64 -0
- package/lib/util/get-installed-magento-version.js +3 -2
- package/lib/util/get-jsonfile-data.js +2 -1
- package/lib/util/install-dependencies-task.js +15 -5
- package/lib/util/instance-metadata.js +11 -4
- package/lib/util/ip.js +47 -1
- package/lib/util/magento-task.js +20 -9
- package/lib/util/php-task.js +7 -7
- package/lib/util/request.js +0 -0
- package/lib/util/resolve-configuration-with-overrides.js +2 -1
- package/lib/util/run-composer.js +5 -3
- package/lib/util/run-magento.js +3 -2
- package/lib/util/run-php.js +7 -2
- package/lib/util/wait-for-it.js +3 -2
- package/package.json +5 -3
- package/typings/context.d.ts +4 -0
- package/typings/index.d.ts +13 -1
- package/typings/phpstorm.d.ts +33 -0
- package/lib/tasks/file-system/create-php-storm-config.js +0 -82
- package/lib/tasks/magento/setup-magento/disable-full-page-cache.js +0 -20
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// inspection tool classes
|
|
2
|
+
const PHP_CS_FIXER_VALIDATION_INSPECTION = 'PhpCSFixerValidationInspection';
|
|
3
|
+
const PHP_CS_VALIDATION_INSPECTION = 'PhpCSValidationInspection';
|
|
4
|
+
const STYLELINT_INSPECTION = 'Stylelint';
|
|
5
|
+
const ESLINT_INSPECTION = 'Eslint';
|
|
6
|
+
const MESS_DETECTOR_VALIDATION_INSPECTION = 'MessDetectorValidationInspection';
|
|
7
|
+
|
|
8
|
+
// options
|
|
9
|
+
const CODING_STANDARD_OPTION_NAME = 'CODING_STANDARD';
|
|
10
|
+
const CUSTOM_CODING_STANDARD_OPTION_VALUE = 'Custom';
|
|
11
|
+
const CUSTOM_RULE_SET_PATH_OPTION_NAME = 'CUSTOM_RULESET_PATH';
|
|
12
|
+
const MAGENTO2_CODING_STANDARD_OPTION_VALUE = 'Magento2';
|
|
13
|
+
const EXTENSIONS_OPTION_NAME = 'EXTENSIONS';
|
|
14
|
+
const WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME = 'WARNING_HIGHLIGHT_LEVEL_NAME';
|
|
15
|
+
const WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_VALUE = 'ERROR';
|
|
16
|
+
const SHOW_SNIFF_NAMES_OPTION_NAME = 'SHOW_SNIFF_NAMES';
|
|
17
|
+
const USE_INSTALLED_PATHS_OPTION_NAME = 'USE_INSTALLED_PATHS';
|
|
18
|
+
const INSTALLED_PATHS_OPTION_NAME = 'INSTALLED_PATHS';
|
|
19
|
+
const CODESIZE_OPTION_NAME = 'CODESIZE';
|
|
20
|
+
const CONTROVERSIAL_OPTION_NAME = 'CONTROVERSIAL';
|
|
21
|
+
const DESIGN_OPTION_NAME = 'DESIGN';
|
|
22
|
+
const UNUSED_CODE_OPTION_NAME = 'UNUSEDCODE';
|
|
23
|
+
const NAMING_OPTION_NAME = 'NAMING';
|
|
24
|
+
const CUSTOM_RULESETS_OPTION_NAME = 'customRulesets';
|
|
25
|
+
const PHP_MD_RULESET_OPTION_VALUE = 'Magento PHPMD rule set';
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
options: {
|
|
29
|
+
CODESIZE_OPTION_NAME,
|
|
30
|
+
CONTROVERSIAL_OPTION_NAME,
|
|
31
|
+
DESIGN_OPTION_NAME,
|
|
32
|
+
UNUSED_CODE_OPTION_NAME,
|
|
33
|
+
NAMING_OPTION_NAME,
|
|
34
|
+
CUSTOM_RULESETS_OPTION_NAME,
|
|
35
|
+
PHP_MD_RULESET_OPTION_VALUE,
|
|
36
|
+
CODING_STANDARD_OPTION_NAME,
|
|
37
|
+
CUSTOM_CODING_STANDARD_OPTION_VALUE,
|
|
38
|
+
CUSTOM_RULE_SET_PATH_OPTION_NAME,
|
|
39
|
+
MAGENTO2_CODING_STANDARD_OPTION_VALUE,
|
|
40
|
+
EXTENSIONS_OPTION_NAME,
|
|
41
|
+
WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME,
|
|
42
|
+
WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_VALUE,
|
|
43
|
+
SHOW_SNIFF_NAMES_OPTION_NAME,
|
|
44
|
+
USE_INSTALLED_PATHS_OPTION_NAME,
|
|
45
|
+
INSTALLED_PATHS_OPTION_NAME
|
|
46
|
+
},
|
|
47
|
+
classes: {
|
|
48
|
+
PHP_CS_FIXER_VALIDATION_INSPECTION,
|
|
49
|
+
PHP_CS_VALIDATION_INSPECTION,
|
|
50
|
+
STYLELINT_INSPECTION,
|
|
51
|
+
ESLINT_INSPECTION,
|
|
52
|
+
MESS_DETECTOR_VALIDATION_INSPECTION
|
|
53
|
+
}
|
|
54
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const pathExists = require('../../../../util/path-exists');
|
|
2
|
+
const { phpCSConfigurationPath, phpCSConfigFormattedPath } = require('./paths');
|
|
3
|
+
const { nameKey, valueKey } = require('../keys');
|
|
4
|
+
const {
|
|
5
|
+
options: {
|
|
6
|
+
CUSTOM_RULE_SET_PATH_OPTION_NAME
|
|
7
|
+
}
|
|
8
|
+
} = require('./config');
|
|
9
|
+
|
|
10
|
+
const setupCustomRuleSetPathOption = async (config) => {
|
|
11
|
+
let hasChanges = false;
|
|
12
|
+
const customRuleSetPathOption = config.option.find(
|
|
13
|
+
(option) => option[nameKey] === CUSTOM_RULE_SET_PATH_OPTION_NAME
|
|
14
|
+
);
|
|
15
|
+
const phpCSConfigExists = await pathExists(phpCSConfigurationPath);
|
|
16
|
+
|
|
17
|
+
if (!customRuleSetPathOption && phpCSConfigExists) {
|
|
18
|
+
hasChanges = true;
|
|
19
|
+
config.option.push({
|
|
20
|
+
[nameKey]: CUSTOM_RULE_SET_PATH_OPTION_NAME,
|
|
21
|
+
[valueKey]: phpCSConfigFormattedPath
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return hasChanges;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = setupCustomRuleSetPathOption;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* eslint-disable no-param-reassign */
|
|
2
|
+
const properties = {
|
|
3
|
+
enabled: 'true',
|
|
4
|
+
enabled_by_default: 'true',
|
|
5
|
+
level: 'ERROR'
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {Object} inspectionTool
|
|
10
|
+
* @param {{
|
|
11
|
+
* enabled: 'true' | 'false',
|
|
12
|
+
* enabled_by_default: 'true' | 'false',
|
|
13
|
+
* level: 'ERROR' | 'WEAK WARNING'
|
|
14
|
+
* }} defaultProperties
|
|
15
|
+
* @returns {Boolean}
|
|
16
|
+
*/
|
|
17
|
+
const setupDefaultProperties = (inspectionTool, defaultProperties = properties) => {
|
|
18
|
+
let hasChanges = false;
|
|
19
|
+
if (!inspectionTool['@_enabled']) {
|
|
20
|
+
hasChanges = true;
|
|
21
|
+
inspectionTool['@_enabled'] = defaultProperties.enabled;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (!inspectionTool['@_enabled_by_default']) {
|
|
25
|
+
hasChanges = true;
|
|
26
|
+
inspectionTool['@_enabled_by_default'] = defaultProperties.enabled_by_default;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (!inspectionTool['@_level']) {
|
|
30
|
+
hasChanges = true;
|
|
31
|
+
inspectionTool['@_level'] = defaultProperties.level;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (inspectionTool.option && !Array.isArray(inspectionTool.option)) {
|
|
35
|
+
hasChanges = true;
|
|
36
|
+
inspectionTool.option = [inspectionTool.option];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return hasChanges;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
module.exports = setupDefaultProperties;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const {
|
|
2
|
+
classes: {
|
|
3
|
+
ESLINT_INSPECTION
|
|
4
|
+
}
|
|
5
|
+
} = require('./config');
|
|
6
|
+
const { classKey } = require('../keys');
|
|
7
|
+
const setupDefaultProperties = require('./default-properties-config');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Set up Styelint configuration
|
|
11
|
+
*
|
|
12
|
+
* *function is async so it will be properly handled in Promise.all*
|
|
13
|
+
* @param {Array} inspectionToolsData
|
|
14
|
+
* @returns {Promise<Boolean>}
|
|
15
|
+
*/
|
|
16
|
+
const setupESLintInspection = async (inspectionToolsData) => {
|
|
17
|
+
let hasChanges = false;
|
|
18
|
+
const eslintConfig = inspectionToolsData.find(
|
|
19
|
+
(inspectionToolData) => inspectionToolData[classKey] === ESLINT_INSPECTION
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
if (eslintConfig) {
|
|
23
|
+
hasChanges = setupDefaultProperties(eslintConfig);
|
|
24
|
+
} else {
|
|
25
|
+
hasChanges = true;
|
|
26
|
+
inspectionToolsData.push({
|
|
27
|
+
[classKey]: ESLINT_INSPECTION,
|
|
28
|
+
'@_enabled': 'true',
|
|
29
|
+
'@_level': 'ERROR',
|
|
30
|
+
'@_enabled_by_default': 'true'
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return hasChanges;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
module.exports = setupESLintInspection;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const { loadXmlFile, buildXmlFile } = require('../../../../config/xml-parser');
|
|
2
|
+
const pathExists = require('../../../../util/path-exists');
|
|
3
|
+
const {
|
|
4
|
+
nameKey,
|
|
5
|
+
valueKey,
|
|
6
|
+
classKey
|
|
7
|
+
} = require('../keys');
|
|
8
|
+
const setupESLintInspection = require('./eslint-inspection-config');
|
|
9
|
+
const setupMessDetectorValidationInspection = require('./mess-detector-validation-inspection-config');
|
|
10
|
+
const setupPhpCSFixerValidationInspection = require('./php-cs-fixer-validation-inspection-config');
|
|
11
|
+
const setupPhpCSValidationInspection = require('./php-cs-validation-inspection-config');
|
|
12
|
+
const setupStyleLintInspection = require('./stylelint-inspection-config');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @type {() => import('listr2').ListrTask<import('../../../../../typings/context').ListrContext>}
|
|
16
|
+
*/
|
|
17
|
+
const setupInspectionToolsConfig = () => ({
|
|
18
|
+
title: 'Set up inspection tools configuration',
|
|
19
|
+
task: async (ctx, task) => {
|
|
20
|
+
const {
|
|
21
|
+
config: {
|
|
22
|
+
phpStorm
|
|
23
|
+
}
|
|
24
|
+
} = ctx;
|
|
25
|
+
|
|
26
|
+
if (await pathExists(phpStorm.inspectionTools.path)) {
|
|
27
|
+
const inspectionToolsData = await loadXmlFile(phpStorm.inspectionTools.path);
|
|
28
|
+
const inspectionTools = inspectionToolsData.component.profile.inspection_tool;
|
|
29
|
+
const hasChanges = await Promise.all([
|
|
30
|
+
setupPhpCSFixerValidationInspection(inspectionTools),
|
|
31
|
+
setupPhpCSValidationInspection(inspectionTools),
|
|
32
|
+
setupStyleLintInspection(inspectionTools),
|
|
33
|
+
setupMessDetectorValidationInspection(inspectionTools)
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
if (hasChanges.includes(true)) {
|
|
37
|
+
await buildXmlFile(phpStorm.inspectionTools.path, inspectionToolsData);
|
|
38
|
+
} else {
|
|
39
|
+
task.skip();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const inspectionToolsData = {
|
|
46
|
+
component: {
|
|
47
|
+
[nameKey]: 'InspectionProjectProfileManager',
|
|
48
|
+
profile: {
|
|
49
|
+
'@_version': '1.0',
|
|
50
|
+
option: {
|
|
51
|
+
[nameKey]: 'myName',
|
|
52
|
+
[valueKey]: 'Project Default'
|
|
53
|
+
},
|
|
54
|
+
inspection_tool: [
|
|
55
|
+
{
|
|
56
|
+
[classKey]: 'PhpStanGlobal',
|
|
57
|
+
'@_enabled': 'true',
|
|
58
|
+
'@_level': 'ERROR',
|
|
59
|
+
'@_enabled_by_default': 'true'
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const inspectionTools = inspectionToolsData.component.profile.inspection_tool;
|
|
66
|
+
|
|
67
|
+
await Promise.all([
|
|
68
|
+
setupPhpCSFixerValidationInspection(inspectionTools),
|
|
69
|
+
setupPhpCSValidationInspection(inspectionTools),
|
|
70
|
+
setupStyleLintInspection(inspectionTools),
|
|
71
|
+
setupMessDetectorValidationInspection(inspectionTools),
|
|
72
|
+
setupStyleLintInspection(inspectionTools),
|
|
73
|
+
setupESLintInspection(inspectionTools)
|
|
74
|
+
]);
|
|
75
|
+
|
|
76
|
+
await buildXmlFile(phpStorm.inspectionTools.path, inspectionToolsData);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
module.exports = setupInspectionToolsConfig;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { nameKey, valueKey } = require('../keys');
|
|
2
|
+
const {
|
|
3
|
+
options: {
|
|
4
|
+
CODING_STANDARD_OPTION_NAME,
|
|
5
|
+
MAGENTO2_CODING_STANDARD_OPTION_VALUE
|
|
6
|
+
}
|
|
7
|
+
} = require('./config');
|
|
8
|
+
|
|
9
|
+
const setupMagento2CodingStandardOption = async (config) => {
|
|
10
|
+
let hasChanges = false;
|
|
11
|
+
const codingStandardOption = config.option.find(
|
|
12
|
+
(option) => option[nameKey] === CODING_STANDARD_OPTION_NAME
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
if (!codingStandardOption) {
|
|
16
|
+
hasChanges = true;
|
|
17
|
+
config.option.push({
|
|
18
|
+
[nameKey]: CODING_STANDARD_OPTION_NAME,
|
|
19
|
+
[valueKey]: MAGENTO2_CODING_STANDARD_OPTION_VALUE
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return hasChanges;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports = setupMagento2CodingStandardOption;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
const { phpMDRuleSetFormattedPath } = require('./paths');
|
|
2
|
+
const {
|
|
3
|
+
classes: {
|
|
4
|
+
MESS_DETECTOR_VALIDATION_INSPECTION
|
|
5
|
+
},
|
|
6
|
+
options: {
|
|
7
|
+
CODESIZE_OPTION_NAME,
|
|
8
|
+
CONTROVERSIAL_OPTION_NAME,
|
|
9
|
+
DESIGN_OPTION_NAME,
|
|
10
|
+
UNUSED_CODE_OPTION_NAME,
|
|
11
|
+
NAMING_OPTION_NAME,
|
|
12
|
+
CUSTOM_RULESETS_OPTION_NAME,
|
|
13
|
+
PHP_MD_RULESET_OPTION_VALUE
|
|
14
|
+
}
|
|
15
|
+
} = require('./config');
|
|
16
|
+
const {
|
|
17
|
+
classKey,
|
|
18
|
+
nameKey,
|
|
19
|
+
valueKey
|
|
20
|
+
} = require('../keys');
|
|
21
|
+
const setupDefaultProperties = require('./default-properties-config');
|
|
22
|
+
|
|
23
|
+
const messDetectorBooleanOptionNames = [
|
|
24
|
+
CODESIZE_OPTION_NAME,
|
|
25
|
+
CONTROVERSIAL_OPTION_NAME,
|
|
26
|
+
DESIGN_OPTION_NAME,
|
|
27
|
+
UNUSED_CODE_OPTION_NAME,
|
|
28
|
+
NAMING_OPTION_NAME
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const messDetectorDefaultRuleSetsListContent = {
|
|
32
|
+
RulesetDescriptor: {
|
|
33
|
+
option: [
|
|
34
|
+
{
|
|
35
|
+
[nameKey]: 'name',
|
|
36
|
+
[valueKey]: PHP_MD_RULESET_OPTION_VALUE
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
[nameKey]: 'path',
|
|
40
|
+
[valueKey]: phpMDRuleSetFormattedPath
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const messDetectorDefaultOptions = [
|
|
47
|
+
...messDetectorBooleanOptionNames.map((optionName) => ({
|
|
48
|
+
[nameKey]: optionName,
|
|
49
|
+
[valueKey]: 'true'
|
|
50
|
+
})),
|
|
51
|
+
{
|
|
52
|
+
[nameKey]: CUSTOM_RULESETS_OPTION_NAME,
|
|
53
|
+
list: messDetectorDefaultRuleSetsListContent
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @param {Array} inspectionToolsData
|
|
59
|
+
* @returns {Promise<Boolean>}
|
|
60
|
+
*/
|
|
61
|
+
const setupMessDetectorValidationInspection = async (inspectionToolsData) => {
|
|
62
|
+
let hasChanges = false;
|
|
63
|
+
const messDetectorConfig = inspectionToolsData.find((inspectionToolData) => inspectionToolData[classKey] === MESS_DETECTOR_VALIDATION_INSPECTION);
|
|
64
|
+
if (messDetectorConfig) {
|
|
65
|
+
const hasChangesInProperties = setupDefaultProperties(messDetectorConfig, {
|
|
66
|
+
enabled: 'true',
|
|
67
|
+
enabled_by_default: 'true',
|
|
68
|
+
level: 'WEAK WARNING'
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (hasChangesInProperties) {
|
|
72
|
+
hasChanges = true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (messDetectorConfig.option) {
|
|
76
|
+
messDetectorBooleanOptionNames.forEach((optionName) => {
|
|
77
|
+
const booleanOption = messDetectorConfig.option.find(
|
|
78
|
+
(o) => o[nameKey] === optionName
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (!booleanOption) {
|
|
82
|
+
hasChanges = true;
|
|
83
|
+
messDetectorConfig.option.push({
|
|
84
|
+
[nameKey]: optionName,
|
|
85
|
+
[valueKey]: 'true'
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const customRulesetsOption = messDetectorConfig.option.find(
|
|
91
|
+
(o) => o[nameKey] === CUSTOM_RULESETS_OPTION_NAME
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
if (customRulesetsOption) {
|
|
95
|
+
if (!customRulesetsOption.list) {
|
|
96
|
+
hasChanges = true;
|
|
97
|
+
customRulesetsOption.list = [];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (customRulesetsOption.list && !Array.isArray(customRulesetsOption.list)) {
|
|
101
|
+
hasChanges = true;
|
|
102
|
+
customRulesetsOption.list = [customRulesetsOption.list];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const correctRulesetsExists = customRulesetsOption.list.some(
|
|
106
|
+
(r) => r.RulesetDescriptor.option.some(
|
|
107
|
+
(o) => o[nameKey] === 'path' && o[valueKey] === phpMDRuleSetFormattedPath
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
if (!correctRulesetsExists) {
|
|
112
|
+
hasChanges = true;
|
|
113
|
+
customRulesetsOption.list.push(
|
|
114
|
+
messDetectorDefaultRuleSetsListContent
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
hasChanges = true;
|
|
119
|
+
messDetectorConfig.option.push({
|
|
120
|
+
[nameKey]: CUSTOM_RULESETS_OPTION_NAME,
|
|
121
|
+
list: messDetectorDefaultRuleSetsListContent
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
} else {
|
|
125
|
+
hasChanges = true;
|
|
126
|
+
messDetectorConfig.option = messDetectorDefaultOptions;
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
hasChanges = true;
|
|
130
|
+
inspectionToolsData.push({
|
|
131
|
+
[classKey]: MESS_DETECTOR_VALIDATION_INSPECTION,
|
|
132
|
+
'@_enabled': 'true',
|
|
133
|
+
'@_level': 'WEAK WARNING',
|
|
134
|
+
'@_enabled_by_default': 'true',
|
|
135
|
+
option: messDetectorDefaultOptions
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return hasChanges;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
module.exports = setupMessDetectorValidationInspection;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { formatPathForPHPStormConfig } = require('../xml-utils');
|
|
3
|
+
|
|
4
|
+
const phpCompatibilityPath = path.join(process.cwd(), 'vendor', 'phpcompatibility', 'php-compatibility', 'PHPCompatibility');
|
|
5
|
+
const phpCompatibilityRuleSetPath = path.join(phpCompatibilityPath, 'ruleset.xml');
|
|
6
|
+
const phpCompatibilityFormattedPath = formatPathForPHPStormConfig(phpCompatibilityPath);
|
|
7
|
+
const phpCSConfigurationPath = path.join(process.cwd(), '.php_cs.dist');
|
|
8
|
+
const phpCSConfigFormattedPath = formatPathForPHPStormConfig(phpCSConfigurationPath);
|
|
9
|
+
const phpMDRuleSetPath = path.join(process.cwd(), 'dev', 'tests', 'static', 'testsuite', 'Magento', 'Test', 'Php', '_files', 'phpmd', 'ruleset.xml');
|
|
10
|
+
const phpMDRuleSetFormattedPath = formatPathForPHPStormConfig(phpMDRuleSetPath);
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
phpCompatibilityPath,
|
|
14
|
+
phpCompatibilityRuleSetPath,
|
|
15
|
+
phpCompatibilityFormattedPath,
|
|
16
|
+
phpCSConfigurationPath,
|
|
17
|
+
phpCSConfigFormattedPath,
|
|
18
|
+
phpMDRuleSetPath,
|
|
19
|
+
phpMDRuleSetFormattedPath
|
|
20
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const {
|
|
2
|
+
classes: {
|
|
3
|
+
PHP_CS_FIXER_VALIDATION_INSPECTION
|
|
4
|
+
}
|
|
5
|
+
} = require('./config');
|
|
6
|
+
const { classKey } = require('../keys');
|
|
7
|
+
const setupCodingStandardOption = require('./coding-standard-config');
|
|
8
|
+
const setupCustomRuleSetPathOption = require('./custom-ruleset-path-config');
|
|
9
|
+
const setupDefaultProperties = require('./default-properties-config');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {Array} inspectionToolsData
|
|
13
|
+
* @returns {Promise<Boolean>}
|
|
14
|
+
*/
|
|
15
|
+
const setupPhpCSFixerValidationInspection = async (inspectionToolsData) => {
|
|
16
|
+
let hasChanges = false;
|
|
17
|
+
const phpCSFixerConfig = inspectionToolsData.find(
|
|
18
|
+
(inspectionToolData) => inspectionToolData[classKey] === PHP_CS_FIXER_VALIDATION_INSPECTION
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
if (phpCSFixerConfig) {
|
|
22
|
+
const hasChangesInProperties = setupDefaultProperties(phpCSFixerConfig);
|
|
23
|
+
if (hasChangesInProperties) {
|
|
24
|
+
hasChanges = true;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (phpCSFixerConfig.option) {
|
|
28
|
+
const hasCodingStandardChanges = await setupCodingStandardOption(phpCSFixerConfig);
|
|
29
|
+
if (hasCodingStandardChanges) {
|
|
30
|
+
hasChanges = true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const hasCustomRuleSetChanges = await setupCustomRuleSetPathOption(phpCSFixerConfig);
|
|
34
|
+
if (hasCustomRuleSetChanges) {
|
|
35
|
+
hasChanges = true;
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
hasChanges = true;
|
|
39
|
+
phpCSFixerConfig.option = [];
|
|
40
|
+
await setupCodingStandardOption(phpCSFixerConfig);
|
|
41
|
+
await setupCustomRuleSetPathOption(phpCSFixerConfig);
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
hasChanges = true;
|
|
45
|
+
const phpCSFixerConfig = {
|
|
46
|
+
[classKey]: PHP_CS_FIXER_VALIDATION_INSPECTION,
|
|
47
|
+
option: []
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
setupDefaultProperties(phpCSFixerConfig);
|
|
51
|
+
await setupCodingStandardOption(phpCSFixerConfig);
|
|
52
|
+
await setupCustomRuleSetPathOption(phpCSFixerConfig);
|
|
53
|
+
|
|
54
|
+
inspectionToolsData.push(phpCSFixerConfig);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return hasChanges;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
module.exports = setupPhpCSFixerValidationInspection;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const {
|
|
2
|
+
classes: {
|
|
3
|
+
PHP_CS_VALIDATION_INSPECTION
|
|
4
|
+
},
|
|
5
|
+
options: {
|
|
6
|
+
CODING_STANDARD_OPTION_NAME,
|
|
7
|
+
MAGENTO2_CODING_STANDARD_OPTION_VALUE,
|
|
8
|
+
EXTENSIONS_OPTION_NAME,
|
|
9
|
+
WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME,
|
|
10
|
+
WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_VALUE,
|
|
11
|
+
SHOW_SNIFF_NAMES_OPTION_NAME
|
|
12
|
+
}
|
|
13
|
+
} = require('./config');
|
|
14
|
+
const {
|
|
15
|
+
classKey,
|
|
16
|
+
nameKey,
|
|
17
|
+
valueKey
|
|
18
|
+
} = require('../keys');
|
|
19
|
+
const setupDefaultProperties = require('./default-properties-config');
|
|
20
|
+
const setupMagento2CodingStandardOption = require('./magento-coding-standard-config');
|
|
21
|
+
|
|
22
|
+
const phpCSConfigDefaultOptions = [
|
|
23
|
+
{
|
|
24
|
+
[nameKey]: CODING_STANDARD_OPTION_NAME,
|
|
25
|
+
[valueKey]: MAGENTO2_CODING_STANDARD_OPTION_VALUE
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
[nameKey]: WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME,
|
|
29
|
+
[valueKey]: WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_VALUE
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
[nameKey]: SHOW_SNIFF_NAMES_OPTION_NAME,
|
|
33
|
+
[valueKey]: 'true'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
[nameKey]: EXTENSIONS_OPTION_NAME,
|
|
37
|
+
[valueKey]: 'php'
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const setupPhpCSValidationInspection = async (inspectionToolsData) => {
|
|
42
|
+
let hasChanges = false;
|
|
43
|
+
const phpCSConfig = inspectionToolsData.find(
|
|
44
|
+
(inspectionToolData) => inspectionToolData[classKey] === PHP_CS_VALIDATION_INSPECTION
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (phpCSConfig) {
|
|
48
|
+
const hasChangesInProperties = setupDefaultProperties(phpCSConfig);
|
|
49
|
+
if (hasChangesInProperties) {
|
|
50
|
+
hasChanges = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (phpCSConfig.option) {
|
|
54
|
+
const hasCodingStandardChanges = await setupMagento2CodingStandardOption(phpCSConfig);
|
|
55
|
+
if (hasCodingStandardChanges) {
|
|
56
|
+
hasChanges = true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const warningHighlightLevelNameOption = phpCSConfig.option.find(
|
|
60
|
+
(option) => option[nameKey] === WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
if (!warningHighlightLevelNameOption) {
|
|
64
|
+
hasChanges = true;
|
|
65
|
+
phpCSConfig.option.push({
|
|
66
|
+
[nameKey]: WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_NAME,
|
|
67
|
+
[valueKey]: WARNING_HIGHLIGHT_LEVEL_NAME_OPTION_VALUE
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const showSniffNamesOption = phpCSConfig.option.find(
|
|
72
|
+
(option) => option[nameKey] === SHOW_SNIFF_NAMES_OPTION_NAME
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
if (!showSniffNamesOption) {
|
|
76
|
+
hasChanges = true;
|
|
77
|
+
phpCSConfig.option.push({
|
|
78
|
+
[nameKey]: SHOW_SNIFF_NAMES_OPTION_NAME,
|
|
79
|
+
[valueKey]: 'true'
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// we want php code sniffer to lint only php files
|
|
84
|
+
// for other files (js, css, scss) we have separate linter setups
|
|
85
|
+
const extensionsOption = phpCSConfig.option.find(
|
|
86
|
+
(option) => option[nameKey] === EXTENSIONS_OPTION_NAME
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
if (!extensionsOption) {
|
|
90
|
+
hasChanges = true;
|
|
91
|
+
phpCSConfig.option.push({
|
|
92
|
+
[nameKey]: EXTENSIONS_OPTION_NAME,
|
|
93
|
+
[valueKey]: 'php'
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
hasChanges = true;
|
|
98
|
+
phpCSConfig.option = phpCSConfigDefaultOptions;
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
hasChanges = true;
|
|
102
|
+
|
|
103
|
+
const phpCSConfig = {
|
|
104
|
+
[classKey]: PHP_CS_VALIDATION_INSPECTION,
|
|
105
|
+
option: phpCSConfigDefaultOptions
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
setupDefaultProperties(phpCSConfig);
|
|
109
|
+
|
|
110
|
+
inspectionToolsData.push(phpCSConfig);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return hasChanges;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
module.exports = setupPhpCSValidationInspection;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const {
|
|
2
|
+
classes: {
|
|
3
|
+
STYLELINT_INSPECTION
|
|
4
|
+
}
|
|
5
|
+
} = require('./config');
|
|
6
|
+
const { classKey } = require('../keys');
|
|
7
|
+
const setupDefaultProperties = require('./default-properties-config');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Set up Styelint configuration
|
|
11
|
+
*
|
|
12
|
+
* *function is async so it will be properly handled in Promise.all*
|
|
13
|
+
* @param {Array} inspectionToolsData
|
|
14
|
+
* @returns {Promise<Boolean>}
|
|
15
|
+
*/
|
|
16
|
+
const setupStyleLintInspection = async (inspectionToolsData) => {
|
|
17
|
+
let hasChanges = false;
|
|
18
|
+
const stylelintConfig = inspectionToolsData.find(
|
|
19
|
+
(inspectionToolData) => inspectionToolData[classKey] === STYLELINT_INSPECTION
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
if (stylelintConfig) {
|
|
23
|
+
hasChanges = setupDefaultProperties(stylelintConfig);
|
|
24
|
+
} else {
|
|
25
|
+
hasChanges = true;
|
|
26
|
+
inspectionToolsData.push({
|
|
27
|
+
[classKey]: STYLELINT_INSPECTION,
|
|
28
|
+
'@_enabled': 'true',
|
|
29
|
+
'@_level': 'ERROR',
|
|
30
|
+
'@_enabled_by_default': 'true'
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return hasChanges;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
module.exports = setupStyleLintInspection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// xml property key names
|
|
2
|
+
const classKey = '@_class';
|
|
3
|
+
const nameKey = '@_name';
|
|
4
|
+
const valueKey = '@_value';
|
|
5
|
+
const toolPathKey = '@_tool_path';
|
|
6
|
+
const standardsKey = '@_standards';
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
classKey,
|
|
10
|
+
nameKey,
|
|
11
|
+
valueKey,
|
|
12
|
+
toolPathKey,
|
|
13
|
+
standardsKey
|
|
14
|
+
};
|