From 613ea63b3124610eb52769958d3f08205e254738 Mon Sep 17 00:00:00 2001 From: Katsuhiro Ueno Date: Fri, 2 Aug 2024 07:09:04 +0900 Subject: [PATCH] update eslint rules along with typescript-eslint v8 --- eslint.config.js | 1 - packages/page/src/__test__/debug-print.ts | 7 ++----- packages/page/src/page.ts | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 006b24e..27a3ca7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -112,7 +112,6 @@ export default [ files: ['**/*.ts'], rules: { '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/ban-types': 'error', '@typescript-eslint/consistent-indexed-object-style': ['error', 'record'], '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], '@typescript-eslint/consistent-type-exports': 'error', diff --git a/packages/page/src/__test__/debug-print.ts b/packages/page/src/__test__/debug-print.ts index c87985f..739b424 100644 --- a/packages/page/src/__test__/debug-print.ts +++ b/packages/page/src/__test__/debug-print.ts @@ -22,11 +22,8 @@ interface NFA { vertexes: NFAVertex[] } -export const toNFA = async < - Key extends 'moduleNameMap' | 'stemMap' | 'fileNameMap', - Base ->( - indexKey: Key, +export const toNFA = async ( + indexKey: 'moduleNameMap' | 'stemMap' | 'fileNameMap', node: PublicTree | AssetTree ): Promise => { const vertexes = new Map | AssetTree, string>() diff --git a/packages/page/src/page.ts b/packages/page/src/page.ts index 759fa84..39cbff8 100644 --- a/packages/page/src/page.ts +++ b/packages/page/src/page.ts @@ -188,6 +188,7 @@ class PageFactory< } } +// eslint-disable-next-line @typescript-eslint/no-empty-object-type interface PageRec extends Page {} export class Page<