Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored and Shinigami92 committed Aug 30, 2024
1 parent 97c84fd commit ca7657c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
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 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
4 changes: 3 additions & 1 deletion 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,6 +176,8 @@ class TestGenerator<
* @param method The name of the method.
* @param repetitions The number of repetitions to run.
*/
// TODO @ST-DDT 2024-08-19: https://github.com/typescript-eslint/typescript-eslint/issues/9828
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
itRepeated<TMethodName extends NoArgsMethodOf<TModule>>(
method: TMethodName,
repetitions: number
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

0 comments on commit ca7657c

Please sign in to comment.