@shayanthenerd/eslint-config 0.30.0 → 0.30.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
@@ -6,7 +6,7 @@ ESLint configuration for enforcing best practices and maintaining a consistent c
6
6
  - **Smart**: Context-aware linting with [automatic dependency detection](#automatic-dependency-detection) and _.gitignore_ recognition.
7
7
  - **Comprehensive**: [Supports useful plugins](#plugin-support) for TypeScript, React & Next, Vue & Nuxt, Astro, Tailwind, and more.
8
8
  - **Type-safe**: [Fully-typed and well-documented API](#api-reference) with `overrides` support for built-in configuration objects.
9
- - **Modern**: Requires ESLint ^10.6.0 and Node.js ^20.19.0 (ESM-only)
9
+ - **Modern**: Requires ESLint ^10.9.0 and Node.js ^20.19.0 (ESM-only)
10
10
 
11
11
  ## Table of Contents
12
12
  - [Plugin Support](#plugin-support)
@@ -206,7 +206,7 @@ const defaultOptions = {
206
206
  "docs"
207
207
  ],
208
208
  componentNameCaseInTemplate: "PascalCase",
209
- destructureProps: "always",
209
+ destructureProps: "only-when-assigned",
210
210
  ignoredUndefinedComponents: [],
211
211
  macrosOrder: [
212
212
  "definePage",
@@ -48,7 +48,7 @@ function getJavaScriptRules(options) {
48
48
  "no-self-compare": "warn",
49
49
  "no-template-curly-in-string": "error",
50
50
  "no-unassigned-vars": "error",
51
- "no-unmodified-loop-condition": "error",
51
+ "no-unmodified-loop-condition": ["warn", { checkConditionalExpressions: true }],
52
52
  "no-unreachable-loop": "warn",
53
53
  "no-unsafe-negation": isTypescriptEnabled ? "off" : ["error", { enforceForOrderingRelations: true }],
54
54
  "no-unsafe-optional-chaining": ["error", { disallowArithmeticOperators: true }],
@@ -112,7 +112,7 @@ function getJavaScriptRules(options) {
112
112
  "groupEnd",
113
113
  "groupCollapsed"
114
114
  ] }],
115
- "no-empty": "warn",
115
+ "no-empty": ["warn", { allowEmptyCatch: true }],
116
116
  "no-empty-function": ["error", { allow: [
117
117
  "overrideMethods",
118
118
  "decoratedFunctions",
@@ -120,6 +120,16 @@ function getTypescriptRules(options) {
120
120
  "@typescript-eslint/method-signature-style": ["warn", methodSignatureStyle],
121
121
  "@typescript-eslint/naming-convention": [
122
122
  "warn",
123
+ {
124
+ selector: "variable",
125
+ modifiers: ["destructured"],
126
+ format: [
127
+ "camelCase",
128
+ "PascalCase",
129
+ "UPPER_CASE"
130
+ ],
131
+ leadingUnderscore: "allow"
132
+ },
123
133
  {
124
134
  selector: "variable",
125
135
  format: [
@@ -257,7 +257,6 @@ function getUnicornRules(options) {
257
257
  "unicorn/require-module-specifiers": "error",
258
258
  "unicorn/require-number-to-fixed-digits-argument": "warn",
259
259
  "unicorn/require-passive-events": "warn",
260
- "unicorn/require-post-message-target-origin": "error",
261
260
  "unicorn/require-proxy-trap-boolean-return": "error",
262
261
  "unicorn/switch-case-braces": "warn",
263
262
  "unicorn/switch-case-break-position": "error",
@@ -963,7 +963,7 @@ interface ESLintSchema {
963
963
  * Enforce the use of baseline features.
964
964
  * @see https://html-eslint.org/docs/react/rules/use-baseline
965
965
  */
966
- '@html-eslint/react/use-baseline'?: Linter.RuleEntry<HtmlEslintReactbaseline>;
966
+ '@html-eslint/react/use-baseline'?: Linter.RuleEntry<HtmlEslintReactUseBaseline>;
967
967
  /**
968
968
  * Require specified attributes
969
969
  * @see https://html-eslint.org/docs/rules/require-attrs
@@ -1068,7 +1068,7 @@ interface ESLintSchema {
1068
1068
  * Enforce the use of baseline features.
1069
1069
  * @see https://html-eslint.org/docs/rules/use-baseline
1070
1070
  */
1071
- '@html-eslint/use-baseline'?: Linter.RuleEntry<HtmlEslintbaseline>;
1071
+ '@html-eslint/use-baseline'?: Linter.RuleEntry<HtmlEslintUseBaseline>;
1072
1072
  /**
1073
1073
  * Enforce linebreaks after opening and before closing array brackets
1074
1074
  * @see https://eslint.style/rules/array-bracket-newline
@@ -2586,7 +2586,7 @@ interface ESLintSchema {
2586
2586
  /**
2587
2587
  * Enforce JS Baseline by delegating to underlying syntax rules (es-x)
2588
2588
  */
2589
- 'baseline-js/use-baseline'?: Linter.RuleEntry<BaselineJsbaseline>;
2589
+ 'baseline-js/use-baseline'?: Linter.RuleEntry<BaselineJsUseBaseline>;
2590
2590
  /**
2591
2591
  * Enforce canonical class names.
2592
2592
  * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md
@@ -2813,7 +2813,7 @@ interface ESLintSchema {
2813
2813
  * Enforce the use of baseline features
2814
2814
  * @see https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md
2815
2815
  */
2816
- 'css/use-baseline'?: Linter.RuleEntry<Cssbaseline>;
2816
+ 'css/use-baseline'?: Linter.RuleEntry<CssUseBaseline>;
2817
2817
  /**
2818
2818
  * Require use of layers
2819
2819
  * @see https://github.com/eslint/css/blob/main/docs/rules/use-layers.md
@@ -4740,7 +4740,7 @@ interface ESLintSchema {
4740
4740
  * Disallow unmodified loop conditions
4741
4741
  * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
4742
4742
  */
4743
- 'no-unmodified-loop-condition'?: Linter.RuleEntry<[]>;
4743
+ 'no-unmodified-loop-condition'?: Linter.RuleEntry<NoUnmodifiedLoopCondition>;
4744
4744
  /**
4745
4745
  * Disallow ternary operators when simpler alternatives exist
4746
4746
  * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary
@@ -10250,7 +10250,7 @@ type HtmlEslintReactNoInvalidAttrValue = [] | [{
10250
10250
  }[];
10251
10251
  }];
10252
10252
  // ----- @html-eslint/react/use-baseline -----
10253
- type HtmlEslintReactbaseline = [] | [{
10253
+ type HtmlEslintReactUseBaseline = [] | [{
10254
10254
  available?: (("widely" | "newly") | number);
10255
10255
  }];
10256
10256
  // ----- @html-eslint/require-attrs -----
@@ -10289,7 +10289,7 @@ type HtmlEslintSortAttrs = [] | [{
10289
10289
  })[];
10290
10290
  }];
10291
10291
  // ----- @html-eslint/use-baseline -----
10292
- type HtmlEslintbaseline = [] | [{
10292
+ type HtmlEslintUseBaseline = [] | [{
10293
10293
  available?: (("widely" | "newly") | number);
10294
10294
  }];
10295
10295
  // ----- @stylistic/array-bracket-newline -----
@@ -12775,7 +12775,7 @@ type AstroSortAttributes = [] | [{
12775
12775
  order?: ("asc" | "desc");
12776
12776
  }];
12777
12777
  // ----- baseline-js/use-baseline -----
12778
- type BaselineJsbaseline = [] | [{
12778
+ type BaselineJsUseBaseline = [] | [{
12779
12779
  baseline?: (("widely" | "newly") | number);
12780
12780
  available?: (("widely" | "newly") | number);
12781
12781
  ignoreFeatures?: string[];
@@ -15854,7 +15854,7 @@ type CssSelectorComplexity = [] | [{
15854
15854
  disallowAttributeMatchers?: string[];
15855
15855
  }];
15856
15856
  // ----- css/use-baseline -----
15857
- type Cssbaseline = [] | [{
15857
+ type CssUseBaseline = [] | [{
15858
15858
  available?: (("widely" | "newly") | number);
15859
15859
  allowAtRules?: ("position-try" | "keyframes" | "layer" | "charset" | "container" | "counter-style" | "view-transition" | "custom-media" | "font-face" | "font-palette-values" | "font-feature-values" | "function" | "import" | "media" | "namespace" | "page" | "property" | "scope" | "starting-style" | "supports")[];
15860
15860
  allowFunctions?: ("abs" | "sign" | "anchor" | "anchor-size" | "attr" | "calc" | "calc-size" | "shape" | "rect" | "color" | "color-mix" | "conic-gradient" | "repeating-conic-gradient" | "contrast-color" | "round" | "superellipse" | "counter" | "counters" | "cross-fade" | "cubic-bezier" | "var" | "dynamic-range-limit-mix" | "element" | "exp" | "hypot" | "log" | "pow" | "sqrt" | "blur" | "brightness" | "contrast" | "drop-shadow" | "grayscale" | "hue-rotate" | "invert" | "opacity" | "saturate" | "sepia" | "filter" | "fit-content" | "url" | "type" | "linear-gradient" | "radial-gradient" | "repeating-linear-gradient" | "repeating-radial-gradient" | "hsl" | "hwb" | "if" | "image" | "image-set" | "lab" | "lch" | "light-dark" | "clamp" | "max" | "min" | "ray" | "oklab" | "oklch" | "paint" | "path" | "progress" | "random" | "xywh" | "rgb" | "mod" | "rem" | "env" | "circle" | "ellipse" | "inset" | "polygon" | "sibling-count" | "sibling-index" | "steps" | "matrix" | "rotate" | "scale" | "scaleX" | "scaleY" | "skew" | "skewX" | "skewY" | "translate" | "translateX" | "translateY" | "matrix3d" | "perspective" | "rotate3d" | "rotateX" | "rotateY" | "rotateZ" | "scale3d" | "scaleZ" | "translate3d" | "translateZ" | "acos" | "asin" | "atan" | "atan2" | "cos" | "sin" | "tan" | "cross-origin" | "integrity" | "referrer-policy")[];
@@ -18088,6 +18088,10 @@ type NoUnderscoreDangle = [] | [{
18088
18088
  allowInArrayDestructuring?: boolean;
18089
18089
  allowInObjectDestructuring?: boolean;
18090
18090
  }];
18091
+ // ----- no-unmodified-loop-condition -----
18092
+ type NoUnmodifiedLoopCondition = [] | [{
18093
+ checkConditionalExpressions?: boolean;
18094
+ }];
18091
18095
  // ----- no-unneeded-ternary -----
18092
18096
  type NoUnneededTernary = [] | [{
18093
18097
  defaultAssignment?: boolean;
@@ -133,7 +133,7 @@ interface VueOptions extends ConfigWithOverrides<ConfigRules> {
133
133
  /**
134
134
  * Enforce a consistent style for destructuring props.
135
135
  *
136
- * @default 'always'
136
+ * @default 'only-when-assigned'
137
137
  *
138
138
  * @see [vue/define-props-destructuring: `destructure` option](https://eslint.vuejs.org/rules/define-props-destructuring#options)
139
139
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",
@@ -59,9 +59,9 @@
59
59
  "@eslint-react/eslint-plugin": "5.18.6",
60
60
  "@eslint/css": "1.4.0",
61
61
  "@eslint/markdown": "8.0.3",
62
- "@html-eslint/eslint-plugin": "0.64.0",
63
- "@html-eslint/eslint-plugin-react": "0.64.0",
64
- "@next/eslint-plugin-next": "16.3.1",
62
+ "@html-eslint/eslint-plugin": "0.65.0",
63
+ "@html-eslint/eslint-plugin-react": "0.65.0",
64
+ "@next/eslint-plugin-next": "16.3.2",
65
65
  "@nuxt/eslint-plugin": "1.17.0",
66
66
  "@stylistic/eslint-plugin": "5.10.0",
67
67
  "@vitest/eslint-plugin": "1.6.27",
@@ -72,7 +72,7 @@
72
72
  "eslint-plugin-astro": "3.1.0",
73
73
  "eslint-plugin-baseline-js": "0.7.1",
74
74
  "eslint-plugin-better-tailwindcss": "4.7.0",
75
- "eslint-plugin-cypress": "7.0.0",
75
+ "eslint-plugin-cypress": "7.0.1",
76
76
  "eslint-plugin-import-x": "4.17.1",
77
77
  "eslint-plugin-jsx-a11y": "6.10.2",
78
78
  "eslint-plugin-n": "18.3.0",
@@ -80,7 +80,7 @@
80
80
  "eslint-plugin-perfectionist": "5.10.1",
81
81
  "eslint-plugin-playwright": "2.11.0",
82
82
  "eslint-plugin-promise": "7.3.0",
83
- "eslint-plugin-storybook": "10.5.8",
83
+ "eslint-plugin-storybook": "10.5.10",
84
84
  "eslint-plugin-unicorn": "73.0.0",
85
85
  "eslint-plugin-vue": "10.10.0",
86
86
  "eslint-plugin-vuejs-accessibility": "2.6.0",
@@ -88,20 +88,20 @@
88
88
  "eslint-plugin-zod-mini": "1.6.1",
89
89
  "globals": "17.11.0",
90
90
  "local-pkg": "1.2.1",
91
- "nuxt-link-checker": "5.1.3",
91
+ "nuxt-link-checker": "5.3.0",
92
92
  "tailwind-csstree": "0.3.3",
93
93
  "typescript-eslint": "8.67.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@arethetypeswrong/cli": "0.18.5",
97
- "@eslint/config-inspector": "3.2.0",
97
+ "@eslint/config-inspector": "3.3.0",
98
98
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
99
99
  "@types/node": "26.2.0",
100
- "eslint": "10.8.1",
100
+ "eslint": "10.9.0",
101
101
  "eslint-typegen": "2.3.1",
102
102
  "nano-staged": "1.0.2",
103
103
  "prettier": "3.9.6",
104
- "publint": "0.3.23",
104
+ "publint": "0.3.24",
105
105
  "serve": "14.2.6",
106
106
  "simple-git-hooks": "2.13.1",
107
107
  "ts-morph": "28.0.0",
@@ -110,7 +110,7 @@
110
110
  "unplugin-unused": "0.6.0"
111
111
  },
112
112
  "peerDependencies": {
113
- "eslint": "^10.6.0"
113
+ "eslint": "^10.9.0"
114
114
  },
115
115
  "engines": {
116
116
  "node": "^20.19.0 || ^22.13.0 || ^24.0.0 || ^26.0.0"
@@ -118,7 +118,7 @@
118
118
  "devEngines": {
119
119
  "packageManager": {
120
120
  "name": "pnpm",
121
- "version": "11.21.0",
121
+ "version": "11.22.0",
122
122
  "onFail": "warn"
123
123
  },
124
124
  "runtime": {