Skip to content

Commit

Permalink
feat: import alias (#14)
Browse files Browse the repository at this point in the history
* feat: import alias

* style: format code

* feat: import rules

* chore: remove import

---------

Co-authored-by: Nutthapat Pongtanyavichai <[email protected]>
  • Loading branch information
MasterIceZ and leomotors authored Jan 23, 2024
1 parent c1bd7b8 commit d5a17db
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 20 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@ const config = {
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:svelte/recommended",
"plugin:import/recommended",
],
rules: {
"import/no-unresolved": "off",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
},
overrides: [
{
// Define the configuration for `.astro` file.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "8.56.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-astro": "0.31.3",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-svelte": "2.35.1",
"prettier": "3.2.4",
Expand Down
185 changes: 174 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/navbar/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import Menu from "./Menu.svelte";
import LogoSgcu from "./LogoSGCU.svelte";
import Menu from "./Menu.svelte";
import NavLink from "./NavLink.svelte";
let open = false;
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import "@fontsource-variable/space-grotesk";
import "@fontsource/noto-sans-thai-looped";
import Navbar from "../components/navbar/Navbar.svelte";
import Navbar from "@/components/navbar/Navbar.svelte";
interface Props {
title: string;
Expand Down
Loading

0 comments on commit d5a17db

Please sign in to comment.