Skip to content

Commit

Permalink
feat: added prettier (#350)
Browse files Browse the repository at this point in the history
* add new favicon & hosting resources

* Added Prettier

* Prettier fixes

* changed eslint rules

* modified eslintrc.json file
  • Loading branch information
Abbeyafolaby authored Mar 18, 2023
1 parent 0425de5 commit e1e5ce4
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 8 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"extends": "next/core-web-vitals"
"plugins": ["@typescript-eslint"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-types": "warn"
}
}
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 2,
"useTabs": false
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
4 changes: 2 additions & 2 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Link from "next/link";
import type { FC } from "react";

interface FooterProps {}

export const Footer: FC<FooterProps> = ({}) => {

export const Footer: FC = () => {
return (
<footer className="z-10 mb-4 flex w-full items-baseline justify-center rounded-lg bg-[#ffffff0a] py-2 backdrop-blur-md sm:py-3">
<p className="md:text-lg text-center text-black dark:text-gray-100">
Expand Down
2 changes: 1 addition & 1 deletion components/Footer/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import { Footer } from "./Footer";
import { Footer } from './Footer'
1 change: 0 additions & 1 deletion components/Loader/Preloader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import useLoader from "hooks/useLoader";
import { ReactNode } from "react";
import { Spinner } from "./Spinner";

export const Preloader = ({
Expand Down
2 changes: 1 addition & 1 deletion components/TopBar/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import { TopBar } from './TopBar';
import { TopBar } from './TopBar'
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"daisyui": "^2.46.1",
"eslint": "8.31.0",
"eslint-config-next": "13.1.1",
"eslint-config-prettier": "^8.6.0",
"git": "^0.1.5",
"next": "13.1.1",
"next-themes": "^0.2.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.7.1",
Expand All @@ -33,6 +35,7 @@
"typewriter-effect": "^2.19.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.53.0",
"autoprefixer": "^10.4.13",
"postcss": "^8.4.20",
"tailwindcss": "^3.2.4"
Expand Down
2 changes: 1 addition & 1 deletion pages/[subcategory]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Head from "next/head";

const SubCategory = () => {
const router = useRouter();
const title: string = `LinksHub - ${router.asPath
const title = `LinksHub - ${router.asPath
.charAt(1)
.toUpperCase()}${router.asPath.slice(2)}`;
return (
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TypewriterComponent from "typewriter-effect";
import { sidebarData } from "../database/data";
export default function Home() {
//storing sub categories names for using in typewriter effect
let subCategoriesNames:string[] = [];
const subCategoriesNames:string[] = [];
sidebarData.forEach((c) => {
c.subcategory.forEach((a) =>{
subCategoriesNames.push(a.name.toUpperCase());
Expand Down

1 comment on commit e1e5ce4

@vercel
Copy link

@vercel vercel bot commented on e1e5ce4 Mar 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

linkshub – ./

linkshub.vercel.app
linkshub-git-main-rupali-codes.vercel.app
linkshub-rupali-codes.vercel.app

Please sign in to comment.