Skip to content

Commit 6ac9707

Browse files
committed
chore: set up prettier and prettier eslint plugin; remove unused files in config/
1 parent a619ad1 commit 6ac9707

File tree

10 files changed

+192
-341
lines changed

10 files changed

+192
-341
lines changed

.eslintrc renamed to .eslintrc.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{
1+
module.exports = {
22
"plugins": [
33
"cypress",
44
"@cypress/dev"
55
],
66
"extends": [
77
"plugin:@cypress/dev/general",
8-
"plugin:cypress/recommended"
8+
"plugin:cypress/recommended",
9+
"prettier"
910
],
1011
"env": {
1112
"es6": true,

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged "$1"

.husky/pre-commit

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"

.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
dist
2+
.husky
3+
.vscode
4+
.circleci
5+
.github
6+
assets
7+
node_modules
8+
.eslintignore
9+
.eslintrc-textlint
10+
.gitignore
11+
.mergify.yml
12+
.node-version
13+
.textlintrc

components/sidebar/getSidebarItemLink.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ export const getSidebarItemLink = ({ section, folder, slug }) => {
99
if (slug === 'all-assertions') {
1010
return `/guides/references/assertions`
1111
}
12+
1213
return `/${section}/${folder ? `${folder}/` : ''}${slug}`
1314
}

config/apiSidebar.json

-73
This file was deleted.

config/guideSidebar.json

-179
This file was deleted.

package.json

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717
"lint": "yarn lint:js && yarn lint:style",
1818
"test": "./node_modules/.bin/cypress open",
1919
"transform": "node scripts/transform.js",
20-
"make-empty-commit": "node node_modules/make-empty-github-commit/bin/empty.js --repo cypress-io/docs"
20+
"make-empty-commit": "node node_modules/make-empty-github-commit/bin/empty.js --repo cypress-io/docs",
21+
"postinstall": "husky install"
2122
},
2223
"lint-staged": {
23-
"*.{js,vue}": "eslint",
24-
"*.{css,vue}": "stylelint"
25-
},
26-
"husky": {
27-
"hooks": {
28-
"pre-commit": "lint-staged"
29-
}
24+
"*.{js,vue}": "eslint --fix",
25+
"*.{css,vue}": "stylelint",
26+
"*.js": "eslint --cache --fix",
27+
"*.css": "stylelint --fix",
28+
"*.md": "prettier --write"
3029
},
3130
"dependencies": {
3231
"@docsearch/css": "^1.0.0-alpha.28",
@@ -43,6 +42,7 @@
4342
"yamljs": "^0.3.0"
4443
},
4544
"devDependencies": {
45+
"@cypress/eslint-plugin-dev": "^5.1.0",
4646
"@fortawesome/free-brands-svg-icons": "^5.14.0",
4747
"@fortawesome/free-solid-svg-icons": "^5.14.0",
4848
"@nuxtjs/eslint-config": "^3.0.0",
@@ -57,11 +57,13 @@
5757
"cross-env": "^7.0.3",
5858
"cypress": "^6.4.0",
5959
"eslint": "^7.2.0",
60-
"eslint-config-prettier": "^6.11.0",
60+
"eslint-config-prettier": "^8.0.0",
61+
"eslint-plugin-cypress": "^2.11.2",
62+
"eslint-plugin-json-format": "^2.0.1",
6163
"eslint-plugin-nuxt": "^1.0.0",
6264
"eslint-plugin-prettier": "^3.1.4",
63-
"husky": "^4.2.5",
64-
"lint-staged": "^10.2.11",
65+
"husky": "^5.1.1",
66+
"lint-staged": "^10.5.4",
6567
"make-empty-github-commit": "^1.2.1",
6668
"netlify-cli": "^3.5.0",
6769
"node-sass": "^4.14.1",

0 commit comments

Comments
 (0)