From 8331d51490fea6c36a138a450072a8778d42da03 Mon Sep 17 00:00:00 2001 From: Teppei Sato Date: Thu, 18 Apr 2024 23:31:15 +0900 Subject: [PATCH] fix: use eslint-comments plugin flat config (#1254) --- src/configs/base.ts | 7 ++----- .../@eslint-community/eslint-plugin-eslint-comments.d.ts | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/configs/base.ts b/src/configs/base.ts index 6ad4a65f..70b0ff91 100644 --- a/src/configs/base.ts +++ b/src/configs/base.ts @@ -1,10 +1,10 @@ -import comments from "@eslint-community/eslint-plugin-eslint-comments"; +import comments from "@eslint-community/eslint-plugin-eslint-comments/configs"; import js from "@eslint/js"; import jsdoc from "eslint-plugin-jsdoc"; import unicorn from "eslint-plugin-unicorn"; import { merge } from "../merge.js"; -export const base = merge(js.configs.recommended, { +export const base = merge(js.configs.recommended, comments.recommended, { languageOptions: { ecmaVersion: 2020, sourceType: "script", @@ -14,15 +14,12 @@ export const base = merge(js.configs.recommended, { // They may be referenced by other config files. unicorn, jsdoc, - "@eslint-community/eslint-comments": comments, }, linterOptions: { // replace "eslint-comments/no-unused-disable" reportUnusedDisableDirectives: "error", }, rules: { - ...comments.configs.recommended.rules, - // ## Possible Problems "array-callback-return": 2, "no-async-promise-executor": 2, diff --git a/src/types/@eslint-community/eslint-plugin-eslint-comments.d.ts b/src/types/@eslint-community/eslint-plugin-eslint-comments.d.ts index 1940b698..bdfd20ee 100644 --- a/src/types/@eslint-community/eslint-plugin-eslint-comments.d.ts +++ b/src/types/@eslint-community/eslint-plugin-eslint-comments.d.ts @@ -1 +1 @@ -declare module "@eslint-community/eslint-plugin-eslint-comments"; +declare module "@eslint-community/eslint-plugin-eslint-comments/configs";