Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Dec 12, 2022
1 parent 43195ba commit 18ee415
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 50 deletions.
57 changes: 57 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---

extends: default

ignore: |
pnpm-lock.yaml
pnpm-workspace.yaml
node_modules/

# Overwrite above default rules
rules:
braces:
# Defaults
# min-spaces-inside: 0
# max-spaces-inside: 0

# Keep 0 min-spaces to not error on empty {} collection definitions
min-spaces-inside: 0

# Allow one space inside braces to improve code readability
max-spaces-inside: 1

brackets:
# Defaults
# min-spaces-inside: 0
# max-spaces-inside: 0

# Keep 0 min-spaces to not error on empty [] collection definitions
min-spaces-inside: 0

# Allow one space inside braces to improve code readability
max-spaces-inside: 1

colons:
# Defaults
# min-spaces-before: 0
# max-spaces-after: 1

# Allow multiple spaces after a colon to allow indentation of YAML
# dictionary values
max-spaces-after: -1

commas:
# Defaults
# max-spaces-after: 1

# Allow multiple spaces after a comma to allow indentation of YAML
# dictionary values
max-spaces-after: -1

comments:
require-starting-space: true
min-spaces-from-content: 1

line-length: disable

...
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# NextJS Starter Template

This repository contains [monorepo](https://turbo.build/repo/docs/handbook/what-is-a-monorepo) boilerplate written in [Next.js](https://nextjs.org). Used together with backend API part — [laravel-starter-tpl](https://github.com/wayofdev/laravel-starter-tpl).
This repository contains [monorepo](https://turbo.build/repo/docs/handbook/what-is-a-monorepo) boilerplate written in [Next.js](https://nextjs.org). Used together with backend API part — [laravel-starter-tpl](https://github.com/wayofdev/laravel-starter-tpl).

<br>

Expand All @@ -30,34 +30,34 @@ This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes th

### → Apps and Packages

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
- Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
* `docs`: a [Next.js](https://nextjs.org/) app
* `web`: another [Next.js](https://nextjs.org/) app
* `ui`: a stub React component library shared by both `web` and `docs` applications
* `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
* `tsconfig`: `tsconfig.json`s used throughout the monorepo
* Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

<br>

### → Utilities and Features

This repository has some additional tools already setup for you:

* Supporting [NextJS 13.x](https://nextjs.org/blog/next-13)
* [TypeScript](https://www.typescriptlang.org/) support for static type checking
* Strict Mode for TypeScript and React 18
* [ESLint](https://eslint.org/) for code linting and configured presets: NextJS Recommended, NextJS Core Web Vitals and [Airbnb Style Guide](https://www.npmjs.com/package/eslint-config-airbnb)
* Code formatting with [Prettier](https://prettier.io/)
* Integrated with [Tailwind CSS](https://tailwindcss.com/)
* [PostCSS](https://postcss.org/) for processing Tailwind CSS and [CSSNANO](https://cssnano.co/) for CSS optimization on production systems
* [Husky](https://typicode.github.io/husky/#/) for modern native git hooks
* [Lint-staged](https://github.com/okonet/lint-staged) for running linters on Git staged files
* [GitHub Actions](https://github.com/features/actions) support out of the box
* SEO metadata, JSON-LD and Open Graph tags with [Next SEO](https://github.com/garmeeh/next-seo)
* Sitemap support using [next-sitemap](https://www.npmjs.com/package/next-sitemap)
* [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) — Visualize size of webpack output files with an interactive zoomable treemap
* Optimized [Lighthouse](https://web.dev/performance-scoring/) performance score
* End-2-end testing with [cypress](https://www.cypress.io/) and [JestJS](https://jestjs.io/) support for writing unit tests
* Supporting [NextJS 13.x](https://nextjs.org/blog/next-13)
* [TypeScript](https://www.typescriptlang.org/) support for static type checking
* Strict Mode for TypeScript and React 18
* [ESLint](https://eslint.org/) for code linting and configured presets: NextJS Recommended, NextJS Core Web Vitals and [Airbnb Style Guide](https://www.npmjs.com/package/eslint-config-airbnb)
* Code formatting with [Prettier](https://prettier.io/)
* Integrated with [Tailwind CSS](https://tailwindcss.com/)
* [PostCSS](https://postcss.org/) for processing Tailwind CSS and [CSSNANO](https://cssnano.co/) for CSS optimization on production systems
* [Husky](https://typicode.github.io/husky/#/) for modern native git hooks
* [Lint-staged](https://github.com/okonet/lint-staged) for running linters on Git staged files
* [GitHub Actions](https://github.com/features/actions) support out of the box
* SEO metadata, JSON-LD and Open Graph tags with [Next SEO](https://github.com/garmeeh/next-seo)
* Sitemap support using [next-sitemap](https://www.npmjs.com/package/next-sitemap)
* [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) — Visualize size of webpack output files with an interactive zoomable treemap
* Optimized [Lighthouse](https://web.dev/performance-scoring/) performance score
* End-2-end testing with [cypress](https://www.cypress.io/) and [JestJS](https://jestjs.io/) support for writing unit tests

<br>

Expand Down Expand Up @@ -179,26 +179,27 @@ $ make test
## 🧱 Useful Resources
* Learn more about the power of **Turborepo**:
* Learn more about the power of **Turborepo**:
* [What is Monorepo?](https://turbo.build/repo/docs/handbook/what-is-a-monorepo)
* [What is Monorepo?](https://turbo.build/repo/docs/handbook/what-is-a-monorepo)
- [Pipelines](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
* [Pipelines](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
* [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
* [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
* [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
* [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
* [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
* Other templates:
* Other templates:
* [ixartz/next-js-boilerplate](https://github.com/ixartz/Next-js-Boilerplate)
* [laravel/breeze-next](https://github.com/laravel/breeze-next)
* [ixartz/next-js-boilerplate](https://github.com/ixartz/Next-js-Boilerplate)
* [laravel/breeze-next](https://github.com/laravel/breeze-next)
<br>
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

Expand Down
12 changes: 6 additions & 6 deletions apps/docs/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Button } from "ui";

export default function Docs() {
return (
<div>
<h1>Docs</h1>
<Button />
</div>
);
return (
<div>
<h1>Docs</h1>
<Button />
</div>
);
}
4 changes: 2 additions & 2 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

Expand Down
12 changes: 6 additions & 6 deletions apps/web/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Button } from "ui";

export default function Web() {
return (
<div>
<h1>Web</h1>
<Button />
</div>
);
return (
<div>
<h1>Web</h1>
<Button />
</div>
);
}
2 changes: 1 addition & 1 deletion packages/ui/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
export const Button = () => {
return <button>Boop</button>;
return <button>Boop</button>;
};

0 comments on commit 18ee415

Please sign in to comment.