Skip to content

Commit

Permalink
feat: add defaults rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Jul 30, 2024
1 parent 72f7668 commit 7bf89c1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-grapes-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/eslint-config-hyperse": patch
---

Add `defaults` rules
2 changes: 2 additions & 0 deletions src/main/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
typescript,
vitest,
} from '../rules/index.js';
import { defaults } from './defaults.js';

export const base = defineFlatConfig([
...typescript,
Expand All @@ -19,4 +20,5 @@ export const base = defineFlatConfig([
...sonar,
...jsonc,
...mdx,
...defaults,
]);
17 changes: 17 additions & 0 deletions src/main/defaults.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineFlatConfig } from 'eslint-define-config';

export const defaults = defineFlatConfig([
{
rules: {
'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'all',
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
]);

0 comments on commit 7bf89c1

Please sign in to comment.