eslint-plugin-svelte 2.3.0 → 2.3.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/README.md CHANGED
@@ -336,7 +336,9 @@ Please use GitHub's Issues/PRs.
336
336
 
337
337
  - `yarn test` runs tests.
338
338
  - `yarn cover` runs tests and measures coverage.
339
+ - `yarn new [new-rule-name]` generate the files needed to implement the new rule.
339
340
  - `yarn update` runs in order to update readme and recommended configuration.
341
+ - `yarn docs:watch` launch the document site in development mode.
340
342
 
341
343
  ### Test the Rule
342
344
 
@@ -18,6 +18,9 @@ exports.default = (0, utils_1.createRule)("no-unused-svelte-ignore", {
18
18
  type: "suggestion",
19
19
  },
20
20
  create(context) {
21
+ if (!context.parserServices.isSvelte) {
22
+ return {};
23
+ }
21
24
  const sourceCode = context.getSourceCode();
22
25
  const ignoreComments = [];
23
26
  for (const item of (0, ignore_comment_1.getSvelteIgnoreItems)(context)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-svelte",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "ESLint plugin for Svelte using AST",
5
5
  "repository": "git+https://github.com/ota-meshi/eslint-plugin-svelte.git",
6
6
  "homepage": "https://ota-meshi.github.io/eslint-plugin-svelte",
@@ -115,6 +115,7 @@
115
115
  "eslint-plugin-regexp": "^1.0.0",
116
116
  "eslint-plugin-svelte": "^2.0.0",
117
117
  "eslint-plugin-yml": "^1.0.0",
118
+ "eslint-scope": "^7.1.1",
118
119
  "estree-walker": "^3.0.0",
119
120
  "less": "^4.1.2",
120
121
  "locate-character": "^2.0.5",