55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
import antfu from '@antfu/eslint-config'
|
|
import withNuxt from './.nuxt/eslint.config.mjs'
|
|
|
|
export default withNuxt(
|
|
antfu(
|
|
{
|
|
unocss: true,
|
|
formatters: true,
|
|
// Relaxed stylistic options
|
|
stylistic: {
|
|
semi: false,
|
|
quotes: 'single',
|
|
// Less strict formatting
|
|
jsx: false,
|
|
trailingComma: 'all',
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
// Basic rules
|
|
quotes: ['error', 'single', { avoidEscape: true }],
|
|
'style/quote-props': 'off',
|
|
'style/no-trailing-spaces': ['error', { ignoreComments: true }],
|
|
|
|
'no-console': 'off',
|
|
|
|
// Relax strict formatting rules
|
|
'style/brace-style': 'off', // Allow inline if
|
|
curly: ['error', 'multi-line'], // Only require braces for multi-line
|
|
'style/arrow-parens': 'off',
|
|
|
|
// UnoCSS - make it warning instead of error, or disable completely
|
|
'unocss/order': 'off', // atau 'off' untuk disable
|
|
|
|
// Vue specific - relax template formatting
|
|
'vue/html-indent': 'off',
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
'vue/multiline-html-element-content-newline': 'off',
|
|
'vue/html-self-closing': 'off',
|
|
|
|
// Allow more flexible code style
|
|
'style/max-statements-per-line': ['error', { max: 3 }],
|
|
'antfu/if-newline': 'off', // Disable newline after if requirement
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.md'],
|
|
rules: {
|
|
'style/no-trailing-spaces': 'off',
|
|
},
|
|
},
|
|
),
|
|
)
|