eslint-plugin-svelte 2.33.0 → 2.33.2

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.
Files changed (138) hide show
  1. package/README.md +47 -47
  2. package/lib/configs/all.js +5 -5
  3. package/lib/configs/base.d.ts +4 -4
  4. package/lib/configs/base.js +10 -10
  5. package/lib/configs/prettier.d.ts +11 -11
  6. package/lib/configs/prettier.js +14 -14
  7. package/lib/configs/recommended.d.ts +14 -14
  8. package/lib/configs/recommended.js +17 -17
  9. package/lib/index.d.ts +32 -32
  10. package/lib/index.js +4 -4
  11. package/lib/meta.d.ts +1 -1
  12. package/lib/meta.js +2 -2
  13. package/lib/processor/index.d.ts +2 -2
  14. package/lib/rules/@typescript-eslint/no-unnecessary-condition.js +83 -112
  15. package/lib/rules/block-lang.js +34 -38
  16. package/lib/rules/button-has-type.js +30 -30
  17. package/lib/rules/comment-directive.js +40 -41
  18. package/lib/rules/derived-has-same-inputs-outputs.js +20 -20
  19. package/lib/rules/experimental-require-slot-types.js +14 -14
  20. package/lib/rules/experimental-require-strict-events.js +13 -13
  21. package/lib/rules/first-attribute-linebreak.js +23 -25
  22. package/lib/rules/html-closing-bracket-spacing.js +32 -32
  23. package/lib/rules/html-quotes.js +49 -62
  24. package/lib/rules/html-self-closing.js +56 -59
  25. package/lib/rules/indent-helpers/ast.d.ts +2 -2
  26. package/lib/rules/indent-helpers/ast.js +4 -4
  27. package/lib/rules/indent-helpers/commons.d.ts +4 -4
  28. package/lib/rules/indent-helpers/commons.js +11 -11
  29. package/lib/rules/indent-helpers/es.d.ts +2 -2
  30. package/lib/rules/indent-helpers/es.js +58 -74
  31. package/lib/rules/indent-helpers/index.d.ts +2 -2
  32. package/lib/rules/indent-helpers/index.js +34 -41
  33. package/lib/rules/indent-helpers/offset-context.d.ts +2 -2
  34. package/lib/rules/indent-helpers/offset-context.js +7 -8
  35. package/lib/rules/indent-helpers/svelte.d.ts +2 -2
  36. package/lib/rules/indent-helpers/svelte.js +36 -42
  37. package/lib/rules/indent-helpers/ts.d.ts +2 -2
  38. package/lib/rules/indent-helpers/ts.js +85 -119
  39. package/lib/rules/indent.js +23 -23
  40. package/lib/rules/infinite-reactive-loop.js +57 -62
  41. package/lib/rules/max-attributes-per-line.js +26 -26
  42. package/lib/rules/mustache-spacing.js +53 -53
  43. package/lib/rules/no-at-debug-tags.js +9 -9
  44. package/lib/rules/no-at-html-tags.js +10 -10
  45. package/lib/rules/no-dom-manipulating.js +39 -41
  46. package/lib/rules/no-dupe-else-if-blocks.js +21 -21
  47. package/lib/rules/no-dupe-on-directives.js +16 -16
  48. package/lib/rules/no-dupe-style-properties.js +19 -19
  49. package/lib/rules/no-dupe-use-directives.js +16 -16
  50. package/lib/rules/no-dynamic-slot-name.js +17 -17
  51. package/lib/rules/no-export-load-in-svelte-module-in-kit-pages.js +10 -10
  52. package/lib/rules/no-extra-reactive-curlies.js +15 -15
  53. package/lib/rules/no-immutable-reactive-statements.js +80 -35
  54. package/lib/rules/no-inner-declarations.js +10 -10
  55. package/lib/rules/no-not-function-handler.js +29 -31
  56. package/lib/rules/no-object-in-text-mustaches.js +22 -22
  57. package/lib/rules/no-reactive-functions.js +14 -14
  58. package/lib/rules/no-reactive-literals.js +15 -15
  59. package/lib/rules/no-reactive-reassign.js +52 -55
  60. package/lib/rules/no-restricted-html-elements.js +22 -23
  61. package/lib/rules/no-shorthand-style-property-overrides.js +20 -20
  62. package/lib/rules/no-spaces-around-equal-signs-in-attribute.js +14 -14
  63. package/lib/rules/no-store-async.js +12 -13
  64. package/lib/rules/no-target-blank.js +27 -30
  65. package/lib/rules/no-trailing-spaces.js +23 -23
  66. package/lib/rules/no-unknown-style-directive-property.js +20 -22
  67. package/lib/rules/no-unused-class-name.js +27 -33
  68. package/lib/rules/no-unused-svelte-ignore.js +12 -12
  69. package/lib/rules/no-useless-mustaches.js +32 -32
  70. package/lib/rules/prefer-class-directive.js +38 -39
  71. package/lib/rules/prefer-destructured-store-props.js +42 -47
  72. package/lib/rules/prefer-style-directive.js +26 -32
  73. package/lib/rules/reference-helpers/svelte-store.d.ts +3 -3
  74. package/lib/rules/reference-helpers/svelte-store.js +15 -19
  75. package/lib/rules/require-each-key.js +9 -9
  76. package/lib/rules/require-event-dispatcher-types.js +14 -14
  77. package/lib/rules/require-optimized-style-attribute.js +21 -21
  78. package/lib/rules/require-store-callbacks-use-set-param.js +12 -17
  79. package/lib/rules/require-store-reactive-access.js +53 -58
  80. package/lib/rules/require-stores-init.js +11 -15
  81. package/lib/rules/shorthand-attribute.js +24 -32
  82. package/lib/rules/shorthand-directive.js +23 -23
  83. package/lib/rules/sort-attributes.js +67 -70
  84. package/lib/rules/spaced-html-comment.js +24 -27
  85. package/lib/rules/system.js +15 -17
  86. package/lib/rules/valid-compile.js +16 -16
  87. package/lib/rules/valid-each-key.js +9 -9
  88. package/lib/rules/valid-prop-names-in-kit-pages.js +21 -21
  89. package/lib/shared/comment-directives.d.ts +2 -2
  90. package/lib/shared/comment-directives.js +12 -12
  91. package/lib/shared/index.d.ts +1 -1
  92. package/lib/shared/svelte-compile-warns/extract-leading-comments.d.ts +3 -3
  93. package/lib/shared/svelte-compile-warns/extract-leading-comments.js +5 -9
  94. package/lib/shared/svelte-compile-warns/ignore-comment.d.ts +2 -2
  95. package/lib/shared/svelte-compile-warns/ignore-comment.js +4 -4
  96. package/lib/shared/svelte-compile-warns/index.d.ts +4 -4
  97. package/lib/shared/svelte-compile-warns/index.js +59 -69
  98. package/lib/shared/svelte-compile-warns/transform/babel.d.ts +3 -3
  99. package/lib/shared/svelte-compile-warns/transform/babel.js +4 -4
  100. package/lib/shared/svelte-compile-warns/transform/less.d.ts +3 -3
  101. package/lib/shared/svelte-compile-warns/transform/less.js +3 -3
  102. package/lib/shared/svelte-compile-warns/transform/postcss.d.ts +3 -3
  103. package/lib/shared/svelte-compile-warns/transform/postcss.js +5 -5
  104. package/lib/shared/svelte-compile-warns/transform/sass.d.ts +4 -4
  105. package/lib/shared/svelte-compile-warns/transform/sass.js +3 -3
  106. package/lib/shared/svelte-compile-warns/transform/stylus.d.ts +3 -3
  107. package/lib/shared/svelte-compile-warns/transform/stylus.js +4 -5
  108. package/lib/shared/svelte-compile-warns/transform/types.d.ts +1 -1
  109. package/lib/shared/svelte-compile-warns/transform/typescript.d.ts +3 -3
  110. package/lib/shared/svelte-compile-warns/transform/typescript.js +5 -6
  111. package/lib/types-for-node.d.ts +4 -4
  112. package/lib/types.d.ts +31 -31
  113. package/lib/utils/ast-utils.d.ts +11 -10
  114. package/lib/utils/ast-utils.js +124 -92
  115. package/lib/utils/css-utils/index.d.ts +3 -3
  116. package/lib/utils/css-utils/resource.js +112 -175
  117. package/lib/utils/css-utils/style-attribute.d.ts +7 -7
  118. package/lib/utils/css-utils/style-attribute.js +31 -34
  119. package/lib/utils/css-utils/template-safe-parser.d.ts +1 -1
  120. package/lib/utils/css-utils/template-tokenize.d.ts +2 -2
  121. package/lib/utils/css-utils/template-tokenize.js +5 -10
  122. package/lib/utils/css-utils/utils.js +1 -1
  123. package/lib/utils/eslint-core.d.ts +3 -3
  124. package/lib/utils/eslint-core.js +5 -6
  125. package/lib/utils/get-package-json.js +6 -6
  126. package/lib/utils/index.d.ts +1 -1
  127. package/lib/utils/index.js +3 -3
  128. package/lib/utils/lines-and-columns.js +5 -5
  129. package/lib/utils/load-module.d.ts +1 -1
  130. package/lib/utils/load-module.js +5 -8
  131. package/lib/utils/rules.d.ts +1 -1
  132. package/lib/utils/rules.js +1 -1
  133. package/lib/utils/svelte-kit.d.ts +1 -1
  134. package/lib/utils/svelte-kit.js +4 -6
  135. package/lib/utils/ts-utils/index.d.ts +2 -2
  136. package/lib/utils/ts-utils/index.js +14 -20
  137. package/lib/utils/void-elements.js +16 -16
  138. package/package.json +4 -4
