Skip to content

Commit a2f1575

Browse files
chore(deps): update eslint (major) (#3687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: xDivisionByZerox <leyla.jaehnig@gmx.de>
1 parent ca01985 commit a2f1575

22 files changed

Lines changed: 211 additions & 182 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ function foo(bar: number = 0) {
365365
*
366366
* @param bar this is a parameter description. Defaults to `0`.
367367
*
368-
* @throws If bar is negative.
368+
* @throws {FakerError} If bar is negative.
369369
*/
370370
function foo(bar: number = 0) {
371371
// implementation

docs/.vitepress/versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function readOtherLatestReleaseTagNames(): string[] {
3131
}
3232
}
3333

34-
return Object.values(latestTagByMajor).sort(semver.rcompare);
34+
return Object.values(latestTagByMajor).toSorted(semver.rcompare);
3535
}
3636

3737
// Set by netlify

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default defineConfig(
157157
'unicorn/no-zero-fractions': 'off', // deactivated to raise awareness of floating operations
158158
'unicorn/number-literal-case': 'off', // incompatible with prettier
159159
'unicorn/numeric-separators-style': 'off', // "magic numbers" may carry specific meaning
160+
'unicorn/prefer-bigint-literals': 'off', // currently there is no clear argument on why literal would be better
160161
'unicorn/prefer-string-raw': 'off', // The additional prefix doesn't help readability
161162
'unicorn/prefer-string-slice': 'off', // string.substring is sometimes easier to use
162163
'unicorn/prefer-ternary': 'off', // ternaries aren't always better

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"dist"
9999
],
100100
"devDependencies": {
101-
"@eslint/compat": "1.4.1",
101+
"@eslint/compat": "2.0.0",
102102
"@eslint/js": "9.39.2",
103103
"@stylistic/eslint-plugin": "5.6.1",
104104
"@types/node": "22.19.3",
@@ -114,9 +114,9 @@
114114
"eslint": "9.39.2",
115115
"eslint-config-prettier": "10.1.8",
116116
"eslint-plugin-file-progress": "3.0.2",
117-
"eslint-plugin-jsdoc": "54.7.0",
117+
"eslint-plugin-jsdoc": "61.5.0",
118118
"eslint-plugin-prettier": "5.5.4",
119-
"eslint-plugin-unicorn": "60.0.0",
119+
"eslint-plugin-unicorn": "62.0.0",
120120
"jiti": "2.6.1",
121121
"npm-run-all2": "8.0.4",
122122
"prettier": "3.7.4",

pnpm-lock.yaml

Lines changed: 145 additions & 119 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/apidocs/processing/class.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function processModuleClasses(project: Project): RawApiDocsPage[] {
102102
(module: string): boolean =>
103103
module.endsWith('Module') && !module.startsWith('Simple')
104104
)
105-
).sort((a, b) => a.getNameOrThrow().localeCompare(b.getNameOrThrow()))
105+
).toSorted((a, b) => a.getNameOrThrow().localeCompare(b.getNameOrThrow()))
106106
);
107107
}
108108

scripts/apidocs/processing/method.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function getAllMethods(clazz: ClassDeclaration): MethodDeclaration[] {
7373
}
7474
}
7575

76-
return Object.values(methods).sort((a, b) =>
76+
return Object.values(methods).toSorted((a, b) =>
7777
a.getName().localeCompare(b.getName())
7878
);
7979
}
@@ -170,7 +170,7 @@ function processMethodLikes<T extends MethodLikeDeclaration>(
170170
});
171171
}
172172
})
173-
.sort((a, b) => a.name.localeCompare(b.name));
173+
.toSorted((a, b) => a.name.localeCompare(b.name));
174174
}
175175

176176
export function processMethodLike(

scripts/apidocs/processing/parameter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function processComplexParameter(
188188
});
189189
}
190190
})
191-
.sort((a, b) => a.name.localeCompare(b.name));
191+
.toSorted((a, b) => a.name.localeCompare(b.name));
192192
}
193193

194194
return [];

scripts/generate-locales.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) {
429429
.slice(0, 1000)
430430
// sort entries alphabetically
431431
// We cannot sort the entries locale aware as the sort order is not stable within node versions #2905
432-
.sort() as T
432+
.toSorted() as T
433433
);
434434
}
435435

src/internal/date.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { FakerError } from '../errors/faker-error';
66
* @param date The date to convert.
77
* @param name The reference name used for error messages. Defaults to `'refDate'`.
88
*
9-
* @throws If the given date is invalid.
9+
* @throws {FakerError} If the given date is invalid.
1010
*/
1111
export function toDate(
1212
date: string | Date | number,

0 commit comments

Comments
 (0)