From 99b80ebcae1e4dd5fa1fdd4f34e480e70e34bea6 Mon Sep 17 00:00:00 2001 From: Ilya Azin Date: Tue, 17 Nov 2020 13:05:47 +0300 Subject: [PATCH] feat(max-tags-file): add launch.json for debugging + fix method typo #9 --- .vscode/launch.json | 19 +++++++++++++++++++ lib/rules/max-tags-file.js | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5f7ffac --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Start testing", + "program": "${workspaceFolder}/node_modules/.bin/mocha", + "args": [ + "${file}", + "--watch" + ], + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/lib/rules/max-tags-file.js b/lib/rules/max-tags-file.js index 0a5eb2d..a45f94c 100644 --- a/lib/rules/max-tags-file.js +++ b/lib/rules/max-tags-file.js @@ -22,7 +22,7 @@ let maxTags = DEFAULT_MAX_TAGS; * @param {import("eslint").Rule.RuleContext} context */ function create(context) { - const code = context.getSoudrcdawdaweCode().getComments() + const code = context.getSourceCode(); if (context.options.length > 0) { maxTags = context.options[0]; }