package/README.md CHANGED
@@ -69,13 +69,13 @@ module.exports = {
69
69
  extends: [
70
70
  // add more generic rule sets here, such as:
71
71
  // 'eslint:recommended',
72
- "plugin:svelte/recommended",
72
+ 'plugin:svelte/recommended'
73
73
  ],
74
74
  rules: {
75
75
  // override/add rules settings here, such as:
76
76
  // 'svelte/rule-name': 'error'
77
- },
78
- }
77
+ }
78
+ };
79
79
  ```
80
80
 
81
81
  This plugin provides configs:
@@ -109,19 +109,19 @@ For example, if you are using the `"@babel/eslint-parser"`, configure it as foll
109
109
  ```js
110
110
  module.exports = {
111
111
  // ...
112
- extends: ["plugin:svelte/recommended"],
112
+ extends: ['plugin:svelte/recommended'],
113
113
  // ...
114
- parser: "@babel/eslint-parser",
114
+ parser: '@babel/eslint-parser',
115
115
  // Add an `overrides` section to add a parser configuration for svelte.
116
116
  overrides: [
117
117
  {
118
- files: ["*.svelte"],
119
- parser: "svelte-eslint-parser",
120
- },
118
+ files: ['*.svelte'],
119
+ parser: 'svelte-eslint-parser'
120
+ }
121
121
  // ...
122
- ],
122
+ ]
123
123
  // ...
