Skip to content

Commit

Permalink
fix: update ESLint rule tester configuration and adjust TypeScript mo…
Browse files Browse the repository at this point in the history
…dule settings
  • Loading branch information
getlarge committed Jan 31, 2025
1 parent 16cfc58 commit 5d38ca1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions packages/eslint-plugin/src/lib/return-class-instance.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { TSESLint } from '@typescript-eslint/utils';
import { RuleTester } from '@typescript-eslint/rule-tester';

import { rule, RULE_NAME } from './return-class-instance';

const ruleTester = new TSESLint.RuleTester({
parser: require.resolve('@typescript-eslint/parser'),
const ruleTester = new RuleTester({
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['*.ts*'],
},
},
},
});

const basicTestCase = `
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"lib": ["es2021"],
"module": "nodenext",
"moduleResolution": "nodenext",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
Expand Down

0 comments on commit 5d38ca1

Please sign in to comment.