Skip to content

Commit

Permalink
feat: upgrade husky & add lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Sep 5, 2021
1 parent 6beaa3c commit 37ccade
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 51 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
7 changes: 0 additions & 7 deletions husky.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'*.{js,ts,vue}': 'npm run lint:js',
'*.{css,vue}': 'npm run lint:css',
};
110 changes: 66 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,90 +1,112 @@
{
"name": "v-github-icon",
"version": "1.2.0",
"description": "Vue + GitHub Icon ❤️",
"types": "./types/index.d.ts",
"main": "dist/v-github-icon.js",
"version": "1.2.0",
"private": false,
"main": "dist/v-github-icon.cjs.js",
"module": "dist/v-github-icon.esm.js",
"unpkg": "dist/v-github-icon.js",
"jsdelivr": "dist/v-github-icon.js",
"cdn": "dist/v-github-icon.js",
"types": "types/index.d.ts",
"files": [
"dist"
"dist",
"types"
],
"private": false,
"sideEffects": false,
"scripts": {
"test": "ava",
"test:snapshot": "ava --update-snapshots",
"build": "npm run bundle && npm run bundle:min",
"bundle": "rollup -c build/rollup.config.js",
"bundle:min": "rollup -c build/rollup.min.config.js",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lintfix": "npm run lint:eslint:fix && npm run lint:prettier:fix",
"lint:eslint": "eslint \"{,!(node_modules|dist|static)/**/}*.{js,ts,vue}\"",
"lint:eslint:fix": "eslint --fix \"{,!(node_modules|dist|static)/**/}*.{js,ts,vue}\"",
"lint:prettier": "prettier --check \"{,!(node_modules|dist|static)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:prettier:fix": "prettier --write \"{,!(node_modules|dist|static)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"build": "rimraf dist && npm run bundle && npm run bundle:min",
"bundle": "rollup -c build/rollup.config.ts",
"bundle:min": "rollup -c build/rollup.config.min.ts",
"lint": "npm run lint:prettier && npm run lint:eslint && npm run lint:css",
"lintfix": "npm run lint:prettier:fix && npm run lint:eslint:fix && npm run lint:css:fix",
"lint:js": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:eslint:fix": "eslint --fix \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:prettier": "prettier --check \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:prettier:fix": "prettier --write \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:css": "stylelint \"{,!(node_modules|dist)/**/}*.{css,scss,vue}\" --ignore-path .gitignore",
"lint:css:fix": "stylelint --fix \"{,!(node_modules|dist)/**/}*.{css,scss,vue}\" --ignore-path .gitignore",
"lint-staged": "lint-staged",
"storybook": "start-storybook -p 4000",
"build-storybook": "build-storybook -o ./static/storybook",
"release:prepare": "shipjs prepare",
"release:trigger": "shipjs trigger"
"prepare": "husky install",
"release": "shipjs prepare",
"release:dry": "shipjs prepare --dry-run",
"release:auto": "shipjs prepare --yes"
},
"dependencies": {
"@vue/composition-api": "^1.0.0-rc.2"
"peerDependencies": {
"@vue/composition-api": "^1.1.4"
},
"devDependencies": {
"@ava/babel": "^2.0.0",
"@babel/core": "^7.12.17",
"@babel/preset-env": "^7.12.17",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.4",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@rollup/plugin-alias": "^3.1.2",
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-beep": "^0.2.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@storybook/vue": "^6.1.18",
"@types/node": "^16.0.0",
"@typescript-eslint/parser": "^4.15.1",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-sucrase": "^4.0.0",
"@storybook/vue": "^6.3.8",
"@types/node": "^16.7.10",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"@vinayakkulkarni/prettier-config-vue": "^1.0.0",
"@vue/test-utils": "^1.1.3",
"@vue/test-utils": "^1.2.2",
"ava": "^3.15.0",
"babel-loader": "^8.2.2",
"babel-plugin-module-resolver": "^4.1.0",
"babel-preset-vue": "^2.0.2",
"cross-env": "^7.0.3",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-jsdoc": "^36.0.8",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^7.6.0",
"husky": "^4.3.8",
"eslint-plugin-vue": "^7.17.0",
"husky": "^7.0.2",
"jsdom": "^17.0.0",
"jsdom-global": "^3.0.2",
"prettier": "^2.2.1",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"require-extension-hooks": "^0.3.3",
"require-extension-hooks-babel": "^1.0.0",
"require-extension-hooks-vue": "^3.0.0",
"rollup": "^2.39.0",
"rollup": "^2.56.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-scss": "^3.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-vue": "^6.0.0",
"shipjs": "^0.23.0",
"typescript": "^4.1.5",
"vue": "^2.6.12",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12"
"sass": "^1.39.0",
"shipjs": "^0.23.3",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"typescript": "^4.4.2",
"vue": "^2.6.14",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14"
},
"license": "MIT",
"author": {
"name": "Vinayak Kulkarni",
"email": "inbox.vinayak@gmail.com",
"url": "https://vinayakkulkarni.dev"
},
"keywords": [
"GitHub Icon",
"v-github-icon",
"git icon",
"vue component"
],
"author": {
"name": "Vinayak Kulkarni",
"email": "inbox.vinayak@gmail.com",
"url": "https://vinayakkulkarni.dev"
},
"license": "MIT",
"sideEffects": [
"*.css"
],
"repository": {
"url": "git+/~https://github.com/vinayakkulkarni/v-github-icon",
"type": "git"
Expand Down

0 comments on commit 37ccade

Please sign in to comment.