diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3d5f44e..a45f045 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -12,6 +12,12 @@ module.exports = { ecmaVersion: 'latest', }, + settings: { + 'import/resolver': { + alias: [['@', './src']], + }, + }, + rules: { 'no-console': 'warn', 'no-debugger': 'warn', diff --git a/package-lock.json b/package-lock.json index d3d6a95..3fa7ae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@vitejs/plugin-vue-jsx": "^3.0.2", "eslint": "^8.49.0", "eslint-config-airbnb-base": "^15.0.0", + "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-vue": "^9.17.0", "vite": "^4.4.11" } @@ -1860,6 +1861,18 @@ "eslint-plugin-import": "^2.25.2" } }, + "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, + "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", @@ -5474,6 +5487,13 @@ "semver": "^6.3.0" } }, + "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, + "requires": {} + }, "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 f2cc86e..204e70a 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@vitejs/plugin-vue-jsx": "^3.0.2", "eslint": "^8.49.0", "eslint-config-airbnb-base": "^15.0.0", + "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-vue": "^9.17.0", "vite": "^4.4.11" }