mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
40 lines
906 B
JavaScript
40 lines
906 B
JavaScript
import antfu from '@antfu/eslint-config';
|
|
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
|
|
export default antfu({
|
|
react: true,
|
|
typescript: true,
|
|
formatters: {
|
|
css: true,
|
|
html: true,
|
|
markdown: 'prettier',
|
|
svg: 'prettier',
|
|
},
|
|
stylistic: {
|
|
semi: true,
|
|
spacedComment: true,
|
|
indent: 2,
|
|
quotes: 'single',
|
|
},
|
|
// Many are ignored by default.
|
|
// https://github.com/antfu/eslint-config/blob/main/src/globs.ts#L56
|
|
ignores: ['**/.astro/'],
|
|
plugins: {
|
|
'jsx-a11y': jsxA11y,
|
|
},
|
|
rules: {
|
|
// Allow single line bracing.
|
|
'antfu/if-newline': 'off',
|
|
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
|
// Only quote props when necessary.
|
|
'style/quote-props': ['error', 'as-needed'],
|
|
// JSX A11Y plugin rules
|
|
...jsxA11y.configs.recommended.rules,
|
|
},
|
|
}, {
|
|
files: ['**/*.md'],
|
|
rules: {
|
|
'style/max-len': 'off',
|
|
},
|
|
});
|