Update
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env tsx
|
||||
#!/usr/bin/env bun
|
||||
import glob from 'fast-glob';
|
||||
import fs from 'fs';
|
||||
import { builtinModules } from 'module';
|
||||
|
22
src/index.ts
22
src/index.ts
@ -26,7 +26,6 @@ export function extendConfig({
|
||||
...rest
|
||||
}: ESLintConfig = {}): ESLintConfig {
|
||||
const hasReact = plugins?.includes('react');
|
||||
const hasUnicorn = plugins?.includes('unicorn');
|
||||
const hasReactRefresh = plugins?.includes('react-refresh');
|
||||
const hasNext = ensureArray(_extends).some(name => name.includes(':@next/next'));
|
||||
|
||||
@ -52,7 +51,6 @@ export function extendConfig({
|
||||
'plugin:jsx-a11y/recommended',
|
||||
]
|
||||
: []),
|
||||
...(hasUnicorn ? ['plugin:unicorn/recommended'] : []),
|
||||
...(_extends ?? []),
|
||||
]),
|
||||
settings: {
|
||||
@ -168,26 +166,6 @@ export function extendConfig({
|
||||
],
|
||||
}
|
||||
: {}),
|
||||
...(hasUnicorn
|
||||
? {
|
||||
'unicorn/no-abusive-eslint-disable': off,
|
||||
'unicorn/no-array-callback-reference': off,
|
||||
'unicorn/no-array-for-each': warn,
|
||||
'unicorn/no-array-reduce': off,
|
||||
'unicorn/no-await-expression-member': off,
|
||||
'unicorn/no-empty-file': off,
|
||||
'unicorn/no-negated-condition': warn,
|
||||
'unicorn/no-new-array': off,
|
||||
'unicorn/no-null': off,
|
||||
'unicorn/no-process-exit': off,
|
||||
'unicorn/no-this-assignment': off,
|
||||
'unicorn/prefer-module': off,
|
||||
'unicorn/prefer-string-replace-all': off,
|
||||
'unicorn/prefer-top-level-await': off,
|
||||
'unicorn/throw-new-error': off,
|
||||
'unicorn/no-unnecessary-await': off,
|
||||
}
|
||||
: {}),
|
||||
...(hasReactRefresh
|
||||
? {
|
||||
'react-refresh/only-export-components': [warn, { allowConstantExport: true }],
|
||||
|
Reference in New Issue
Block a user