124
- }
124
+ };
125
125
  ```
126
126
 
127
127
  For example, if you are using the `"@typescript-eslint/parser"`, and if you want to use TypeScript in `<script>` of `.svelte`, you need to add more `parserOptions` configuration.
@@ -129,27 +129,27 @@ For example, if you are using the `"@typescript-eslint/parser"`, and if you want
129
129
  ```js
130
130
  module.exports = {
131
131
  // ...
132
- extends: ["plugin:svelte/recommended"],
132
+ extends: ['plugin:svelte/recommended'],
133
133
  // ...
134
- parser: "@typescript-eslint/parser",
134
+ parser: '@typescript-eslint/parser',
135
135
  parserOptions: {
136
136
  // ...
137
- project: "path/to/your/tsconfig.json",
138
- extraFileExtensions: [".svelte"], // This is a required setting in `@typescript-eslint/parser` v4.24.0.
137
+ project: 'path/to/your/tsconfig.json',
138
+ extraFileExtensions: ['.svelte'] // This is a required setting in `@typescript-eslint/parser` v4.24.0.
139
139
  },
140
140
  overrides: [
141
141
  {
142
- files: ["*.svelte"],
143
- parser: "svelte-eslint-parser",
142
+ files: ['*.svelte'],
143
+ parser: 'svelte-eslint-parser',
144
144
  // Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
145
145
  parserOptions: {
146
- parser: "@typescript-eslint/parser",
147
- },
148
- },
146
+ parser: '@typescript-eslint/parser'
147
+ }
148
+ }
149
149
  // ...
150
- ],
150
+ ]
151
151
  // ...
