Skip to content

Commit 9812fb0

Browse files
committed
Drop support for TypeScript < 4.8
1 parent 68aaab9 commit 9812fb0

File tree

6 files changed

+468
-522
lines changed

6 files changed

+468
-522
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Make sure that you are using a version of Node.js supported by your version of ESLint.
88
See prerequisites for [ESLint 8](https://eslint.org/docs/v8.x/use/getting-started#prerequisites) and [ESLint 9](https://eslint.org/docs/v9.x/use/getting-started#prerequisites).
9-
For TypeScript support, you need TypeScript 4.6 or later.
9+
For TypeScript support, you need TypeScript 4.8 or later.
1010

1111
To install gulp-eslint-new, [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm):
1212

eslint.config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ const globals = require('globals');
77
module.exports =
88
createConfig
99
(
10-
{
11-
ignores: ['**/.*', 'coverage', 'example/demo'],
12-
},
10+
{ ignores: ['**/.*', 'coverage', 'example/demo'] },
1311
{
1412
files: ['**/*.js'],
1513
jsVersion: 2020,
@@ -21,8 +19,7 @@ createConfig
2119
},
2220
{
2321
files: ['**/*.ts'],
24-
tsVersion: '4.6.0',
25-
languageOptions: { parserOptions: { project: 'tsconfig.json' } },
22+
tsVersion: '4.8.0',
2623
plugins: { 'tsdoc': eslintPluginTsdoc },
2724
rules: { 'tsdoc/syntax': 'error' },
2825
},

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ function tsTest(tsVersion, tsPkgName)
9494
return task;
9595
}
9696

97-
task('ts-test', parallel(tsTest('4.6', 'typescript_4.6'), tsTest('5', 'typescript_5')));
97+
task('ts-test', parallel(tsTest('4.8', 'typescript_4.8'), tsTest('5', 'typescript_5')));
9898

9999
task('default', series('clean', parallel('lint', 'ts-test'), 'test'));

lib/eslint.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ type ESLintrcOptions = ESLint.LegacyOptions;
44

55
type FlatESLintOptions = ESLint.Options;
66

7+
// In @types/eslint `ESLint.LintResultData` lacks the `maxWarningsExceeded` property.
78
type FormatterContext = ESLint.LintResultData & ResultsMeta;
89

910
type FormatterFunction =
10-
(results: ESLint.LintResult[], context?: FormatterContext) => string | Promise<string>;
11+
(results: ESLint.LintResult[], context: FormatterContext) => string | Promise<string>;
1112

1213
type LintMessage = Linter.LintMessage;
1314

1415
type LintResult = ESLint.LintResult;
1516

1617
interface LoadedFormatter
17-
{ format(results: ESLint.LintResult[], resultsMeta: ResultsMeta): string | Promise<string>; }
18+
{ format(results: ESLint.LintResult[], resultsMeta?: ResultsMeta): string | Promise<string>; }
1819

1920
interface ResultsMeta
2021
{

0 commit comments

Comments
 (0)