Skip to content

Commit 111cae3

Browse files
kuduzowkuduzow
andauthored
ci: lint-staged будет проверять только измененные файлы (#355)
Co-authored-by: kuduzow <[email protected]>
1 parent 0f80bf7 commit 111cae3

File tree

3 files changed

+68
-65
lines changed

3 files changed

+68
-65
lines changed

.lintstagedrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"*{.json,.jsx,.js,.css,.html,.yml}": "npm run check"
2+
"*{.json,.jsx,.js,.css,.html,.yml}": "prettier --check",
3+
"*{.jsx,.js}": "eslint --report-unused-disable-directives --max-warnings 0",
4+
"*": "npm run test:ci ./src"
35
}

package-lock.json

Lines changed: 61 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"styled-components": "^5.3.3"
2525
},
2626
"scripts": {
27-
"check": "npm run prettier:check && npm run lint && cross-env CI=true npm run test && cross-env CI=true npm run build",
27+
"check": "npm run prettier:check && npm run lint && npm run test:ci && cross-env CI=true npm run build",
2828
"start": "react-scripts start",
2929
"build": "cross-env GENERATE_SOURCEMAP=false react-scripts build",
3030
"test": "react-scripts test",
31+
"test:ci": "cross-env CI=true react-scripts test",
3132
"eject": "react-scripts eject",
3233
"fix": "npm run lint:fix && npm run prettier",
3334
"lint": "npm run lint:js",
@@ -64,8 +65,8 @@
6465
"eslint-config-airbnb": "^19.0.4",
6566
"eslint-config-prettier": "^8.5.0",
6667
"eslint-plugin-eslint-plugin": "^5.0.6",
67-
"husky": "^8.0.1",
68-
"lint-staged": "^13.0.3",
68+
"husky": "^8.0.3",
69+
"lint-staged": "^13.1.2",
6970
"prettier": "^2.7.1"
7071
}
7172
}

0 commit comments

Comments
 (0)