152
- }
152
+ };
153
153
  ```
154
154
 
155
155
  If you have a mix of TypeScript and JavaScript in your project, use a multiple parser configuration.
@@ -159,21 +159,21 @@ module.exports = {
159
159
  // ...
160
160
  overrides: [
161
161
  {
162
- files: ["*.svelte"],
163
- parser: "svelte-eslint-parser",
162
+ files: ['*.svelte'],
163
+ parser: 'svelte-eslint-parser',
164
164
  parserOptions: {
165
165
  parser: {
166
166
  // Specify a parser for each lang.
167
- ts: "@typescript-eslint/parser",
168
- js: "espree",
169
- typescript: "@typescript-eslint/parser",
170
- },
171
- },
172
- },
167
+ ts: '@typescript-eslint/parser',
168
+ js: 'espree',
169
+ typescript: '@typescript-eslint/parser'
170
+ }
171
+ }
172
+ }
173
173
  // ...
174
- ],
174
+ ]
175
175
  // ...
176
- }
176
+ };
177
177
  ```
178
178
 
179
179
  See also <https://github.com/sveltejs/svelte-eslint-parser#readme>.
@@ -201,23 +201,23 @@ module.exports = {
201
201
  settings: {
202
202
  svelte: {
203
203
  ignoreWarnings: [
204
- "@typescript-eslint/no-unsafe-assignment",
205
- "@typescript-eslint/no-unsafe-member-access",
204
+ '@typescript-eslint/no-unsafe-assignment',
205
+ '@typescript-eslint/no-unsafe-member-access'
206
206
  ],
207
207
  compileOptions: {
208
208
  postcss: {
209
- configFilePath: "./path/to/my/postcss.config.js",
210
- },
209
+ configFilePath: './path/to/my/postcss.config.js'
210
+ }
211
211
  },
212
212
  kit: {
213
213
  files: {
214
- routes: "src/routes",
215
- },
216
- },
217
- },
218
- },
214
+ routes: 'src/routes'
215
+ }
216
+ }
217
+ }
218
+ }
219
219
  // ...
220
- }
220
+ };
221
221
  ```
222
222
 
223
223
  #### settings.svelte.ignoreWarnings
@@ -247,13 +247,13 @@ module.exports = {
247
247
  svelte: {
248
248
  kit: {
249
249
  files: {
250
- routes: "src/routes",
251
- },
252
- },
253
- },
254
- },
250
+ routes: 'src/routes'
251
+ }
252
+ }
253
+ }
254
+ }
255
255
  // ...
256
- }
256
+ };
257
257
  ```
258
258
 
259
259
  ### Running ESLint from the command line
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  const path_1 = __importDefault(require("path"));
6
6
  const rules_1 = require("../utils/rules");
7
- const base = require.resolve("./base");
8
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:svelte/base" : base;
7
+ const base = require.resolve('./base');
8
+ const baseExtend = path_1.default.extname(`${base}`) === '.ts' ? 'plugin:svelte/base' : base;
9
9
  module.exports = {
10
10
  extends: [baseExtend],
11
11
  rules: Object.fromEntries(rules_1.rules
12
- .map((rule) => [`svelte/${rule.meta.docs.ruleName}`, "error"])
12
+ .map((rule) => [`svelte/${rule.meta.docs.ruleName}`, 'error'])
13
13
  .filter(([ruleName]) => ![
14
- "svelte/no-restricted-html-elements",
15
- ].includes(ruleName))),
14
+ 'svelte/no-restricted-html-elements'
15
+ ].includes(ruleName)))
16
16
  };
@@ -4,10 +4,10 @@ declare const _default: {
4
4
  files: string[];
5
5
  parser: string;
6
6
  rules: {
7
- "no-inner-declarations": string;
8
- "no-self-assign": string;
9
- "svelte/comment-directive": string;
10
- "svelte/system": string;
7
+ 'no-inner-declarations': string;
8
+ 'no-self-assign': string;
9
+ 'svelte/comment-directive': string;
10
+ 'svelte/system': string;
11
11
  };
12
12
  }[];
