From 0100f04de1960cfb4719107a2a5390e237b4a5b1 Mon Sep 17 00:00:00 2001 From: Chris Torres Date: Thu, 5 Dec 2024 21:00:54 -0800 Subject: [PATCH] fix eslint resolver --- .eslintrc.js | 9 +-------- package-lock.json | 15 +++++++++++++++ package.json | 2 ++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index c0eefff..e67c592 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ // https://docs.expo.dev/guides/using-eslint/ module.exports = { extends: ['expo', 'prettier', 'eslint:recommended'], - plugins: ['prettier', '@typescript-eslint'], + plugins: ['prettier', '@typescript-eslint', 'import'], parser: '@typescript-eslint/parser', env: { node: true, @@ -18,13 +18,6 @@ module.exports = { alwaysTryTypes: true, project: './tsconfig.json', }, - alias: { - map: [ - ['@', './src'], - ['~', './'], - ], - extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'], - }, }, }, }; diff --git a/package-lock.json b/package-lock.json index 45e6b3a..6fa85e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,8 +70,10 @@ "eslint": "^8.57.1", "eslint-config-expo": "~8.0.1", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-expo": "^0.1.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react-hooks": "^5.0.0", "glob": "^11.0.0", @@ -8016,6 +8018,19 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-resolver-alias": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz", + "integrity": "sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + }, + "peerDependencies": { + "eslint-plugin-import": ">=1.4.0" + } + }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", diff --git a/package.json b/package.json index b69b739..25ad322 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,10 @@ "eslint": "^8.57.1", "eslint-config-expo": "~8.0.1", "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-expo": "^0.1.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react-hooks": "^5.0.0", "glob": "^11.0.0",