Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
7 changes: 3 additions & 4 deletions test-projects/configs/flat-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import ts from 'typescript-eslint';

import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const manifestPath = require.resolve('@typescript-eslint/parser/package.json');
const manifestPath = require.resolve('typescript-eslint/package.json');
const manifest = require(manifestPath);
const isV8 = manifest.version[0] > 8;
const isV8 = parseInt(manifest.version[0]) >= 8;

const parserOptions = {
esm: {
Expand All @@ -34,8 +34,7 @@ const parserOptions = {
ecmaVersion: 'latest',
},
ts: {
projectService: true,
...(isV8 ? {} : { project: true }),
...(isV8 ? { project: true } : { projectService: true, project: true }),
tsconfigRootDir: import.meta.dirname,
},
},
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions test-projects/gjs-types/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const manifestPath = require.resolve('@typescript-eslint/parser/package.json');
const manifest = require(manifestPath);
const isV8 = parseInt(manifest.version[0]) >= 8;

if (isV8) {
delete parserOptions.project;
if (isV8 && parserOptions.projectService) {
delete parserOptions.projectService;
}

module.exports = {
Expand Down
Loading