Skip to content

Commit

Permalink
feat: option to add additional configs
Browse files Browse the repository at this point in the history
  • Loading branch information
0t4u committed Oct 29, 2024
1 parent 92d0640 commit 9360afc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -121,6 +122,7 @@ export default function config(rootdir) {
'require-await': [ 'warn' ],
'no-unused-vars': [ 'warn' ]
}
}
},
...additionalConfig
);
}

0 comments on commit 9360afc

Please sign in to comment.