Skip to content

Commit 43bdc79

Browse files
authored
feat: 🎸 Estrutura NextJs - ConsumerWeb (#8)
* feat: 🎸 add reduzx to project structure * feat: 🎸 tailwind * feat: 🎸 add redux structure * Update README.md * refactor: 💡 move redux hooks to redux selectors * refactor: 💡 improve types folder structure for redux types * fix: 🐛 fix husky ci pre-push * feat: 🎸 add new file api in redux * feat: 🎸 add new mode to api query redux * feat: 🎸 add .env var to api url and unify query toolkit * feat: 🎸 add Eslint Rules * feat: 🎸 Typescript import configs * fix: 🐛 fix current types and imports @ * refactor: 💡 fix eslint * feat: 🎸 add themes dark mode and new provider structure folder * feat: 🎸 move dark mode button and header for major layout file * feat: 🎸 configure jest tsx, and testing libary * feat: 🎸 add commands to jest test * test: 💍 #Test DarkModeButton * test: 💍 coverage for redux * test: 💍 add full coverage for all code- Tests Practices * feat: 🎸 add component generator * docs: ✏️ change readme.md * feat: 🎸 add new generator to routes and screens * feat: 🎸 add services generator
1 parent cf63d9f commit 43bdc79

File tree

85 files changed

+8531
-2596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+8531
-2596
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ PORT=8000
33
NEXT_PUBLIC_PACKAGE_NAME=consumer_front_web
44
SKIP_PREFLIGHT_CHECK=true
55
PUBLIC_URL=/
6-
NEXT_PUBLIC_PROXY=/
6+
NEXT_PUBLIC_PROXY=/
7+
NEXT_PUBLIC_API_BASE_URL=https://jsonplaceholder.typicode.com/

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
src/mocks
2+
generators/

.eslintrc.json

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,67 @@
11
{
2+
"settings": {
3+
"react": {
4+
"version": "detect"
5+
}
6+
},
7+
"env": {
8+
"browser": true,
9+
"es2021": true,
10+
"node": true
11+
},
212
"extends": [
3-
"next/core-web-vitals",
4-
"plugin:react-hooks/recommended"
13+
"eslint:recommended",
14+
"plugin:react/recommended",
15+
"plugin:react-hooks/recommended",
16+
"plugin:jsx-a11y/recommended",
17+
"plugin:prettier/recommended",
18+
"plugin:@next/next/recommended"
519
],
6-
"parser": "@typescript-eslint/parser",
7-
"parserOptions": { "project": ["./tsconfig.json"] },
8-
"plugins": [
9-
"@typescript-eslint"
10-
],
11-
"rules": {
12-
"@typescript-eslint/strict-boolean-expressions": [
13-
2,
14-
{
15-
"allowString" : false,
16-
"allowNumber" : false
17-
}
18-
]
20+
"parserOptions": {
21+
"ecmaFeatures": {
22+
"jsx": true
1923
},
20-
"ignorePatterns": ["src/**/*.test.ts", "src/frontend/generated/*"]
24+
"ecmaVersion": 12,
25+
"sourceType": "module"
26+
},
27+
"plugins": ["react", "jsx-a11y", "simple-import-sort"],
28+
"rules": {
29+
"react/react-in-jsx-scope": "off",
30+
"jsx-a11y/anchor-is-valid": "off",
31+
"simple-import-sort/imports": "error",
32+
"simple-import-sort/exports": "error"
33+
},
34+
"overrides": [
35+
{
36+
"files": ["**/*.ts", "**/*.tsx"],
37+
"parser": "@typescript-eslint/parser",
38+
"plugins": ["@typescript-eslint"],
39+
"extends": ["plugin:@typescript-eslint/recommended"],
40+
"rules": {
41+
"react/prop-types": "off",
42+
"@typescript-eslint/no-unused-vars": "error",
43+
"@typescript-eslint/explicit-function-return-type": [
44+
"warn",
45+
{
46+
"allowExpressions": true,
47+
"allowConciseArrowFunctionExpressionsStartingWithVoid": true
48+
}
49+
],
50+
"@typescript-eslint/ban-ts-comment": "warn",
51+
"simple-import-sort/imports": [
52+
"error",
53+
{
54+
"groups": [
55+
["^react", "^@?\\w"],
56+
["^(@|components)(/.*|$)"],
57+
["^\\u0000"],
58+
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
59+
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
60+
["^.+\\.?(css)$"]
61+
]
62+
}
63+
]
64+
}
65+
}
66+
]
2167
}

.husky/commit-msg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
3-
4-
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1
5+
npx lint-staged

.lintstagedrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"*.tsx": "eslint",
3+
"*.ts": "eslint",
4+
"*.js": "eslint",
5+
"*.md": "prettier --list-different"
6+
}

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.next
2+
node_modules
3+
package-lock.json
4+
public

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": false,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 85,
6+
"tabWidth": 2,
7+
"useTabs": false
8+
}

.vscode/css_custom_data.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the @tailwind directive to insert Tailwind's `base`, `components`, `utilities`, and `screens` styles into your CSS."
7+
}
8+
]
9+
}

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Chrome",
11+
"url": "http://localhost:8000",
12+
"webRoot": "${workspaceRoot}/src"
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)