Skip to content

Commit

Permalink
feat: add lintstaged config
Browse files Browse the repository at this point in the history
  • Loading branch information
luigibarbato committed Dec 11, 2022
1 parent e53728b commit 3c1312a
Show file tree
Hide file tree
Showing 25 changed files with 2,445 additions and 1,235 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"rules": {
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off"
}
}
12 changes: 12 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require("path");

const buildEslintCommand = (filenames) =>
`next lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" --file ")}`;

const buildPrettierCommand = "npx prettier --write .";

module.exports = {
"*.{js,jsx,ts,tsx}": [buildEslintCommand, buildPrettierCommand],
};
42 changes: 24 additions & 18 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
export const Footer = () => {
return (
<footer className="footer flex flex-col md:flex-row justify-between p-2 md:p-10 text-black border">
<div className="subfooter-left flex flex-col md:flex-col md:gap-2 px-2 md:px-10">
<h1 className="title text-xl md:text-2xl font-black rounded-lg">Unconditional.</h1>
<p className="text-transparent text-md md:text-xl bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 ">© 2022 All rights reserved.</p>
</div>
<div className="subfooter-right flex flex-col md:flex-col md:gap-2 px-2 md:px-10">
<p className="title text-xl md:text-2xl font-black rounded-lg">Lorem,Ipsum,Sum </p>
<ul className="text-md md:text-xl flex gap-6 text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 ">
<li>Github</li>
<li>Twitter</li>
<li>License</li>
</ul>
</div>
</footer>
)
}
return (
<footer className="footer flex flex-col md:flex-row justify-between p-2 md:p-10 text-black border">
<div className="subfooter-left flex flex-col md:flex-col md:gap-2 px-2 md:px-10">
<h1 className="title text-xl md:text-2xl font-black rounded-lg">
Unconditional.
</h1>
<p className="text-transparent text-md md:text-xl bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 ">
© 2022 All rights reserved.
</p>
</div>
<div className="subfooter-right flex flex-col md:flex-col md:gap-2 px-2 md:px-10">
<p className="title text-xl md:text-2xl font-black rounded-lg">
Lorem,Ipsum,Sum{" "}
</p>
<ul className="text-md md:text-xl flex gap-6 text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 ">
<li>Github</li>
<li>Twitter</li>
<li>License</li>
</ul>
</div>
</footer>
);
};

export default Footer
export default Footer;
16 changes: 9 additions & 7 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Link from "next/link"
import Link from "next/link";

export const Header = () => {
return (
<header className="header p-5 border-purple-50">
<Link href="/"><a className="title text-xl font-black text-black" >Unconditional.</a></Link>
</header>
)
}
return (
<header className="header p-5 border-purple-50">
<Link href="/">
<a className="title text-xl font-black text-black">Unconditional.</a>
</Link>
</header>
);
};
36 changes: 20 additions & 16 deletions generated/core/ApiError.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
import type { ApiRequestOptions } from "./ApiRequestOptions";
import type { ApiResult } from "./ApiResult";

export class ApiError extends Error {
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly request: ApiRequestOptions;
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: any;
public readonly request: ApiRequestOptions;

constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
super(message);
constructor(
request: ApiRequestOptions,
response: ApiResult,
message: string
) {
super(message);

this.name = 'ApiError';
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
this.name = "ApiError";
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
}
29 changes: 18 additions & 11 deletions generated/core/ApiRequestOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
/* tslint:disable */
/* eslint-disable */
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
readonly method:
| "GET"
| "PUT"
| "POST"
| "DELETE"
| "OPTIONS"
| "HEAD"
| "PATCH";
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};
10 changes: 5 additions & 5 deletions generated/core/ApiResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* tslint:disable */
/* eslint-disable */
export type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};
Loading

0 comments on commit 3c1312a

Please sign in to comment.