@lichthagel/eslint-config 1.0.20 → 1.0.21

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
@@ -9867,6 +9899,12 @@ type SvelteButtonHasType = []|[{
9867
9899
  type SvelteCommentDirective = []|[{
9868
9900
  reportUnusedDisableDirectives?: boolean
9869
9901
  }]
9902
+ // ----- svelte/consistent-selector-style -----
9903
+ type SvelteConsistentSelectorStyle = []|[{
9904
+ checkGlobal?: boolean
9905
+
9906
+ style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
9907
+ }]
9870
9908
  // ----- svelte/first-attribute-linebreak -----
9871
9909
  type SvelteFirstAttributeLinebreak = []|[{
9872
9910
  multiline?: ("below" | "beside")
@@ -9899,7 +9937,8 @@ type SvelteHtmlQuotes = []|[{
9899
9937
  type SvelteHtmlSelfClosing = []|[({
9900
9938
  void?: ("never" | "always" | "ignore")
9901
9939
  normal?: ("never" | "always" | "ignore")
9902
- foreign?: ("never" | "always" | "ignore")
9940
+ svg?: ("never" | "always" | "ignore")
9941
+ math?: ("never" | "always" | "ignore")
9903
9942
  component?: ("never" | "always" | "ignore")
9904
9943
  svelte?: ("never" | "always" | "ignore")
9905
9944
  } | ("all" | "html" | "none"))]
@@ -9938,6 +9977,13 @@ type SvelteNoInlineStyles = []|[{
9938
9977
  type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
9939
9978
  blockScopedFunctions?: ("allow" | "disallow")
9940
9979
  }]
9980
+ // ----- svelte/no-navigation-without-base -----
9981
+ type SvelteNoNavigationWithoutBase = []|[{
9982
+ ignoreGoto?: boolean
9983
+ ignoreLinks?: boolean
9984
+ ignorePushState?: boolean
9985
+ ignoreReplaceState?: boolean
9986
+ }]
9941
9987
  // ----- svelte/no-reactive-reassign -----
9942
9988
  type SvelteNoReactiveReassign = []|[{
9943
9989
  props?: boolean
@@ -9981,6 +10027,11 @@ type SvelteNoUselessMustaches = []|[{
9981
10027
  type SveltePreferClassDirective = []|[{
9982
10028
  prefer?: ("always" | "empty")
9983
10029
  }]
10030
+ // ----- svelte/prefer-const -----
10031
+ type SveltePreferConst = []|[{
10032
+ destructuring?: ("any" | "all")
10033
+ ignoreReadBeforeAssign?: boolean
10034
+ }]
9984
10035
  // ----- svelte/shorthand-attribute -----
9985
10036
  type SvelteShorthandAttribute = []|[{
9986
10037
  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
@@ -9867,6 +9899,12 @@ type SvelteButtonHasType = []|[{
9867
9899
  type SvelteCommentDirective = []|[{
9868
9900
  reportUnusedDisableDirectives?: boolean
9869
9901
  }]
9902
+ // ----- svelte/consistent-selector-style -----
9903
+ type SvelteConsistentSelectorStyle = []|[{
9904
+ checkGlobal?: boolean
9905
+
9906
+ style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
9907
+ }]
9870
9908
  // ----- svelte/first-attribute-linebreak -----
9871
9909
  type SvelteFirstAttributeLinebreak = []|[{
9872
9910
  multiline?: ("below" | "beside")
@@ -9899,7 +9937,8 @@ type SvelteHtmlQuotes = []|[{
9899
9937
  type SvelteHtmlSelfClosing = []|[({
9900
9938
  void?: ("never" | "always" | "ignore")
9901
9939
  normal?: ("never" | "always" | "ignore")
9902
- foreign?: ("never" | "always" | "ignore")
9940
+ svg?: ("never" | "always" | "ignore")
9941
+ math?: ("never" | "always" | "ignore")
9903
9942
  component?: ("never" | "always" | "ignore")
9904
9943
  svelte?: ("never" | "always" | "ignore")
9905
9944
  } | ("all" | "html" | "none"))]
@@ -9938,6 +9977,13 @@ type SvelteNoInlineStyles = []|[{
9938
9977
  type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
9939
9978
  blockScopedFunctions?: ("allow" | "disallow")
9940
9979
  }]
9980
+ // ----- svelte/no-navigation-without-base -----
9981
+ type SvelteNoNavigationWithoutBase = []|[{
9982
+ ignoreGoto?: boolean
9983
+ ignoreLinks?: boolean
9984
+ ignorePushState?: boolean
9985
+ ignoreReplaceState?: boolean
9986
+ }]
9941
9987
  // ----- svelte/no-reactive-reassign -----
9942
9988
  type SvelteNoReactiveReassign = []|[{
9943
9989
  props?: boolean
@@ -9981,6 +10027,11 @@ type SvelteNoUselessMustaches = []|[{
9981
10027
  type SveltePreferClassDirective = []|[{
9982
10028
  prefer?: ("always" | "empty")
9983
10029
  }]
10030
+ // ----- svelte/prefer-const -----
10031
+ type SveltePreferConst = []|[{
10032
+ destructuring?: ("any" | "all")
10033
+ ignoreReadBeforeAssign?: boolean
10034
+ }]
9984
10035
  // ----- svelte/shorthand-attribute -----
9985
10036
  type SvelteShorthandAttribute = []|[{
9986
10037
  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.21",
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": {