Skip to content

Commit

Permalink
fix: restore no-unused-vars to pre-neostandard
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed May 30, 2024
1 parent f32a047 commit 3c6e165
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions base-configs/modified-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @satisfies {import('@typescript-eslint/utils/ts-eslint').FlatConfig.ConfigArray} */
export const modifiedNeostandardRules = [
{
files: ['**/*.ts'],
rules: {
'@typescript-eslint/no-unused-vars': ['error', {
'vars': 'all',
'args': 'all',
'argsIgnorePattern': '^_',
'ignoreRestSiblings': true,
}],
},
},
{
rules: {
'no-unused-vars': ['error', {
'vars': 'all',
'args': 'all',
'argsIgnorePattern': '^_',
'ignoreRestSiblings': true,
}],
},
},
];
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { additionalRules } from './base-configs/additional-rules.js';
import { esmRules } from './base-configs/esm.js';
import { jsdocRules } from './base-configs/jsdoc.js';
import { mochaRules } from './base-configs/mocha.js';
import { modifiedNeostandardRules } from './base-configs/modified-rules.js';

/**
* @param {{ cjs?: boolean, noMocha?: boolean } & import('neostandard').NeostandardOptions} [options]
Expand All @@ -26,6 +27,7 @@ export function voxpelli (options) {
ts: true,
...neostandardOptions,
}),
...modifiedNeostandardRules,
...additionalRules,
...jsdocRules,
...cjs ? [] : esmRules,
Expand Down

0 comments on commit 3c6e165

Please sign in to comment.