diff --git a/docs/src/extend/custom-rule-tutorial.md b/docs/src/extend/custom-rule-tutorial.md index 37dde52f01b..aa3bd9bf6e4 100644 --- a/docs/src/extend/custom-rule-tutorial.md +++ b/docs/src/extend/custom-rule-tutorial.md @@ -183,6 +183,12 @@ Next, create the file for the tests, `enforce-foo-bar.test.js`: touch enforce-foo-bar.test.js ``` +You will use the `eslint` package in the test file. Install it as a development dependency: + +```shell +npm install eslint --save-dev +``` + And add a test script to your `package.json` file to run the tests: ```javascript @@ -196,12 +202,6 @@ And add a test script to your `package.json` file to run the tests: } ``` -Also install `eslint` as a development dependency: - -```shell -npm install eslint --save-dev -``` - ## Step 6: Write the Test To write the test using `RuleTester`, import the class and your custom rule into the `enforce-foo-bar.test.js` file.