@lichthagel/eslint-config 1.0.20 → 1.0.22

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/dist/index.d.cts CHANGED
@@ -3043,6 +3043,11 @@ interface RuleOptions {
3043
3043
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
3044
3044
  */
3045
3045
  'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>
3046
+ /**
3047
+ * enforce a consistent style for CSS selectors
3048
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
3049
+ */
3050
+ 'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>
3046
3051
  /**
3047
3052
  * derived store should use same variable names between values and callback
3048
3053
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
@@ -3141,6 +3146,7 @@ interface RuleOptions {
3141
3146
  /**
3142
3147
  * disallow dynamic slot name
3143
3148
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
3149
+ * @deprecated
3144
3150
  */
3145
3151
  'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>
3146
3152
  /**
@@ -3156,6 +3162,7 @@ interface RuleOptions {
3156
3162
  /**
3157
3163
  * disallow using goto() without the base path
3158
3164
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
3165
+ * @deprecated
3159
3166
  */
3160
3167
  'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>
3161
3168
  /**
@@ -3183,6 +3190,11 @@ interface RuleOptions {
3183
3190
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
3184
3191
  */
3185
3192
  'svelte/no-inspect'?: Linter.RuleEntry<[]>
3193
+ /**
3194
+ * disallow using navigation (links, goto, pushState, replaceState) without the base path
3195
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
3196
+ */
3197
+ 'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
3186
3198
  /**
3187
3199
  * disallow use of not function in event handler
3188
3200
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
@@ -3193,6 +3205,11 @@ interface RuleOptions {
3193
3205
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
3194
3206
  */
3195
3207
  'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
3208
+ /**
3209
+ * Checks for invalid raw HTML elements
3210
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
3211
+ */
3212
+ 'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>
3196
3213
  /**
3197
3214
  * it's not necessary to define functions in reactive statements
3198
3215
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
@@ -3258,6 +3275,11 @@ interface RuleOptions {
3258
3275
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
3259
3276
  */
3260
3277
  'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>
3278
+ /**
3279
+ * disallow explicit children snippet where it's not needed
3280
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
3281
+ */
3282
+ 'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>
3261
3283
  /**
3262
3284
  * disallow unnecessary mustache interpolations
3263
3285
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
@@ -3268,6 +3290,11 @@ interface RuleOptions {
3268
3290
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
3269
3291
  */
3270
3292
  'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>
3293
+ /**
3294
+ * Require `const` declarations for variables that are never reassigned after declared
3295
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
3296
+ */
3297
+ 'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>
3271
3298
  /**
3272
3299
  * destructure values from object stores for better change tracking & fewer redraws
3273
3300
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
@@ -3348,6 +3375,11 @@ interface RuleOptions {
3348
3375
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
3349
3376
  */
3350
3377
  'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>
3378
+ /**
3379
+ * require valid style element parsing
3380
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
3381
+ */
3382
+ 'svelte/valid-style-parse'?: Linter.RuleEntry<[]>
3351
3383
  /**
3352
3384
  * Enforce spacing around colons of switch statements
3353
3385
  * @see https://eslint.org/docs/latest/rules/switch-colon-spacing
@@ -5372,6 +5404,8 @@ type TypescriptEslintExplicitModuleBoundaryTypes = []|[{
5372
5404
 
5373
5405
  allowHigherOrderFunctions?: boolean
5374
5406
 
5407
+ allowOverloadFunctions?: boolean
5408
+
5375
5409
  allowTypedFunctionExpressions?: boolean
5376
5410
  }]
5377
5411
  // ----- @typescript-eslint/init-declarations -----
@@ -6403,6 +6437,8 @@ type TypescriptEslintUnboundMethod = []|[{
6403
6437
  type TypescriptEslintUnifiedSignatures = []|[{
6404
6438
 
6405
6439
  ignoreDifferentlyNamedParameters?: boolean
6440
+
6441
+ ignoreOverloadsWithDifferentJSDoc?: boolean
6406
6442
  }]
6407
6443
  // ----- accessor-pairs -----
6408
6444
  type AccessorPairs = []|[{
@@ -9867,6 +9903,12 @@ type SvelteButtonHasType = []|[{
9867
9903
  type SvelteCommentDirective = []|[{
9868
9904
  reportUnusedDisableDirectives?: boolean
9869
9905
  }]
9906
+ // ----- svelte/consistent-selector-style -----
9907
+ type SvelteConsistentSelectorStyle = []|[{
9908
+ checkGlobal?: boolean
9909
+
9910
+ style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
9911
+ }]
9870
9912
  // ----- svelte/first-attribute-linebreak -----
9871
9913
  type SvelteFirstAttributeLinebreak = []|[{
9872
9914
  multiline?: ("below" | "beside")
@@ -9899,7 +9941,8 @@ type SvelteHtmlQuotes = []|[{
9899
9941
  type SvelteHtmlSelfClosing = []|[({
9900
9942
  void?: ("never" | "always" | "ignore")
9901
9943
  normal?: ("never" | "always" | "ignore")
9902
- foreign?: ("never" | "always" | "ignore")
9944
+ svg?: ("never" | "always" | "ignore")
9945
+ math?: ("never" | "always" | "ignore")
9903
9946
  component?: ("never" | "always" | "ignore")
9904
9947
  svelte?: ("never" | "always" | "ignore")
9905
9948
  } | ("all" | "html" | "none"))]
@@ -9938,6 +9981,13 @@ type SvelteNoInlineStyles = []|[{
9938
9981
  type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
9939
9982
  blockScopedFunctions?: ("allow" | "disallow")
9940
9983
  }]
9984
+ // ----- svelte/no-navigation-without-base -----
9985
+ type SvelteNoNavigationWithoutBase = []|[{
9986
+ ignoreGoto?: boolean
9987
+ ignoreLinks?: boolean
9988
+ ignorePushState?: boolean
9989
+ ignoreReplaceState?: boolean
9990
+ }]
9941
9991
  // ----- svelte/no-reactive-reassign -----
9942
9992
  type SvelteNoReactiveReassign = []|[{
9943
9993
  props?: boolean
@@ -9981,6 +10031,11 @@ type SvelteNoUselessMustaches = []|[{
9981
10031
  type SveltePreferClassDirective = []|[{
9982
10032
  prefer?: ("always" | "empty")
9983
10033
  }]
10034
+ // ----- svelte/prefer-const -----
10035
+ type SveltePreferConst = []|[{
10036
+ destructuring?: ("any" | "all")
10037
+ ignoreReadBeforeAssign?: boolean
10038
+ }]
9984
10039
  // ----- svelte/shorthand-attribute -----
9985
10040
  type SvelteShorthandAttribute = []|[{
9986
10041
  prefer?: ("always" | "never")
package/dist/index.d.ts CHANGED
@@ -3043,6 +3043,11 @@ interface RuleOptions {
3043
3043
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
3044
3044
  */
3045
3045
  'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>
3046
+ /**
3047
+ * enforce a consistent style for CSS selectors
3048
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
3049
+ */
3050
+ 'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>
3046
3051
  /**
3047
3052
  * derived store should use same variable names between values and callback
3048
3053
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
@@ -3141,6 +3146,7 @@ interface RuleOptions {
3141
3146
  /**
3142
3147
  * disallow dynamic slot name
3143
3148
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
3149
+ * @deprecated
3144
3150
  */
3145
3151
  'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>
3146
3152
  /**
@@ -3156,6 +3162,7 @@ interface RuleOptions {
3156
3162
  /**
3157
3163
  * disallow using goto() without the base path
3158
3164
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
3165
+ * @deprecated
3159
3166
  */
3160
3167
  'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>
3161
3168
  /**
@@ -3183,6 +3190,11 @@ interface RuleOptions {
3183
3190
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
3184
3191
  */
3185
3192
  'svelte/no-inspect'?: Linter.RuleEntry<[]>
3193
+ /**
3194
+ * disallow using navigation (links, goto, pushState, replaceState) without the base path
3195
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
3196
+ */
3197
+ 'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
3186
3198
  /**
3187
3199
  * disallow use of not function in event handler
3188
3200
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
@@ -3193,6 +3205,11 @@ interface RuleOptions {
3193
3205
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
3194
3206
  */
3195
3207
  'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
3208
+ /**
3209
+ * Checks for invalid raw HTML elements
3210
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
3211
+ */
3212
+ 'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>
3196
3213
  /**
3197
3214
  * it's not necessary to define functions in reactive statements
3198
3215
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
@@ -3258,6 +3275,11 @@ interface RuleOptions {
3258
3275
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
3259
3276
  */
3260
3277
  'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>
3278
+ /**
3279
+ * disallow explicit children snippet where it's not needed
3280
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
3281
+ */
3282
+ 'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>
3261
3283
  /**
3262
3284
  * disallow unnecessary mustache interpolations
3263
3285
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
@@ -3268,6 +3290,11 @@ interface RuleOptions {
3268
3290
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
3269
3291
  */
3270
3292
  'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>
3293
+ /**
3294
+ * Require `const` declarations for variables that are never reassigned after declared
3295
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
3296
+ */
3297
+ 'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>
3271
3298
  /**
3272
3299
  * destructure values from object stores for better change tracking & fewer redraws
3273
3300
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
@@ -3348,6 +3375,11 @@ interface RuleOptions {
3348
3375
  * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
3349
3376
  */
3350
3377
  'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>
3378
+ /**
3379
+ * require valid style element parsing
3380
+ * @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
3381
+ */
3382
+ 'svelte/valid-style-parse'?: Linter.RuleEntry<[]>
3351
3383
  /**
3352
3384
  * Enforce spacing around colons of switch statements
3353
3385
  * @see https://eslint.org/docs/latest/rules/switch-colon-spacing
@@ -5372,6 +5404,8 @@ type TypescriptEslintExplicitModuleBoundaryTypes = []|[{
5372
5404
 
5373
5405
  allowHigherOrderFunctions?: boolean
5374
5406
 
5407
+ allowOverloadFunctions?: boolean
5408
+
5375
5409
  allowTypedFunctionExpressions?: boolean
5376
5410
  }]
5377
5411
  // ----- @typescript-eslint/init-declarations -----
@@ -6403,6 +6437,8 @@ type TypescriptEslintUnboundMethod = []|[{
6403
6437
  type TypescriptEslintUnifiedSignatures = []|[{
6404
6438
 
6405
6439
  ignoreDifferentlyNamedParameters?: boolean
6440
+
6441
+ ignoreOverloadsWithDifferentJSDoc?: boolean
6406
6442
  }]
6407
6443
  // ----- accessor-pairs -----
6408
6444
  type AccessorPairs = []|[{
@@ -9867,6 +9903,12 @@ type SvelteButtonHasType = []|[{
9867
9903
  type SvelteCommentDirective = []|[{
9868
9904
  reportUnusedDisableDirectives?: boolean
9869
9905
  }]
9906
+ // ----- svelte/consistent-selector-style -----
9907
+ type SvelteConsistentSelectorStyle = []|[{
9908
+ checkGlobal?: boolean
9909
+
9910
+ style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
9911
+ }]
9870
9912
  // ----- svelte/first-attribute-linebreak -----
9871
9913
  type SvelteFirstAttributeLinebreak = []|[{
9872
9914
  multiline?: ("below" | "beside")
@@ -9899,7 +9941,8 @@ type SvelteHtmlQuotes = []|[{
9899
9941
  type SvelteHtmlSelfClosing = []|[({
9900
9942
  void?: ("never" | "always" | "ignore")
9901
9943
  normal?: ("never" | "always" | "ignore")
9902
- foreign?: ("never" | "always" | "ignore")
9944
+ svg?: ("never" | "always" | "ignore")
9945
+ math?: ("never" | "always" | "ignore")
9903
9946
  component?: ("never" | "always" | "ignore")
9904
9947
  svelte?: ("never" | "always" | "ignore")
9905
9948
  } | ("all" | "html" | "none"))]
@@ -9938,6 +9981,13 @@ type SvelteNoInlineStyles = []|[{
9938
9981
  type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
9939
9982
  blockScopedFunctions?: ("allow" | "disallow")
9940
9983
  }]
9984
+ // ----- svelte/no-navigation-without-base -----
9985
+ type SvelteNoNavigationWithoutBase = []|[{
9986
+ ignoreGoto?: boolean
9987
+ ignoreLinks?: boolean
9988
+ ignorePushState?: boolean
9989
+ ignoreReplaceState?: boolean
9990
+ }]
9941
9991
  // ----- svelte/no-reactive-reassign -----
9942
9992
  type SvelteNoReactiveReassign = []|[{
9943
9993
  props?: boolean
@@ -9981,6 +10031,11 @@ type SvelteNoUselessMustaches = []|[{
9981
10031
  type SveltePreferClassDirective = []|[{
9982
10032
  prefer?: ("always" | "empty")
9983
10033
  }]
10034
+ // ----- svelte/prefer-const -----
10035
+ type SveltePreferConst = []|[{
10036
+ destructuring?: ("any" | "all")
10037
+ ignoreReadBeforeAssign?: boolean
10038
+ }]
9984
10039
  // ----- svelte/shorthand-attribute -----
9985
10040
  type SvelteShorthandAttribute = []|[{
9986
10041
  prefer?: ("always" | "never")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichthagel/eslint-config",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Licht's ESLint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -57,7 +57,7 @@
57
57
  "eslint": "^9.11.1",
58
58
  "eslint-plugin-n": "^17.10.3",
59
59
  "eslint-plugin-solid": "^0.14.3",
60
- "eslint-plugin-svelte": "^2.44.1",
60
+ "eslint-plugin-svelte": "^3.0.0",
61
61
  "eslint-plugin-tailwindcss": "^3.17.4",
62
62
  "eslint-typegen": "^2.0.0",
63
63
  "husky": "^9.1.6",
@@ -73,7 +73,7 @@
73
73
  "eslint": ">=8.40.0",
74
74
  "eslint-plugin-n": "^17.2.1",
75
75
  "eslint-plugin-solid": "^0.14.3",
76
- "eslint-plugin-svelte": "^2.39.0",
76
+ "eslint-plugin-svelte": "^2.39.0 || ^3.0.0",
77
77
  "eslint-plugin-tailwindcss": "^3.17.4"
78
78
  },
79
79
  "peerDependenciesMeta": {