From 771b057bfa7be40910800a3bc2e895b98fbd0e21 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 8 Mar 2023 13:40:41 +0800 Subject: [PATCH] feat(nocodb): enable import/order and introduce order group --- packages/nocodb/.eslintrc.json | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/nocodb/.eslintrc.json b/packages/nocodb/.eslintrc.json index 144c3a0f87..6570091b22 100644 --- a/packages/nocodb/.eslintrc.json +++ b/packages/nocodb/.eslintrc.json @@ -7,18 +7,8 @@ "env": { "es6": true }, - "ignorePatterns": [ - "node_modules", - "build", - "coverage", - "dist", - "nc" - ], - "plugins": [ - "import", - "eslint-comments", - "functional" - ], + "ignorePatterns": ["node_modules", "build", "coverage", "dist", "nc"], + "plugins": ["import", "eslint-comments", "functional"], "extends": [ "eslint:recommended", "plugin:eslint-comments/recommended", @@ -47,6 +37,21 @@ "ignoreCase": true } ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index", + "object", + "type" + ] + } + ], "@typescript-eslint/no-this-alias": "off", // todo: enable @@ -57,7 +62,6 @@ "no-useless-catch": "off", "no-empty": "off", "@typescript-eslint/no-empty-function": "off", - "import/order": "off", "@typescript-eslint/consistent-type-imports": "warn" } }