You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/guides/v2.3/test/static/static-analysis.md
+7-16Lines changed: 7 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -19,29 +19,20 @@ For all of the static configuration installations below involving the PHPStorm P
19
19
20
20
## Javascript Code Style check
21
21
22
-
{:.bs-callout-info}
23
-
JSCS is deprecated in PHPStorm 2020.2. You must install the JSCS plugin.
24
-
25
-
{:.procedure}
26
-
To install the JSCS plugin:
27
-
28
-
1. Go to PHPStorm preferences > Languages & Frameworks > JavaScript > Code Quality Tools > JSCS.
29
-
1. Check **Enable**, if it is unchecked.
30
-
1. Enter the path to your node binary (the result of outputting `which node` in your terminal).
31
-
1. Enter the path to your JSCS package: `[magento_root]/node_modules/jscs`
32
-
1. Click **Configuration File** and in the adjacent input field enter the path to the JSCS file Magento uses, which is located in: `https://github.com/magento/magento-coding-standard/blob/develop/jscs/.jscsrc`
22
+
{:.bs-callout-warning}
23
+
[JSCS package has been deprecated](https://www.npmjs.com/package/jscs) and [merged with ESLint](https://eslint.org/blog/2016/04/welcoming-jscs-to-eslint).
To verify it works, in any JS file add `snake_case: [],` to any object literal, and you should see a warning about not using camel case for the object key.
37
-
38
-
##ESLint
27
+
{:.bs-callout-info}
28
+
Javascript code analysis is done through [ESLint]({{site.baseurl}}/guides/v2.4/coding-standards/code-standard-javascript.html#eslint-code-analysis).
29
+
The ESLint rules are set up in `magento-coding-standard`, which is installed on Magento2 via `composer` since it's a development dependency.
39
30
40
31
1. Go to PHPStorm preferences > Languages & Frameworks > JavaScript > Code Quality Tools > ESLint.
41
32
1. Click **Manual ESLint configuration**.
42
33
1. Fill in the adjacent input fields with the path to your node binary (the result of outputting `which node` in your terminal).
43
34
1. Enter the path to your ESLint package: `[magento_root]/node_modules/eslint`
44
-
1. Click **Configuration File** and in the adjacent input field enter the path to the ESLint file Magento uses, which is located in `dev/tests/static/testsuite/Magento/Test/Js/_files/eslint/.eslintrc-magento`.
35
+
1. Click **Configuration File** and in the adjacent input field enter the path to the ESLint file Magento uses, which is located in `vendor/magento/magento-coding-standard/eslint/.eslintrc-magento`.
0 commit comments