-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development setup #62
base: master
Are you sure you want to change the base?
Changes from all commits
1fd63f1
6a7a81a
e81764b
82c5359
ac171bd
562569c
f5c565b
2e746fe
73a9aec
53ccedc
7009922
a05813f
db84df1
cc95c9a
3b06b09
85f4b39
1ae276e
d256a28
a86258c
fa096ad
7ccc41e
5949533
962ab62
3c0be75
5b75187
e85424e
886b96e
5049fd3
ede28e1
f58a361
e4790d3
5669eef
98fa49f
3db77d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = spaces | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true, | ||
"jest/globals": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"requireConfigFile": false, | ||
"babelOptions": { | ||
"presets": ["@babel/preset-react"] | ||
} | ||
}, | ||
"plugins": [ | ||
"react", | ||
"jest" | ||
], | ||
"rules": { | ||
"prettier/prettier": "warn", | ||
"no-unused-vars": "warn", | ||
"react/prop-types": "warn" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contributing | ||
|
||
We're using [GitHub Issues](https://github.com/cmdalbem/ciclomapa/issues) for our backlog. Feel free to take a look around and chose the task you want. Use the tags at your advantage: | ||
|
||
- `complexity` tags tell you how difficult a task *probably* is. | ||
- `good first issue` is the perfect place to start if you're new to the project, or to coding itself. | ||
- `help wanted` are issues where external help is currently more needed. | ||
|
||
After you've chosen your task, you have no doubts on it and you're ready to start coding, follow these steps: | ||
|
||
1. Fork this repository. | ||
2. Create a branch: `git checkout -b <branch_name>`. | ||
3. Make your changes and commit them: `git commit -m '<commit_message>'` | ||
4. Push to the original branch: `git push origin <project_name>/<location>` | ||
5. Create the pull request. | ||
|
||
Alternatively see the GitHub documentation on [creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). | ||
|
||
--- | ||
|
||
## Visual Studio Code | ||
|
||
### Settings | ||
|
||
`.vscode/settings.json` | ||
``` | ||
{ | ||
... | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. essa configuração faz o editor corrigir automaticamente todos warnings quando o arquivo é salvo, certo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exatamente, assim garante que quando for fazer o commit, já está corrigido. |
||
}, | ||
... | ||
} | ||
``` | ||
|
||
### Extensions | ||
|
||
#### [EditorConfig](https://editorconfig.org/) | ||
|
||
`code --install-extension EditorConfig.EditorConfig` | ||
|
||
#### [ESLint](https://eslint.org/) | ||
|
||
`code --install-extension dbaeumer.vscode-eslint` | ||
|
||
#### [Prettier](https://prettier.io/) | ||
|
||
`code --install-extension esbenp.prettier-vscode` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,18 @@ | |
}, | ||
"scripts": { | ||
"start": "craco start", | ||
"lint": "eslint src --max-warnings=0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. essa configuração obriga a ter zero warnings de eslint, certo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nesses casos tem como ignorar o linter para determinados arquivos ou linhas, assim não gera warning: |
||
"build": "craco build", | ||
"test": "craco test", | ||
"eject": "react-scripts eject", | ||
"predeploy": "yarn run build", | ||
"deploy": "gh-pages -d build" | ||
"deploy": "gh-pages -d build", | ||
"prepare": "husky install" | ||
}, | ||
"lint-staged": { | ||
"src/**/*": [ | ||
"yarn lint --fix" | ||
] | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
|
@@ -50,5 +57,17 @@ | |
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@babel/eslint-parser": "^7.17.0", | ||
"@babel/preset-react": "^7.16.7", | ||
"eslint": "^7.11.0", | ||
"eslint-config-prettier": "^8.4.0", | ||
"eslint-plugin-jest": "^26.1.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"husky": "^7.0.0", | ||
"lint-staged": "^12.3.4", | ||
"prettier": "2.5.1" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boa, brigado por organizar esse arquivo!
tava há tempos querendo fazer isso haha