Skip to content

Commit

Permalink
chore: alias import
Browse files Browse the repository at this point in the history
  • Loading branch information
mari1912 committed Jul 10, 2024
1 parent 8a490d4 commit f949ebf
Show file tree
Hide file tree
Showing 3 changed files with 497 additions and 20 deletions.
18 changes: 18 additions & 0 deletions dashboard/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');

module.exports = {
root: true,
env: { browser: true, es2020: true },
Expand Down Expand Up @@ -27,6 +29,22 @@ module.exports = {
react: {
version: "detect",
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"webpack": {
config: {
resolve: {
alias: {
'@': path.join(__dirname, 'src/'),
},
extensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs'],
},
},
},
}
},
plugins: [
"react-refresh",
Expand Down
2 changes: 2 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"class-variance-authority": "^0.7.0",
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"eslint-import-resolver-typescript": "^3.6.1",
"flat": "^6.0.1",
"lucide-react": "^0.396.0",
"react": "^18.3.1",
Expand Down Expand Up @@ -60,6 +61,7 @@
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-webpack": "^0.13.8",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
Expand Down
Loading

0 comments on commit f949ebf

Please sign in to comment.