mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-01-20 10:31:03 +01:00
added husky, prettier and changed editorconfig
This commit is contained in:
parent
d51ea89620
commit
75ff4a09e6
@ -5,28 +5,6 @@ end_of_line = lf
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[**.js]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[**.json]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[**.css]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[**.html]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[**.jsx]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[configure]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"printWidth": 100,
|
|
||||||
"semi": true,
|
|
||||||
"single-quote": false
|
|
||||||
}
|
|
17
package.json
17
package.json
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
|
"prettier": "prettier 'src/**/*.{js*,ts*,htm*,md,scss}' --write",
|
||||||
"patch": "npm --no-git-tag-version version patch",
|
"patch": "npm --no-git-tag-version version patch",
|
||||||
"minor": "npm --no-git-tag-version version minor",
|
"minor": "npm --no-git-tag-version version minor",
|
||||||
"major": "npm --no-git-tag-version version major",
|
"major": "npm --no-git-tag-version version major",
|
||||||
@ -40,6 +41,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/Mastermindzh/react-cookie-consent#readme",
|
"homepage": "https://github.com/Mastermindzh/react-cookie-consent#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@mastermindzh/prettier-config": "^1.0.0",
|
||||||
"@types/js-cookie": "^2.2.6",
|
"@types/js-cookie": "^2.2.6",
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-core": "^6.26.3",
|
"babel-core": "^6.26.3",
|
||||||
@ -51,7 +53,22 @@
|
|||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"babel-preset-stage-1": "^6.24.1",
|
"babel-preset-stage-1": "^6.24.1",
|
||||||
"copy-webpack-plugin": "^4.6.0",
|
"copy-webpack-plugin": "^4.6.0",
|
||||||
|
"husky": "^4.2.5",
|
||||||
|
"lint-staged": "^10.2.10",
|
||||||
|
"prettier": "^2.0.5",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"webpack": "^2.6.1"
|
"webpack": "^2.6.1"
|
||||||
|
},
|
||||||
|
"prettier": "@mastermindzh/prettier-config",
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "lint-staged"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js*,ts*,htm*,md,scss}": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user