13
13
  };
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  module.exports = {
3
- plugins: ["svelte"],
3
+ plugins: ['svelte'],
4
4
  overrides: [
5
5
  {
6
- files: ["*.svelte"],
7
- parser: require.resolve("svelte-eslint-parser"),
6
+ files: ['*.svelte'],
7
+ parser: require.resolve('svelte-eslint-parser'),
8
8
  rules: {
9
- "no-inner-declarations": "off",
10
- "no-self-assign": "off",
11
- "svelte/comment-directive": "error",
12
- "svelte/system": "error",
13
- },
14
- },
15
- ],
9
+ 'no-inner-declarations': 'off',
10
+ 'no-self-assign': 'off',
11
+ 'svelte/comment-directive': 'error',
12
+ 'svelte/system': 'error'
13
+ }
14
+ }
15
+ ]
16
16
  };
@@ -1,17 +1,17 @@
1
1
  declare const _default: {
2
2
  extends: string[];
3
3
  rules: {
4
- "svelte/first-attribute-linebreak": string;
5
- "svelte/html-closing-bracket-spacing": string;
6
- "svelte/html-quotes": string;
7
- "svelte/html-self-closing": string;
8
- "svelte/indent": string;
9
- "svelte/max-attributes-per-line": string;
10
- "svelte/mustache-spacing": string;
11
- "svelte/no-spaces-around-equal-signs-in-attribute": string;
12
- "svelte/no-trailing-spaces": string;
13
- "svelte/shorthand-attribute": string;
14
- "svelte/shorthand-directive": string;
4
+ 'svelte/first-attribute-linebreak': string;
5
+ 'svelte/html-closing-bracket-spacing': string;
6
+ 'svelte/html-quotes': string;
7
+ 'svelte/html-self-closing': string;
8
+ 'svelte/indent': string;
9
+ 'svelte/max-attributes-per-line': string;
10
+ 'svelte/mustache-spacing': string;
11
+ 'svelte/no-spaces-around-equal-signs-in-attribute': string;
12
+ 'svelte/no-trailing-spaces': string;
13
+ 'svelte/shorthand-attribute': string;
14
+ 'svelte/shorthand-directive': string;
15
15
  };
16
16
  };
17
17
  export = _default;
@@ -3,21 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:svelte/base" : base;
6
+ const base = require.resolve('./base');
7
+ const baseExtend = path_1.default.extname(`${base}`) === '.ts' ? 'plugin:svelte/base' : base;
8
8
  module.exports = {
9
9
  extends: [baseExtend],
10
10
  rules: {
11
- "svelte/first-attribute-linebreak": "off",
12
- "svelte/html-closing-bracket-spacing": "off",
13
- "svelte/html-quotes": "off",
14
- "svelte/html-self-closing": "off",
15
- "svelte/indent": "off",
16
- "svelte/max-attributes-per-line": "off",
17
- "svelte/mustache-spacing": "off",
18
- "svelte/no-spaces-around-equal-signs-in-attribute": "off",
19
- "svelte/no-trailing-spaces": "off",
20
- "svelte/shorthand-attribute": "off",
21
- "svelte/shorthand-directive": "off",
22
- },
11
+ 'svelte/first-attribute-linebreak': 'off',
12
+ 'svelte/html-closing-bracket-spacing': 'off',
13
+ 'svelte/html-quotes': 'off',
14
+ 'svelte/html-self-closing': 'off',
15
+ 'svelte/indent': 'off',
16
+ 'svelte/max-attributes-per-line': 'off',
17
+ 'svelte/mustache-spacing': 'off',
18
+ 'svelte/no-spaces-around-equal-signs-in-attribute': 'off',
19
+ 'svelte/no-trailing-spaces': 'off',
20
+ 'svelte/shorthand-attribute': 'off',
21
+ 'svelte/shorthand-directive': 'off'
22
+ }
23
23
  };
