Skip to content

Instantly share code, notes, and snippets.

@remulocosta
Last active March 27, 2020 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remulocosta/176ee183670580b927bcd5d6165d0488 to your computer and use it in GitHub Desktop.
Save remulocosta/176ee183670580b927bcd5d6165d0488 to your computer and use it in GitHub Desktop.
React projects
# editorconfig.org
root = true
[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
//React
module.exports = {
env: {
es6: true,
browser: true,
},
extends: [
'airbnb',
'prettier',
'prettier/react'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'import-helpers',
'react',
'prettier'
],
rules: {
"no-alert": "off",
'prettier/prettier': 'error',
'react/jsx-filename-extension':[
'warn',
{ extensions: ['.jsx', 'js']}
],
'import/prefer-default-export': 'off',
'react/state-in-constructor': [0, 'always'],
'react/static-property-placement': [0, 'always'],
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always', // new line between groups
groups: [
'/^react/',
'module',
'/^@shared/',
'/^~/',
['parent', 'sibling', 'index'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
},
};
{
"singleQuote": true,
"trailingComma": "es5"
}
{
"name": "frontend",
"version": "0.1.0",
"description": "Front-end | OmniStack 11 - Be The Hero",
"author": "Remulo Costa <remulo.costa@gmail.com>",
"private": false,
"dependencies": {
"@testing-library/jest-dom": "^5.3.0",
"@testing-library/react": "^10.0.1",
"@testing-library/user-event": "^10.0.0",
"axios": "^0.19.2",
"dotenv": "^8.2.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-icons": "^3.9.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"eslint-plugin-import-helpers": "^1.0.2",
"prettier": "^2.0.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment