Skip to content
Snippets Groups Projects
Commit d2d0c11c authored by Chif Gergő's avatar Chif Gergő
Browse files

Add configuration files and update dependencies

* Eslint config to linter config
* Prettier config for code formatting
* Pre-commit hook with husky
* npm commands for linting formatting etc.
parent 986e5a62
No related branches found
No related tags found
2 merge requests!7update master to dev,!1Configuration
SKIP_PREFLIGHT_CHECK=true
\ No newline at end of file
module.exports = {
extends: ["airbnb-typescript"],
parserOptions: {
project: "./tsconfig.json",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
},
};
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# from .gitignore
# dependencies
/node_modules
/.pnp
node_modules
.pnp
.pnp.js
# testing
/coverage
# Tests
coverage
.nyc_output
# production
/build
# compiled output
build
dist
# misc
# env
*.env
# OS
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# tools
.eslintcache
# IDE
*.*workspace*
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.vscode
# commit these, but ignore format
# lock files
yarn.lock
package-lock.json
# assets
*.png
*.jpeg
*.jpg
*.ico
# misc
.*ignore
# Docker files
Dockerfile*
Dockerfile.*
docker-compose.*
# Configuration files
config/*
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -2,29 +2,30 @@
"name": "bodysch-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/jest": "^24.9.1",
"@types/node": "^12.12.29",
"@types/react": "^16.9.23",
"@types/react-dom": "^16.9.5",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-scripts": "3.4.0",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.2",
"typescript": "^3.7.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"fix": "rus -s format lint:fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint --cache src",
"lint:fix": "eslint src --fix",
"pre-commit": "lint-staged -p false",
"start": "react-scripts start",
"test": "react-scripts test"
},
"eslintConfig": {
"extends": "react-app"
"husky": {
"hooks": {
"pre-commit": "npm run pre-commit"
}
},
"lint-staged": {
"*": [
"prettier --write"
],
"*.{js,jsx,ts,tsx}": [
"eslint --cache --fix"
]
},
"browserslist": {
"production": [
......@@ -37,5 +38,43 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"eslintConfig": {
"extends": "./eslintrc.js"
},
"dependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.0",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.2",
"typescript": "^3.9.7"
},
"devDependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/jest": "^24.9.1",
"@types/node": "^12.12.53",
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^3.7.0",
"@typescript-eslint/parser": "^3.7.0",
"eslint": "^7.5.0",
"eslint-config-airbnb-typescript": "^9.0.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.3",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"prettier-plugin-organize-imports": "^1.1.1",
"prettier-plugin-packagejson": "^2.2.5",
"prettier-plugin-sh": "^0.5.0"
}
}
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}
import React from "react";
import React from 'react';
function App() {
return (
<div className="App">
<header className="App-header">
<p>
Edit <code>src/App.tsx</code> and save to reload.
Edit
<code>src/App.tsx</code>
and save to reload.
</p>
<a
className="App-link"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment