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

[Fix] @typescript-eslint v6, v7, v8 use typeArguments with fallback to typeParameters #3629

Merged
Prev Previous commit
Next Next commit
[Tests] use require.resolve to get absolute paths to parsers
  • Loading branch information
HenryBrown0 authored and ljharb committed Jan 16, 2024
commit d5e3769fac7c8735f08b9db9f6363d6e3016d04a
11 changes: 4 additions & 7 deletions tests/helpers/parsers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const path = require('path');
const semver = require('semver');
const entries = require('object.entries');
const version = require('eslint/package.json').version;
Expand Down Expand Up @@ -31,13 +30,11 @@ function minEcmaVersion(features, parserOptions) {
return Number.isFinite(result) ? result : undefined;
}

const NODE_MODULES = '../../node_modules';

const parsers = {
BABEL_ESLINT: path.join(__dirname, NODE_MODULES, 'babel-eslint'),
'@BABEL_ESLINT': path.join(__dirname, NODE_MODULES, '@babel/eslint-parser'),
TYPESCRIPT_ESLINT: path.join(__dirname, NODE_MODULES, 'typescript-eslint-parser'),
'@TYPESCRIPT_ESLINT': path.join(__dirname, NODE_MODULES, '@typescript-eslint/parser'),
BABEL_ESLINT: require.resolve('babel-eslint'),
'@BABEL_ESLINT': require.resolve('@babel/eslint-parser'),
TYPESCRIPT_ESLINT: require.resolve('typescript-eslint-parser'),
'@TYPESCRIPT_ESLINT': require.resolve('@typescript-eslint/parser'),
disableNewTS,
skipDueToMultiErrorSorting: semver.satisfies(process.versions.node, '^8 || ^9'),
babelParserOptions: function parserOptions(test, features) {
Expand Down