diff options
Diffstat (limited to 'frontend/.eslintrc.json')
-rw-r--r-- | frontend/.eslintrc.json | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index 65e129bc9..97b3d3de5 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -2,6 +2,13 @@ "rules": { "no-console": "error", "camelcase": "warn", + "no-restricted-imports": [ + "error", + { + "patterns": ["..*"] + } + ], + "simple-import-sort/imports": "error", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-empty-function": "warn", "@typescript-eslint/no-empty-interface": "off", @@ -13,7 +20,7 @@ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], - "plugins": ["testing-library"], + "plugins": ["testing-library", "simple-import-sort"], "overrides": [ { "files": [ @@ -21,6 +28,43 @@ "**/?(*.)+(spec|test).[jt]s?(x)" ], "extends": ["plugin:testing-library/react"] + }, + { + "files": ["*.ts", "*.tsx"], + "rules": { + "simple-import-sort/imports": [ + "error", + { + "groups": [ + [ + // React Packages + "^react", + // Mantine Packages + "^@mantine/", + // Vendor Packages + "^(\\w|@\\w)", + // Side Effect Imports + "^\\u0000", + // Internal Packages + "^@/\\w", + // Parent Imports + "^\\.\\.(?!/?$)", + "^\\.\\./?$", + // Relative Imports + "^\\./(?=.*/)(?!/?$)", + "^\\.(?!/?$)", + "^\\./?$", + // Style Imports + "^.+\\.?(css)$" + ] + ] + } + ] + } } - ] + ], + "parserOptions": { + "sourceType": "module", + "ecmaVersion": "latest" + } } |