chore(web stack): add new ESLint Vue rules #6 (#7738)

Enforces import order via the `import/order` ESLint rule
This commit is contained in:
Thierry Goettelmann
2024-06-20 09:18:15 +02:00
committed by GitHub
parent 7ddd579818
commit dd8ad3f274
54 changed files with 116 additions and 98 deletions

View File

@@ -79,6 +79,26 @@ module.exports = {
XO_LITE_GIT_HEAD: true,
},
rules: {
'import/order': [
'error',
{
groups: ['builtin', 'object', 'internal', ['type', 'external']],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
pathGroups: [
{
pattern: '@/**',
group: 'internal',
},
{
pattern: '@core/**',
group: 'internal',
},
],
},
],
'no-void': ['error', { allowAsStatement: true }],
'n/no-missing-import': 'off', // using 'import' plugin instead, to support TS aliases
'no-redeclare': 'off', // automatically checked by the TypeScript compiler