добавляет nano-staged

This commit is contained in:
Maxim Slipenko 2022-05-13 22:15:08 +03:00
parent 9a30a0ba44
commit 74eaf9b8f9
Signed by: Maks1mS
GPG Key ID: 7461AF39A8705FB8
5 changed files with 29 additions and 2 deletions

View File

@ -1 +1,3 @@
!.eleventy.js !.eleventy.js
!.nano-staged.js
!.simple-git-hooks.js

4
.nano-staged.js Normal file
View File

@ -0,0 +1,4 @@
module.exports = {
'*.js': ['eslint --fix'],
'*.css': ['stylelint --fix']
}

3
.simple-git-hooks.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
'pre-commit': 'npx nano-staged'
}

15
package-lock.json generated
View File

@ -4297,6 +4297,15 @@
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
"dev": true "dev": true
}, },
"nano-staged": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/nano-staged/-/nano-staged-0.8.0.tgz",
"integrity": "sha512-QSEqPGTCJbkHU2yLvfY6huqYPjdBrOaTMKatO1F8nCSrkQGXeKwtCiCnsdxnuMhbg3DTVywKaeWLGCE5oJpq0g==",
"dev": true,
"requires": {
"picocolors": "^1.0.0"
}
},
"nanoid": { "nanoid": {
"version": "3.3.4", "version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
@ -6139,6 +6148,12 @@
"simple-concat": "^1.0.0" "simple-concat": "^1.0.0"
} }
}, },
"simple-git-hooks": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.7.0.tgz",
"integrity": "sha512-nQe6ASMO9zn5/htIrU37xEIHGr9E6wikXelLbOeTcfsX2O++DHaVug7RSQoq+kO7DvZTH37WA5gW49hN9HTDmQ==",
"dev": true
},
"simple-swizzle": { "simple-swizzle": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",

View File

@ -4,7 +4,8 @@
"prestart": "", "prestart": "",
"start": "npx @11t/eleventy --serve", "start": "npx @11t/eleventy --serve",
"build": "cross-env NODE_ENV=production npx @11t/eleventy", "build": "cross-env NODE_ENV=production npx @11t/eleventy",
"stylelint": "stylelint 'src/**/*.css'" "stylelint": "stylelint 'src/**/*.css'",
"eslint": "eslint src"
}, },
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^1.0.1", "@11ty/eleventy": "^1.0.1",
@ -21,10 +22,12 @@
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.0", "eslint-plugin-n": "^15.2.0",
"eslint-plugin-promise": "^6.0.0", "eslint-plugin-promise": "^6.0.0",
"nano-staged": "^0.8.0",
"postcss": "^8.4.13", "postcss": "^8.4.13",
"postcss-import": "^14.1.0", "postcss-import": "^14.1.0",
"rollup": "^2.72.1", "rollup": "^2.72.1",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"simple-git-hooks": "^2.7.0",
"stylelint": "^14.8.2", "stylelint": "^14.8.2",
"stylelint-config-standard": "^25.0.0", "stylelint-config-standard": "^25.0.0",
"tailwindcss": "^3.0.24" "tailwindcss": "^3.0.24"