Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat/6 add git hooks #8

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript/recommended', '@vue/eslint-config-prettier', 'plugin:storybook/recommended', 'plugin:storybook/recommended'],
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
'plugin:storybook/recommended',
'plugin:storybook/recommended',
],
parserOptions: {
ecmaVersion: 'latest'
ecmaVersion: 'latest',
},
rules: {
'prettier/prettier': ['error', {
singleQuote: true,
trailingComma: 'es5',
printWidth: 80,
tabWidth: 2,
semi: true,
bracketSpacing: true,
arrowParens: 'always',
jsxBracketSameLine: false,
vueIndentScriptAndStyle: false
}],
'vue/multi-word-component-names': 0
}
};
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'es5',
printWidth: 80,
tabWidth: 2,
semi: true,
bracketSpacing: true,
arrowParens: 'always',
jsxBracketSameLine: false,
vueIndentScriptAndStyle: false,
},
],
'vue/multi-word-component-names': 0,
},
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ coverage
*.njsproj
*.sln
*.sw?

yarn.lock
package-lock.json
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"prepare": "husky install"
},
"dependencies": {
"vue": "^3.2.37"
Expand All @@ -49,8 +50,11 @@
"eslint": "^8.21.0",
"eslint-plugin-storybook": "^0.6.4",
"eslint-plugin-vue": "^9.3.0",
"husky": "^8.0.0",
"jsdom": "^20.0.0",
"lint-staged": "^13.0.3",
"npm-run-all": "^4.1.5",
"pinst": "^3.0.0",
"postcss": "^8.4.16",
"prettier": "^2.7.1",
"tailwindcss": "^3.1.8",
Expand All @@ -59,5 +63,8 @@
"vitest": "^0.21.0",
"vue-loader": "^16.8.3",
"vue-tsc": "^0.39.5"
},
"lint-staged": {
"*.vue": "eslint --fix"
}
}
3 changes: 2 additions & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-env node */
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
};
2 changes: 1 addition & 1 deletion src/components/Button/Button.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import './button.css';
import { reactive, computed } from 'vue';
import { computed } from 'vue';
export interface Props {
label?: string;
type: string;
Expand Down
Loading