Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency typescript-eslint to v8 #3064

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default tseslint.config(
'docs/.vitepress/components/shims.d.ts',
'docs/.vitepress/shared/utils/slugify.ts',
'docs/.vitepress/theme/index.ts',
'eslint.config.js',
],
},
{
Expand Down Expand Up @@ -57,7 +58,6 @@ export default tseslint.config(
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
warnOnUnsupportedTypeScriptVersion: false,
Expand Down Expand Up @@ -148,21 +148,13 @@ export default tseslint.config(
// @ts-expect-error: Just eat it!
fixupPluginRules(eslintPluginDeprecation),
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
warnOnUnsupportedTypeScriptVersion: false,
},
},
rules: {
'deprecation/deprecation': 'error',
},
},
//#endregion

//#region unicorn
// @ts-expect-error: Ignore for now
eslintPluginUnicorn.configs['flat/recommended'],
{
rules: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"tsup": "8.2.4",
"tsx": "4.17.0",
"typescript": "5.5.4",
"typescript-eslint": "7.18.0",
"typescript-eslint": "8.3.0",
"validator": "13.12.0",
"vite": "5.4.1",
"vitepress": "1.3.3",
Expand Down
141 changes: 102 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/locale-imports.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { keys } from '../src/internal/keys';

describe.each(keys(allLocales))('locale imports', (locale) => {
it(`should be possible to directly require('@faker-js/faker/locale/${locale}')`, () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module
// eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module
const { faker } = require(`../dist/locale/${locale}.cjs`) as {
faker: Faker;
};
Expand Down
6 changes: 3 additions & 3 deletions test/simple-faker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ describe('simpleFaker', () => {
.filter((key) => typeof console[key] === 'function')
.map((methodName) => vi.spyOn(console, methodName));

// eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module -- Using import() requires types being build but the CI / TS-Check runs without them.
require('..').simpleFaker;
// eslint-disable-next-line @typescript-eslint/no-require-imports, unicorn/prefer-module -- Using import() requires types being build but the CI / TS-Check runs without them.
expect(require('..').simpleFaker).toBeDefined();

new SimpleFaker();
expect(new SimpleFaker()).toBeDefined();

for (const spy of spies) {
expect(spy).not.toHaveBeenCalled();
Expand Down
9 changes: 3 additions & 6 deletions test/support/seeded-runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class TestGenerator<
*
* @param method The name of the method.
*/
it<TMethodName extends NoArgsMethodOf<TModule>>(method: TMethodName): this {
it(method: NoArgsMethodOf<TModule>): this {
return this.itRepeated(method, 1);
}

Expand All @@ -176,15 +176,12 @@ class TestGenerator<
* @param method The name of the method.
* @param repetitions The number of repetitions to run.
*/
itRepeated<TMethodName extends NoArgsMethodOf<TModule>>(
method: TMethodName,
repetitions: number
): this {
itRepeated(method: NoArgsMethodOf<TModule>, repetitions: number): this {
this.expectNotTested(method);
vi_it(method, () =>
this.callAndVerify(
method,
[] as unknown as Parameters<TModule[TMethodName]>,
[] as unknown as Parameters<TModule[NoArgsMethodOf<TModule>]>,
repetitions
)
);
Expand Down
1 change: 1 addition & 0 deletions test/vitest-extensions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-object-type */
import { expect } from 'vitest';

expect.extend({
Expand Down