-
hello, i have multiple config in my eslint.config so this is my config import antfu from '@antfu/eslint-config';
import oxlint from 'eslint-plugin-oxlint';
export default antfu({
files: ['src/**/*'],
ignores: ['dist', 'node_modules', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', '.qodo', '.vscode', '*/*.bru', '.DS_Store'],
formatters: true,
stylistic: {
indent: 4,
semi: true,
quotes: 'single',
overrides: {
'style/newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }],
},
},
isInEditor: true,
rules: {
'unused-imports/no-unused-imports': ['warn'],
'style/no-tabs': ['error', { allowIndentationTabs: true }],
'perfectionist/sort-imports': ['error', { type: 'alphabetical' }],
'no-console': ['error', { allow: ['info', 'error'] }],
'antfu/top-level-function': ['off'],
},
plugins: [
...oxlint.configs['flat/all'],
],
}, {
files: ['cli/**/*'],
rules: {
'no-console': 'off',
'node/prefer-global/process': 'off',
},
}); but then i got an error where it supposed to skip for file inside i also use lint-staged and husky, but i dont think this is the problem because it still occured when i run pnpm run lint. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
found the way to do it, for those who might be also stumble upon the same thing, just separate the config for all your settings import antfu from '@antfu/eslint-config';
import oxlint from 'eslint-plugin-oxlint';
export default antfu(
{
ignores: ['dist', 'node_modules', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', '.qodo', '.vscode', '*/*.bru', '.DS_Store'],
formatters: true,
stylistic: {
indent: 4,
semi: true,
quotes: 'single',
overrides: {
'style/newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }],
},
},
isInEditor: true,
plugins: [
...oxlint.configs['flat/all'],
],
},
{
files: ['src/**/*'],
rules: {
'unused-imports/no-unused-imports': ['warn'],
'style/no-tabs': ['error', { allowIndentationTabs: true }],
'perfectionist/sort-imports': ['error', { type: 'alphabetical' }],
'no-console': ['error', { allow: ['info', 'error'] }],
'antfu/top-level-function': ['off'],
},
},
{
files: ['cli/**/*'],
rules: {
'no-console': 'off',
'node/prefer-global/process': 'off',
},
},
); |
Beta Was this translation helpful? Give feedback.
found the way to do it, for those who might be also stumble upon the same thing, just separate the config for all your settings