@@ -1,20 +1,20 @@
1
1
  declare const _default: {
2
2
  extends: string[];
3
3
  rules: {
4
- "svelte/comment-directive": string;
5
- "svelte/no-at-debug-tags": string;
6
- "svelte/no-at-html-tags": string;
7
- "svelte/no-dupe-else-if-blocks": string;
8
- "svelte/no-dupe-style-properties": string;
9
- "svelte/no-dynamic-slot-name": string;
10
- "svelte/no-inner-declarations": string;
11
- "svelte/no-not-function-handler": string;
12
- "svelte/no-object-in-text-mustaches": string;
13
- "svelte/no-shorthand-style-property-overrides": string;
14
- "svelte/no-unknown-style-directive-property": string;
15
- "svelte/no-unused-svelte-ignore": string;
16
- "svelte/system": string;
17
- "svelte/valid-compile": string;
4
+ 'svelte/comment-directive': string;
5
+ 'svelte/no-at-debug-tags': string;
6
+ 'svelte/no-at-html-tags': string;
7
+ 'svelte/no-dupe-else-if-blocks': string;
8
+ 'svelte/no-dupe-style-properties': string;
9
+ 'svelte/no-dynamic-slot-name': string;
10
+ 'svelte/no-inner-declarations': string;
11
+ 'svelte/no-not-function-handler': string;
12
+ 'svelte/no-object-in-text-mustaches': string;
13
+ 'svelte/no-shorthand-style-property-overrides': string;
14
+ 'svelte/no-unknown-style-directive-property': string;
15
+ 'svelte/no-unused-svelte-ignore': string;
16
+ 'svelte/system': string;
17
+ 'svelte/valid-compile': string;
18
18
  };
19
19
  };
20
20
  export = _default;
