@shayanthenerd/eslint-config 0.26.3 → 0.26.5

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
@@ -231,8 +231,9 @@ Some rules depend on the specified Node.js version. Visit the documentation for
231
231
 
232
232
  ## IDE Support
233
233
  Install the VS Code extensions for [ESLint][extension-eslint] and [Prettier][extension-prettier].
234
+
234
235
  > [!TIP]
235
- > In case you're using PNPM without `shamefullyHoist: true`, add the following to your _pnpm-workspace.yaml_ and run `pnpm install --yes` so ESLint's VS Code extension works as expected:
236
+ > In case you're using PNPM without `shamefullyHoist: true` and ESLint's VS Code extension isn't working as expected, add the following to your _pnpm-workspace.yaml_ and run `pnpm install --yes`:
236
237
  > ```yaml title="pnpm-workspace.yaml"
237
238
  > publicHoistPattern:
238
239
  > - '*eslint*'
@@ -82,7 +82,7 @@ function getJavaScriptRules(options) {
82
82
  "consistent-return": isTypeScriptEnabled ? "off" : "error",
83
83
  "consistent-this": "error",
84
84
  "curly": "warn",
85
- "default-case": "warn",
85
+ "default-case": isTypeScriptEnabled ? "off" : "warn",
86
86
  "default-case-last": "warn",
87
87
  "default-param-last": isTypeScriptEnabled ? "off" : "warn",
88
88
  "dot-notation": isTypeScriptEnabled ? "off" : "warn",
@@ -164,10 +164,14 @@ function getJavaScriptRules(options) {
164
164
  "no-setter-return": isTypeScriptEnabled ? "off" : "error",
165
165
  "no-shadow": ["error", {
166
166
  hoist: "all",
167
- allow: ["name"],
168
167
  builtinGlobals: true,
169
168
  ignoreTypeValueShadow: false,
170
- ignoreFunctionTypeParameterNameValueShadow: false
169
+ ignoreFunctionTypeParameterNameValueShadow: false,
170
+ allow: [
171
+ "name",
172
+ "event",
173
+ "status"
174
+ ]
171
175
  }],
172
176
  "no-shadow-restricted-names": "warn",
173
177
  "no-sparse-arrays": "error",
@@ -1,30 +1,33 @@
1
1
  import { isEnabled } from "../utils/isEnabled.mjs";
2
2
  import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
3
3
  //#region src/rules/tailwind.ts
4
- const ignoredNonLogicalProperties = [
5
- "^top(?:-.+)?$",
6
- "^bottom(?:-.+)?$",
7
- "^pt-.+$",
8
- "^pb-.+$",
9
- "^-?mt-.+$",
10
- "^-?mb-.+$",
11
- "^border-t(?:-.+)?$",
12
- "^border-b(?:-.+)?$",
13
- "^w-.+$",
14
- "^min-w-.+$",
15
- "^max-w-.+$",
16
- "^h-.+$",
17
- "^min-h-.+$",
18
- "^max-h-.+$",
19
- "^overflow-x-.+$",
20
- "^overflow-y-.+$",
21
- "^overscroll-x-.+$",
22
- "^overscroll-y-.+$",
23
- "^scroll-pt-.+$",
24
- "^scroll-pb-.+$",
25
- "^scroll-mt-.+$",
26
- "^scroll-mb-.+$"
27
- ];
4
+ const nonLogicalTailwindUtilityPatterns = [
5
+ "-?top(?:-.+)?",
6
+ "-?bottom(?:-.+)?",
7
+ "pt-.+",
8
+ "pb-.+",
9
+ "-?mt-.+",
10
+ "-?mb-.+",
11
+ "border-t(?:-.+)?",
12
+ "border-b(?:-.+)?",
13
+ "w-.+",
14
+ "min-w-.+",
15
+ "max-w-.+",
16
+ "h-.+",
17
+ "min-h-.+",
18
+ "max-h-.+",
19
+ "size-.+",
20
+ "overflow-x-.+",
21
+ "overflow-y-.+",
22
+ "overscroll-x-.+",
23
+ "overscroll-y-.+",
24
+ "scroll-pt-.+",
25
+ "scroll-pb-.+",
26
+ "-?scroll-mt-.+",
27
+ "-?scroll-mb-.+"
28
+ ].map((pattern) => {
29
+ return `^(?:\\S+:)*(?:!${pattern}|${pattern}!?)$`;
30
+ });
28
31
  function getTailwindRules(options) {
29
32
  const { tailwind, stylistic } = options.configs;
30
33
  const { multilineSort, ignoredUnknownClasses: userIgnoredUnknownClasses } = isEnabled(tailwind) ? tailwind : defaultOptions.configs.tailwind;
@@ -41,7 +44,7 @@ function getTailwindRules(options) {
41
44
  printWidth: maxLineLength
42
45
  }],
43
46
  "better-tailwindcss/enforce-consistent-variant-order": "warn",
44
- "better-tailwindcss/enforce-logical-properties": ["warn", { ignore: ignoredNonLogicalProperties }],
47
+ "better-tailwindcss/enforce-logical-properties": ["warn", { ignore: nonLogicalTailwindUtilityPatterns }],
45
48
  "better-tailwindcss/no-duplicate-classes": "error",
46
49
  "better-tailwindcss/no-deprecated-classes": "error",
47
50
  "better-tailwindcss/no-unnecessary-whitespace": "warn",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.26.3",
3
+ "version": "0.26.5",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,12 +52,12 @@
52
52
  "{**/*.ts,package.json}": "pnpm lint"
53
53
  },
54
54
  "dependencies": {
55
- "@eslint-react/eslint-plugin": "5.10.0",
55
+ "@eslint-react/eslint-plugin": "5.10.2",
56
56
  "@eslint/css": "1.4.0",
57
57
  "@eslint/markdown": "8.0.3",
58
58
  "@html-eslint/eslint-plugin": "0.63.0",
59
59
  "@html-eslint/eslint-plugin-react": "0.63.0",
60
- "@next/eslint-plugin-next": "16.2.9",
60
+ "@next/eslint-plugin-next": "16.2.10",
61
61
  "@stylistic/eslint-plugin": "5.10.0",
62
62
  "@vitest/eslint-plugin": "1.6.20",
63
63
  "astro-eslint-parser": "2.1.0",
@@ -66,7 +66,7 @@
66
66
  "eslint-import-resolver-typescript": "4.4.5",
67
67
  "eslint-plugin-astro": "2.1.1",
68
68
  "eslint-plugin-baseline-js": "0.6.2",
69
- "eslint-plugin-better-tailwindcss": "4.6.0",
69
+ "eslint-plugin-better-tailwindcss": "4.6.1",
70
70
  "eslint-plugin-cypress": "6.4.2",
71
71
  "eslint-plugin-import-x": "4.17.1",
72
72
  "eslint-plugin-jsx-a11y": "6.10.2",
@@ -91,7 +91,7 @@
91
91
  "@eslint/config-inspector": "3.0.4",
92
92
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
93
93
  "@types/node": "26.1.0",
94
- "actions-up": "1.15.0",
94
+ "actions-up": "1.16.0",
95
95
  "eslint": "10.6.0",
96
96
  "eslint-typegen": "2.3.1",
97
97
  "nano-staged": "1.0.2",