From b80939c78d7c48b6b9228d206d2ddf853dcce971 Mon Sep 17 00:00:00 2001 From: louiscklaw Date: Wed, 18 Jun 2025 10:54:30 +0800 Subject: [PATCH] update eslint to disable export sorting, --- 03_source/cms_backend/eslint.config.mjs | 27 +++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/03_source/cms_backend/eslint.config.mjs b/03_source/cms_backend/eslint.config.mjs index fe7c17e..55617c3 100644 --- a/03_source/cms_backend/eslint.config.mjs +++ b/03_source/cms_backend/eslint.config.mjs @@ -1,3 +1,5 @@ +// src/cms_backend/eslint.config.mjs +// import globals from 'globals'; import eslintJs from '@eslint/js'; import eslintTs from 'typescript-eslint'; @@ -69,10 +71,7 @@ const importRules = () => ({ */ const unusedImportsRules = () => ({ 'unused-imports/no-unused-imports': 1, - 'unused-imports/no-unused-vars': [ - 0, - { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }, - ], + 'unused-imports/no-unused-vars': [0, { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }], }); /** @@ -93,15 +92,17 @@ const sortImportsRules = () => { return { 'perfectionist/sort-named-imports': [1, { type: 'line-length', order: 'asc' }], - 'perfectionist/sort-named-exports': [1, { type: 'line-length', order: 'asc' }], - 'perfectionist/sort-exports': [ - 1, - { - order: 'asc', - type: 'line-length', - groupKind: 'values-first', - }, - ], + + // disable sorting of export, i manage the export ordering + // 'perfectionist/sort-named-exports': [1, { type: 'line-length', order: 'asc' }], + // 'perfectionist/sort-exports': [ + // 1, + // { + // order: 'asc', + // type: 'line-length', + // groupKind: 'values-first', + // }, + // ], 'perfectionist/sort-imports': [ 2, {