From 9360afc2d2984d4311b3afc9c44bc4220c0f2f12 Mon Sep 17 00:00:00 2001 From: 0t4u <61939142+0t4u@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:12:59 +0000 Subject: [PATCH] feat: option to add additional configs --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e977cc7..74ae6b3 100644 --- a/index.js +++ b/index.js @@ -11,8 +11,9 @@ import tseslint from 'typescript-eslint'; /** * @param {string} rootdir Project root directory that contains tsconfig.json + * @param {import("typescript-eslint").ConfigWithExtends[]} additionalConfig Additional eslint configurations */ -export default function config(rootdir) { +export default function config(rootdir, ...additionalConfig) { return tseslint.config( { ignores: [ @@ -121,6 +122,7 @@ export default function config(rootdir) { 'require-await': [ 'warn' ], 'no-unused-vars': [ 'warn' ] } - } + }, + ...additionalConfig ); }