Skip to content

Commit 159cb6b

Browse files
authored
Merge pull request #274 from magento-gl/AC-14517-v1
AC-14517 Investigate "use strict" is unnecessary inside of modules
2 parents 243690c + 83eaa9d commit 159cb6b

File tree

3 files changed

+86
-63
lines changed

3 files changed

+86
-63
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"AFL-3.0"
77
],
88
"type": "phpcodesniffer-standard",
9-
"version": "37",
9+
"version": "38",
1010
"require": {
1111
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
1212
"webonyx/graphql-php": "^15.0",

composer.lock

Lines changed: 64 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint/eslint.config.mjs

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,25 @@ const compat = new FlatCompat({
2020
recommendedConfig: js.configs.recommended,
2121
allConfig: js.configs.all
2222
});
23-
export default defineConfig([{
24-
extends: compat.extends(
25-
"./.eslintrc-reset", // Resets all rules before applying custom ones
26-
"./.eslintrc-magento", // Magento-specific coding standards
27-
"./.eslintrc-jquery", // jQuery-related ESLint Rules
28-
"./.eslintrc-misc", // Miscellaneous Rules
29-
),
30-
plugins: {
31-
"magento-coding-standard-eslint-plugin": magentoCodingStandardEslintPlugin, // This is in flat config format (object)
23+
export default defineConfig([
24+
{
25+
extends: compat.extends(
26+
"./.eslintrc-reset", // Resets all rules before applying custom ones
27+
"./.eslintrc-magento", // Magento-specific coding standards
28+
"./.eslintrc-jquery", // jQuery-related ESLint Rules
29+
"./.eslintrc-misc", // Miscellaneous Rules
30+
),
31+
plugins: {
32+
"magento-coding-standard-eslint-plugin": magentoCodingStandardEslintPlugin, // This is in flat config format (object)
33+
}
34+
},
35+
{
36+
ignores: ['**/eslint/rules/*.js'],
37+
languageOptions: {
38+
sourceType: "script" // ensures non-module (classic script) parsing
39+
},
40+
rules: {
41+
strict: ["error", "function"] // enforces "use strict" inside functions
42+
}
3243
}
33-
}]);
44+
]);

0 commit comments

Comments
 (0)