Skip to content

Commit

Permalink
feat: update dependencies and added styled components
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissone committed Aug 26, 2022
1 parent a92f85f commit f6f547e
Show file tree
Hide file tree
Showing 16 changed files with 1,882 additions and 2,179 deletions.
File renamed without changes.
110 changes: 109 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,111 @@
{
"extends": ["next", "next/core-web-vitals"]
"env": {
"browser": true,
"es2021": true,
"node": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"extends": [
"next",
"next/core-web-vitals",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"eslint-config-prettier",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "prettier", "eslint-plugin-import-helpers"],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 90,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "auto",
"max-len": ["error", { "code": 90 }]
}
],
"semi": [2, "never"],
"dot-notation": 0,
"consistent-return": "off",
"no-use-before-define": "off",
"no-undef": "off",
"no-plusplus": "off",
"no-else-return": "off",
"no-return-await": "off",
"no-param-reassign": [2, { "props": false }],
"no-unused-vars": ["error", { "args": "none", "caughtErrors": "none" }],
"array-callback-return": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"react/jsx-filename-extension": ["warn", { "extensions": [".tsx"] }],
"react/require-default-props": 0,
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "args": "none", "caughtErrors": "none" }
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/control-has-associated-label": "error",
"jsx-a11y/media-has-caption": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [
"module",
"/^@assets/",
"/^@routes/",
"/^@type/",
"/^@services/",
"/^@libs/",
"/^@contexts/",
"/^@hooks/",
"/^@components/",
"/^@pages/",
"/^@utils/",
["parent", "sibling", "index"],
"/^@styles/",
"/^@/"
],
"alphabetize": { "order": "asc", "ignoreCase": true }
}
]
}
}
99 changes: 0 additions & 99 deletions .eslintrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@ yarn-error.log*

# vercel
.vercel

# husky
/.husky/
.husky
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"printWidth": 90,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 2,
"arrowParens": "avoid",
"arrowParens": "always",
"endOfLine": "auto",
"printWidth": 90,
"max-len": ["error", { "code": 90 }]
}
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
Next style guide template
Next Typescript Template
</h1>

<p align="center">
Expand All @@ -11,18 +11,18 @@
<br />
<p align="center">
<img src="https://img.shields.io/static/v1?label=license&message=MIT" alt="License">
<img src="https://img.shields.io/github/repo-size/Lissone/next-style-guide" alt="Repo size" />
<img src="https://img.shields.io/github/languages/top/Lissone/next-style-guide" alt="Top lang" />
<img src="https://img.shields.io/github/stars/Lissone/next-style-guide" alt="Stars repo" />
<img src="https://img.shields.io/github/forks/Lissone/next-style-guide" alt="Forks repo" />
<img src="https://img.shields.io/github/issues-pr/Lissone/next-style-guide" alt="Pull requests" >
<img src="https://img.shields.io/github/last-commit/Lissone/next-style-guide" alt="Last commit" />
<img src="https://img.shields.io/github/repo-size/Lissone/next-typescript-template" alt="Repo size" />
<img src="https://img.shields.io/github/languages/top/Lissone/next-typescript-template" alt="Top lang" />
<img src="https://img.shields.io/github/stars/Lissone/next-typescript-template" alt="Stars repo" />
<img src="https://img.shields.io/github/forks/Lissone/next-typescript-template" alt="Forks repo" />
<img src="https://img.shields.io/github/issues-pr/Lissone/next-typescript-template" alt="Pull requests" >
<img src="https://img.shields.io/github/last-commit/Lissone/next-typescript-template" alt="Last commit" />
</p>

<p align="center">
<a href="https://github.com/Lissone/next-style-guide/issues">Report bug</a>
<a href="https://github.com/Lissone/next-typescript-template/issues">Report bug</a>
·
<a href="https://github.com/Lissone/next-style-guide/issues">Request feature</a>
<a href="https://github.com/Lissone/next-typescript-template/issues">Request feature</a>
</p>

<br />
Expand All @@ -31,7 +31,7 @@

Template made in React with NextJs to facilitate the creation of new projects with some standardization, which can be created from this one.

Already defined with Typescipt, ESLint with some plugins, Prettier, Lint staged, Commitlint with Commitzen cli to further increase productivity and standardization in creating web
Already defined with Typescipt, ESLint with some plugins, Prettier, Lint staged, Commitlint with Commitzen cli to further increase productivity and standardization in creating web .

### Requirements

Expand All @@ -43,7 +43,7 @@ Template made in React with NextJs to facilitate the creation of new projects wi

- NextJs
- Typescript
- Sass
- StyledComponents
- Eslint
- Airbnb-config with another pessoal rules
- Import helpers plugin
Expand All @@ -59,8 +59,8 @@ Template made in React with NextJs to facilitate the creation of new projects wi
You can use this project as a template for another one, or clone it on your pc using the command:

```bash
git clone https://github.com/Lissone/next-style-guide.git
cd next-style-guide
git clone https://github.com/Lissone/next-typescript-template.git
cd next-typescript-template
```

Install dependencies using:
Expand Down
5 changes: 4 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
59 changes: 30 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "next-style-guide",
"version": "1.0.0",
"name": "next-typescript-template",
"version": "1.0.2",
"description": "My application description",
"repository": "https://github.com/Lissone/next-style-guide.git",
"repository": "https://github.com/Lissone/next-typescript-template.git",
"author": "Leonardo Dias Lissone <leonardo.lissonez@gmail.com>",
"license": "MIT",
"private": true,
Expand All @@ -15,35 +15,36 @@
"lint": "next lint"
},
"dependencies": {
"next": "11.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"sass": "^1.35.1"
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@types/react": "17.0.11",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"eslint": "^7.29.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-next": "11.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-import-helpers": "^1.2.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "^2.3.1",
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"pretty-quick": "^3.1.2",
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"commitizen": "^4.2.4",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@types/react": "18.0.17",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"commitizen": "^4.2.5",
"cz-conventional-changelog": "3.3.0",
"tsconfig-paths": "^3.12.0",
"typescript": "4.3.4"
"eslint": "^8.22.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "12.2.5",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import-helpers": "^1.2.1",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.0",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"tsconfig-paths": "^4.1.0",
"typescript": "4.8.2"
},
"config": {
"commitizen": {
Expand Down
9 changes: 7 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { AppProps } from 'next/app'

import '@styles/global.scss'
import { GlobalStyle } from '@styles/global'

export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
return (
<>
<GlobalStyle />
<Component {...pageProps} />
</>
)
}
Loading

0 comments on commit f6f547e

Please sign in to comment.