-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4f7a04
commit be7e750
Showing
4 changed files
with
77 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,57 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
ignores: ['dist', 'docs'], | ||
jsx: false, | ||
typescript: true, | ||
formatters: { | ||
markdown: true, | ||
}, | ||
rules: { | ||
'curly': ['error', 'multi-line'], | ||
'import/extensions': ['error', 'ignorePackages'], | ||
'import/order': 0, | ||
'jsdoc/check-alignment': 'error', | ||
'jsdoc/check-line-alignment': 'error', | ||
'no-undef': 'error', | ||
'perfectionist/sort-exports': 'error', | ||
'perfectionist/sort-imports': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin-type', | ||
'external-type', | ||
'internal-type', | ||
['parent-type', 'sibling-type', 'index-type'], | ||
'builtin', | ||
'external', | ||
'internal', | ||
['parent', 'sibling', 'index'], | ||
'object', | ||
'unknown', | ||
], | ||
order: 'asc', | ||
type: 'natural', | ||
}, | ||
], | ||
'perfectionist/sort-named-exports': 'error', | ||
'perfectionist/sort-named-imports': 'error', | ||
'sort-imports': 0, | ||
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], | ||
'style/quote-props': ['error', 'consistent-as-needed'], | ||
'test/no-only-tests': 'error', | ||
'unicorn/no-useless-spread': 'error', | ||
'unused-imports/no-unused-vars': ['error', { caughtErrors: 'none' }], | ||
}, | ||
export default antfu({ | ||
ignores: ['dist', 'docs'], | ||
jsx: false, | ||
typescript: true, | ||
formatters: { | ||
markdown: true, | ||
}, | ||
) | ||
rules: { | ||
'curly': ['error', 'multi-line'], | ||
'import/extensions': ['error', 'ignorePackages'], | ||
'import/order': 0, | ||
'jsdoc/check-alignment': 'error', | ||
'jsdoc/check-line-alignment': 'error', | ||
'no-undef': 'off', // Turn off no-undef for TypeScript, handled by TS itself | ||
'perfectionist/sort-exports': 'error', | ||
'perfectionist/sort-imports': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin-type', | ||
'external-type', | ||
'internal-type', | ||
['parent-type', 'sibling-type', 'index-type'], | ||
'builtin', | ||
'external', | ||
'internal', | ||
['parent', 'sibling', 'index'], | ||
'object', | ||
'unknown', | ||
], | ||
order: 'asc', | ||
type: 'natural', | ||
}, | ||
], | ||
'perfectionist/sort-named-exports': 'error', | ||
'perfectionist/sort-named-imports': 'error', | ||
'sort-imports': 0, | ||
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], | ||
'style/quote-props': ['error', 'consistent-as-needed'], | ||
'test/no-only-tests': 'error', | ||
'unicorn/no-useless-spread': 'error', | ||
'unused-imports/no-unused-vars': ['error', { caughtErrors: 'none' }], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], // Apply to TypeScript files only | ||
env: { | ||
node: true, // Enables Node.js global variables and type definitions | ||
}, | ||
parserOptions: { | ||
project: './tsconfig.json', // Directs ESLint to use your TypeScript config | ||
}, | ||
}, | ||
], | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters