From a668d080009f5f9fa2ae0d0fb90eb8ae80c31414 Mon Sep 17 00:00:00 2001 From: Nikhil Verma Date: Fri, 8 Mar 2024 14:17:14 +0530 Subject: [PATCH] fix(web): configured ESLint "import/order" --- web/.eslintrc.json | 65 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/web/.eslintrc.json b/web/.eslintrc.json index 4a6e560ab..a0a6203f8 100644 --- a/web/.eslintrc.json +++ b/web/.eslintrc.json @@ -97,6 +97,69 @@ "tsx": "never" } ], - "import/no-unresolved": "off" + "import/no-unresolved": "off", + "import/order": [ + "warn", + { + "groups": [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index" + ], + "pathGroups": [ + { + "pattern": "{react,styled-components}", + "group": "external", + "position": "before" + }, + { + "pattern": "@kleros/**", + "group": "external", + "position": "after" + }, + { + "pattern": "{svgs/**,assets/**}", + "group": "internal", + "position": "after" + }, + { + "pattern": "{hooks/**,utils/**,consts/**,types/**,context/**,connectors/**,}", + "group": "internal", + "position": "after" + }, + { + "pattern": "{queries/**,}", + "group": "internal", + "position": "after" + }, + { + "pattern": "{src/**,}", + "group": "internal", + "position": "after" + }, + { + "pattern": "{styles/**,}", + "group": "internal", + "position": "after" + }, + { + "pattern": "{layout/**,pages/**,components/**,}", + "group": "internal", + "position": "after" + } + ], + "pathGroupsExcludedImportTypes": [ + "builtin" + ], + "newlines-between": "always", + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ] } }