@@ -3,24 +3,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:svelte/base" : base;
6
+ const base = require.resolve('./base');
7
+ const baseExtend = path_1.default.extname(`${base}`) === '.ts' ? 'plugin:svelte/base' : base;
8
8
  module.exports = {
9
9
  extends: [baseExtend],
10
10
  rules: {
11
- "svelte/comment-directive": "error",
12
- "svelte/no-at-debug-tags": "warn",
13
- "svelte/no-at-html-tags": "error",
14
- "svelte/no-dupe-else-if-blocks": "error",
15
- "svelte/no-dupe-style-properties": "error",
16
- "svelte/no-dynamic-slot-name": "error",
17
- "svelte/no-inner-declarations": "error",
18
- "svelte/no-not-function-handler": "error",
19
- "svelte/no-object-in-text-mustaches": "error",
20
- "svelte/no-shorthand-style-property-overrides": "error",
21
- "svelte/no-unknown-style-directive-property": "error",
22
- "svelte/no-unused-svelte-ignore": "error",
23
- "svelte/system": "error",
24
- "svelte/valid-compile": "error",
25
- },
11
+ 'svelte/comment-directive': 'error',
12
+ 'svelte/no-at-debug-tags': 'warn',
13
+ 'svelte/no-at-html-tags': 'error',
14
+ 'svelte/no-dupe-else-if-blocks': 'error',
15
+ 'svelte/no-dupe-style-properties': 'error',
16
+ 'svelte/no-dynamic-slot-name': 'error',
17
+ 'svelte/no-inner-declarations': 'error',
18
+ 'svelte/no-not-function-handler': 'error',
19
+ 'svelte/no-object-in-text-mustaches': 'error',
20
+ 'svelte/no-shorthand-style-property-overrides': 'error',
21
+ 'svelte/no-unknown-style-directive-property': 'error',
22
+ 'svelte/no-unused-svelte-ignore': 'error',
23
+ 'svelte/system': 'error',
24
+ 'svelte/valid-compile': 'error'
25
+ }
26
26
  };
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { RuleModule } from "./types";
2
- import * as processor from "./processor";
1
+ import type { RuleModule } from './types';
2
+ import * as processor from './processor';
3
3
  declare const _default: {
4
4
  meta: typeof processor.meta;
5
5
  configs: {
@@ -9,46 +9,46 @@ declare const _default: {
9
9
  files: string[];
10
10
  parser: string;
11
11
  rules: {
12
- "no-inner-declarations": string;
13
- "no-self-assign": string;
14
- "svelte/comment-directive": string;
15
- "svelte/system": string;
12
+ 'no-inner-declarations': string;
13
+ 'no-self-assign': string;
14
+ 'svelte/comment-directive': string;
15
+ 'svelte/system': string;
16
16
  };
17
17
  }[];
18
18
  };
19
19
  recommended: {
20
20
  extends: string[];
21
21
  rules: {
22
- "svelte/comment-directive": string;
23
- "svelte/no-at-debug-tags": string;
24
- "svelte/no-at-html-tags": string;
25
- "svelte/no-dupe-else-if-blocks": string;
26
- "svelte/no-dupe-style-properties": string;
27
- "svelte/no-dynamic-slot-name": string;
28
- "svelte/no-inner-declarations": string;
29
- "svelte/no-not-function-handler": string;
30
- "svelte/no-object-in-text-mustaches": string;
31
- "svelte/no-shorthand-style-property-overrides": string;
32
- "svelte/no-unknown-style-directive-property": string;
33
- "svelte/no-unused-svelte-ignore": string;
34
- "svelte/system": string;
35
- "svelte/valid-compile": string;
22
+ 'svelte/comment-directive': string;
23
+ 'svelte/no-at-debug-tags': string;
24
+ 'svelte/no-at-html-tags': string;
25
+ 'svelte/no-dupe-else-if-blocks': string;
26
+ 'svelte/no-dupe-style-properties': string;
27
+ 'svelte/no-dynamic-slot-name': string;
28
+ 'svelte/no-inner-declarations': string;
29
+ 'svelte/no-not-function-handler': string;
30
+ 'svelte/no-object-in-text-mustaches': string;
31
+ 'svelte/no-shorthand-style-property-overrides': string;
32
+ 'svelte/no-unknown-style-directive-property': string;
33
+ 'svelte/no-unused-svelte-ignore': string;
34
+ 'svelte/system': string;
35
+ 'svelte/valid-compile': string;
36
36
  };
37
37
  };
38
38
  prettier: {
39
39
  extends: string[];
40
40
  rules: {
41
- "svelte/first-attribute-linebreak": string;
42
- "svelte/html-closing-bracket-spacing": string;
43
- "svelte/html-quotes": string;
44
- "svelte/html-self-closing": string;
45
- "svelte/indent": string;
46
- "svelte/max-attributes-per-line": string;
47
- "svelte/mustache-spacing": string;
48
- "svelte/no-spaces-around-equal-signs-in-attribute": string;
49
- "svelte/no-trailing-spaces": string;
50
- "svelte/shorthand-attribute": string;
51
- "svelte/shorthand-directive": string;
41
+ 'svelte/first-attribute-linebreak': string;
42
+ 'svelte/html-closing-bracket-spacing': string;
43
+ 'svelte/html-quotes': string;
44
+ 'svelte/html-self-closing': string;
45
+ 'svelte/indent': string;
46
+ 'svelte/max-attributes-per-line': string;
47
+ 'svelte/mustache-spacing': string;
48
+ 'svelte/no-spaces-around-equal-signs-in-attribute': string;
49
+ 'svelte/no-trailing-spaces': string;
50
+ 'svelte/shorthand-attribute': string;
51
+ 'svelte/shorthand-directive': string;
52
52
  };
53
53
  };
54
54
  all: {
@@ -60,7 +60,7 @@ declare const _default: {
60
60
  [key: string]: RuleModule;
61
61
  };
62
62
  processors: {
63
- ".svelte": typeof processor;
63
+ '.svelte': typeof processor;
64
64
  svelte: typeof processor;
65
65
  };
66
66
  };
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ const configs = {
36
36
  base: base_1.default,
37
37
  recommended: recommended_1.default,
38
38
  prettier: prettier_1.default,
39
- all: all_1.default,
39
+ all: all_1.default
40
40
  };
41
41
  const rules = rules_1.rules.reduce((obj, r) => {
42
42
  obj[r.meta.docs.ruleName] = r;
@@ -47,7 +47,7 @@ module.exports = {
47
47
  configs,
48
48
  rules,
49
49
  processors: {
50
- ".svelte": processor,
51
- svelte: processor,
52
- },
50
+ '.svelte': processor,
51
+ svelte: processor
52
+ }
53
53
  };
package/lib/meta.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const name: "eslint-plugin-svelte";
2
- export declare const version: "2.33.0";
2
+ export declare const version: "2.33.2";
package/lib/meta.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
- exports.name = "eslint-plugin-svelte";
5
- exports.version = "2.33.0";
4
+ exports.name = 'eslint-plugin-svelte';
5
+ exports.version = '2.33.2';
@@ -1,5 +1,5 @@
1
- import type { Linter } from "eslint";
2
- export * as meta from "../meta";
1
+ import type { Linter } from 'eslint';
2
+ export * as meta from '../meta';
3
3
  export declare function preprocess(code: string, filename: string): string[];
4
4
  export declare function postprocess([messages]: Linter.LintMessage[][], filename: string): Linter.LintMessage[];
5
5
  export declare const supportsAutofix = true;