This commit is contained in:
louiscklaw
2025-05-28 21:06:12 +08:00
parent 4007227418
commit db805f23b6
61 changed files with 1279 additions and 494 deletions

View File

@@ -1,11 +1,11 @@
import globals from 'globals';
import eslintJs from '@eslint/js';
import eslintTs from 'typescript-eslint';
import reactPlugin from 'eslint-plugin-react';
import importPlugin from 'eslint-plugin-import';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import perfectionistPlugin from 'eslint-plugin-perfectionist';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import unusedImportsPlugin from 'eslint-plugin-unused-imports';
import globals from 'globals';
import eslintTs from 'typescript-eslint';
// ----------------------------------------------------------------------
@@ -92,8 +92,6 @@ 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,
{
@@ -102,6 +100,8 @@ const sortImportsRules = () => {
groupKind: 'values-first',
},
],
'perfectionist/sort-named-imports': [1, { type: 'line-length', order: 'asc' }],
'perfectionist/sort-named-exports': [1, { type: 'line-length', order: 'asc' }],
'perfectionist/sort-imports': [
2,
{
@@ -172,7 +172,8 @@ export const customConfig = {
...commonRules(),
...importRules(),
...unusedImportsRules(),
...sortImportsRules(),
// NOTE: disabled sortImportRules
// ...sortImportsRules(),
},
};