@shayanthenerd/eslint-config 0.29.0 → 0.29.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.
@@ -132,11 +132,9 @@ const defaultOptions = {
132
132
  unicorn: {
133
133
  functionStyle: {
134
134
  callbacks: "arrow-function",
135
- default: "declaration",
136
135
  defaultExport: "declaration",
137
136
  namedExports: "declaration",
138
137
  namedFunctions: "declaration",
139
- objectProperties: "method",
140
138
  reassignedVariables: "arrow-function",
141
139
  typedVariables: "arrow-function"
142
140
  },
@@ -25,7 +25,9 @@ function getNodeRules(options) {
25
25
  "n/prefer-global/timers": "warn",
26
26
  "n/prefer-global/url": "warn",
27
27
  "n/prefer-global/url-search-params": "warn",
28
+ "n/prefer-import/assert-strict": "error",
28
29
  "n/prefer-node-protocol": "warn",
30
+ "n/prefer-process-get-builtin-module": "error",
29
31
  "n/prefer-promises/dns": "warn",
30
32
  "n/prefer-promises/fs": "warn",
31
33
  "n/process-exit-as-throw": "error"
@@ -3783,7 +3783,7 @@ interface ESLintSchema {
3783
3783
  */
3784
3784
  'n/no-new-require'?: Linter.RuleEntry<[]>;
3785
3785
  /**
3786
- * disallow string concatenation with `__dirname` and `__filename`
3786
+ * disallow string concatenation with `__dirname`, `__filename`, and `import.meta` paths
3787
3787
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
3788
3788
  */
3789
3789
  'n/no-path-concat'?: Linter.RuleEntry<[]>;
@@ -3892,11 +3892,21 @@ interface ESLintSchema {
3892
3892
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
3893
3893
  */
3894
3894
  'n/prefer-global/url-search-params'?: Linter.RuleEntry<NPreferGlobalUrlSearchParams>;
3895
+ /**
3896
+ * enforce using `node:assert/strict` instead of `node:assert`.
3897
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
3898
+ */
3899
+ 'n/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
3895
3900
  /**
3896
3901
  * enforce using the `node:` protocol when importing Node.js builtin modules.
3897
3902
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
3898
3903
  */
3899
3904
  'n/prefer-node-protocol'?: Linter.RuleEntry<NPreferNodeProtocol>;
3905
+ /**
3906
+ * enforce using `process.getBuiltinModule()` to load Node.js built-in modules
3907
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
3908
+ */
3909
+ 'n/prefer-process-get-builtin-module'?: Linter.RuleEntry<NPreferProcessGetBuiltinModule>;
3900
3910
  /**
3901
3911
  * enforce `require("dns").promises`
3902
3912
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
@@ -5192,7 +5202,7 @@ interface ESLintSchema {
5192
5202
  * Enforce that names for `scripts` are in kebab case (optionally separated by colons).
5193
5203
  * @see https://eslint-plugin-package-json.dev/rules/scripts-name-casing
5194
5204
  */
5195
- 'package-json/scripts-name-casing'?: Linter.RuleEntry<[]>;
5205
+ 'package-json/scripts-name-casing'?: Linter.RuleEntry<PackageJsonScriptsNameCasing>;
5196
5206
  /**
5197
5207
  * Selected collections must be in a consistent order (lexicographical for most; lifecycle-aware for scripts).
5198
5208
  * @see https://eslint-plugin-package-json.dev/rules/sort-collections
@@ -17720,6 +17730,10 @@ type NPreferGlobalUrlSearchParams = [] | [("always" | "never")];
17720
17730
  type NPreferNodeProtocol = [] | [{
17721
17731
  version?: string;
17722
17732
  }];
17733
+ // ----- n/prefer-process-get-builtin-module -----
17734
+ type NPreferProcessGetBuiltinModule = [] | [{
17735
+ version?: string;
17736
+ }];
17723
17737
  // ----- n/shebang -----
17724
17738
  type NShebang = [] | [{
17725
17739
  convertPath?: ({
@@ -18406,12 +18420,12 @@ type PackageJsonRestrictDependencyRanges = [] | [({
18406
18420
  forDependencyTypes?: ("dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies")[];
18407
18421
  forPackages?: string[];
18408
18422
  forVersions?: string;
18409
- rangeType: (("caret" | "pin" | "tilde") | ("caret" | "pin" | "tilde")[]);
18423
+ rangeType: (("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge") | ("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge")[]);
18410
18424
  } | {
18411
18425
  forDependencyTypes?: ("dependencies" | "devDependencies" | "optionalDependencies" | "peerDependencies")[];
18412
18426
  forPackages?: string[];
18413
18427
  forVersions?: string;
18414
- rangeType: (("caret" | "pin" | "tilde") | ("caret" | "pin" | "tilde")[]);
18428
+ rangeType: (("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge") | ("^" | "~" | "<" | "<=" | ">" | ">=" | "caret" | "pin" | "tilde" | "lt" | "le" | "gt" | "ge")[]);
18415
18429
  }[])];
18416
18430
  // ----- package-json/restrict-private-properties -----
18417
18431
  type PackageJsonRestrictPrivateProperties = [] | [{
@@ -18424,6 +18438,11 @@ type PackageJsonRestrictTopLevelProperties = [] | [{
18424
18438
  property: string;
18425
18439
  })[];
18426
18440
  }];
18441
+ // ----- package-json/scripts-name-casing -----
18442
+ type PackageJsonScriptsNameCasing = [] | [{
18443
+ ignoreNames?: string[];
18444
+ ignorePatterns?: string[];
18445
+ }];
18427
18446
  // ----- package-json/sort-collections -----
18428
18447
  type PackageJsonSortCollections = [] | [(string | {
18429
18448
  key: string;
@@ -393,16 +393,18 @@ interface Options {
393
393
  */
394
394
  unicorn?: boolean | ConfigWithOverrides<PluginRules<'unicorn'>> & {
395
395
  /**
396
- * Enforce a consistent style across different function types.
396
+ * Enforce a consistent style for different types of functions.
397
+ *
398
+ * Object properties and functions that don't match a specified role are ignored.
399
+ *
400
+ * New entries are merged with the defaults and take precedence over them.
397
401
  *
398
402
  * @default
399
403
  * {
400
404
  * callbacks: 'arrow-function',
401
- * default: 'declaration',
402
405
  * defaultExport: 'declaration',
403
406
  * namedExports: 'declaration',
404
407
  * namedFunctions: 'declaration',
405
- * objectProperties: 'method',
406
408
  * reassignedVariables: 'arrow-function',
407
409
  * typedVariables: 'arrow-function',
408
410
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",
@@ -49,15 +49,15 @@
49
49
  "{**/*.ts,package.json}": "pnpm lint"
50
50
  },
51
51
  "dependencies": {
52
- "@eslint-react/eslint-plugin": "5.18.2",
52
+ "@eslint-react/eslint-plugin": "5.18.3",
53
53
  "@eslint/css": "1.4.0",
54
54
  "@eslint/markdown": "8.0.3",
55
55
  "@html-eslint/eslint-plugin": "0.64.0",
56
56
  "@html-eslint/eslint-plugin-react": "0.64.0",
57
57
  "@next/eslint-plugin-next": "16.3.0",
58
- "@nuxt/eslint-plugin": "1.16.0",
58
+ "@nuxt/eslint-plugin": "1.17.0",
59
59
  "@stylistic/eslint-plugin": "5.10.0",
60
- "@vitest/eslint-plugin": "1.6.26",
60
+ "@vitest/eslint-plugin": "1.6.27",
61
61
  "astro-eslint-parser": "3.0.0",
62
62
  "defu": "6.1.7",
63
63
  "eslint-flat-config-utils": "3.2.0",
@@ -65,20 +65,20 @@
65
65
  "eslint-plugin-astro": "3.1.0",
66
66
  "eslint-plugin-baseline-js": "0.7.0",
67
67
  "eslint-plugin-better-tailwindcss": "4.7.0",
68
- "eslint-plugin-cypress": "6.4.3",
68
+ "eslint-plugin-cypress": "7.0.0",
69
69
  "eslint-plugin-import-x": "4.17.1",
70
70
  "eslint-plugin-jsx-a11y": "6.10.2",
71
- "eslint-plugin-n": "18.2.2",
72
- "eslint-plugin-package-json": "1.6.2",
71
+ "eslint-plugin-n": "18.3.0",
72
+ "eslint-plugin-package-json": "1.7.0",
73
73
  "eslint-plugin-perfectionist": "5.10.1",
74
74
  "eslint-plugin-playwright": "2.11.0",
75
75
  "eslint-plugin-promise": "7.3.0",
76
- "eslint-plugin-storybook": "10.5.6",
76
+ "eslint-plugin-storybook": "10.5.7",
77
77
  "eslint-plugin-unicorn": "73.0.0",
78
78
  "eslint-plugin-vue": "10.10.0",
79
- "eslint-plugin-vuejs-accessibility": "2.5.0",
80
- "eslint-plugin-zod": "4.9.0",
81
- "eslint-plugin-zod-mini": "1.6.0",
79
+ "eslint-plugin-vuejs-accessibility": "2.6.0",
80
+ "eslint-plugin-zod": "4.9.1",
81
+ "eslint-plugin-zod-mini": "1.6.1",
82
82
  "globals": "17.9.0",
83
83
  "local-pkg": "1.2.1",
84
84
  "nuxt-link-checker": "5.1.3",
@@ -89,9 +89,8 @@
89
89
  "@arethetypeswrong/cli": "0.18.5",
90
90
  "@eslint/config-inspector": "3.2.0",
91
91
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
92
- "@types/node": "26.1.2",
93
- "actions-up": "1.16.0",
94
- "eslint": "10.8.0",
92
+ "@types/node": "26.2.0",
93
+ "eslint": "10.8.1",
95
94
  "eslint-typegen": "2.3.1",
96
95
  "nano-staged": "1.0.2",
97
96
  "prettier": "3.9.6",
@@ -126,7 +125,6 @@
126
125
  },
127
126
  "scripts": {
128
127
  "git:gitmessage": "git config --local commit.template '.gitmessage'",
129
- "update:actions": "actions-up --yes",
130
128
  "update:deps": "pnpm update --latest && pnpm dedupe && pnpm generate:types && pnpm generate:docs",
131
129
  "check:spell": "pnpx cspell . --gitignore --exclude='pnpm-lock.yaml' --cache --cache-location='./node_modules/.cache/.cspellcache'",
132
130
  "inspect": "pnpm build:package && eslint-config-inspector",