Skip to content

Commit

Permalink
fix the yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddyCubaka committed Oct 25, 2022
1 parent 317fdc4 commit b9f7270
Show file tree
Hide file tree
Showing 7 changed files with 303 additions and 41 deletions.
11 changes: 0 additions & 11 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
{
"rules": {
"react/react-in-jsx-scope": "off"
},
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"]
}
25 changes: 15 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"env": {
"browser": true,
"es2021": true
"browser": true,
"es2021": true
},
"extends": ["plugin:react/recommended"],
"extends": [
"plugin:react/recommended",
"airbnb"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "prettier"],
"plugins": [
"react", "prettier"
],
"rules": {
"semi": 0,
"comma-dangle": 0,
"prettier/prettier": "error",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
}
}
}
5 changes: 1 addition & 4 deletions .github/workflows/react.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ jobs:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Yarn & Node install cache
uses: EgorDm/gha-yarn-node-cache@v1
- name: Github Actions Yarn
uses: dreygur/github-actions-yarn@1.0.1
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn pretty
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test
10 changes: 4 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"semi": true,
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false,
"trailingComma": "none",
"jsxBracketSameLine": true
}
"semi": false,
"singleQuote": true
}
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.1.2",
"eslint": "^8.26.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -21,7 +26,8 @@
"build": "react-scripts build",
"eject": "react-scripts eject",
"lint": "eslint --fix",
"pretty": "prettier --write ."
"pretty": "prettier --write .",
"prepare": "husky install"
},
"eslintConfig": {
"extends": [
Expand All @@ -42,10 +48,14 @@
]
},
"devDependencies": {
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1"
"husky": "^8.0.0"
},
"lint-staged": {
"**/*.{js,jsx}": [
"npm run lint",
"prettier --write"
]
},
"lint": "eslint .",
"lint:fix": "eslint --fix",
Expand Down
Loading

0 comments on commit b9f7270

Please sign in to comment.