Skip to content

Commit 2d585b6

Browse files
committed
chore: add vscode recommendations; jira commit tagging
1 parent f251895 commit 2d585b6

File tree

4 files changed

+142
-2
lines changed

4 files changed

+142
-2
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
yarn lint-staged --allow-empty

.husky/prepare-commit-msg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
#
3+
# ABOUT: a git prepare-commit-msg hook for automatically postfixing
4+
# an ticket number to commit messages based on the branch name
5+
6+
# check if commit is merge commit or a commit ammend
7+
[[ $2 = "merge" || $2 = "commit" ]] && exit
8+
9+
# Regex: looks for CSS or JIRA followed by either a dash, underscore, or nothing and then a number; case insensitive
10+
ISSUE_KEY=`git rev-parse --abbrev-ref HEAD | sed -r 's/^.*[CSS|JIRA][-|_]{0,1}([0-9]+).*$/CSS-\1/I'`
11+
12+
# If the parse above returns the full branch name, default to the original message
13+
# Must quote variable and the command to compare strings in bash
14+
[[ "$ISSUE_KEY" == "$(git rev-parse --abbrev-ref HEAD)" ]] && exit
15+
16+
# issue key matched from branch prefix, postfix to commit message
17+
TEMP=`mktemp /tmp/commitmsg-XXXXX`
18+
(echo "$(cat $1) [$ISSUE_KEY]") > $TEMP
19+
cat $TEMP > $1

.vscode/extensions.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"recommendations": [
3+
"rajdeepchandra.spectrum-design-tokens-for-vscode",
4+
"gruntfuggly.todo-tree",
5+
"nrwl.angular-console",
6+
"esbenp.prettier-vscode",
7+
"dbaeumer.vscode-eslint",
8+
"vunguyentuan.vscode-postcss",
9+
"mariusschulz.yarn-lock-syntax",
10+
"stylelint.vscode-stylelint",
11+
"joshbolduc.story-explorer",
12+
"bierner.lit-html",
13+
"atlassian.atlascode",
14+
"github.vscode-pull-request-github",
15+
"me-dutour-mathieu.vscode-github-actions",
16+
"github.vscode-github-actions",
17+
"kisstkondoros.csstriggers",
18+
"vunguyentuan.vscode-css-variables"
19+
]
20+
}

.vscode/settings.json

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,104 @@
11
{
2-
"js/ts.implicitProjectConfig.experimentalDecorators": true
2+
"js/ts.implicitProjectConfig.experimentalDecorators": true,
3+
"[css]": {
4+
"editor.defaultFormatter": "stylelint.vscode-stylelint"
5+
},
6+
"[javascript]": {
7+
"editor.codeActionsOnSave": {
8+
"source.organizeImports": true
9+
},
10+
"editor.colorDecorators": true,
11+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
12+
},
13+
"[markdown]": {
14+
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
15+
},
16+
"atlascode.bitbucket.enabled": false,
17+
"atlascode.jira.enabled": true,
18+
"atlascode.jira.jqlList": [
19+
{
20+
"enabled": true,
21+
"id": "6ec799fe-ae6a-46cd-86d8-ec19839a70e3",
22+
"monitor": true,
23+
"name": "Current sprint",
24+
"query": "\"Project\" = \"CSS\" AND sprint in openSprints ()",
25+
"siteId": "jira.corp.adobe.com"
26+
},
27+
{
28+
"enabled": true,
29+
"id": "6916b063-1a7b-411a-87eb-2e58c5a82ffa",
30+
"monitor": true,
31+
"name": "Assigned to me",
32+
"query": "assignee= currentUser() and status != Closed and status != Done",
33+
"siteId": "jira.corp.adobe.com"
34+
},
35+
{
36+
"enabled": true,
37+
"id": "fb78270c-9799-4b6a-aaa7-16badf452395",
38+
"monitor": true,
39+
"name": "Open CSS issues",
40+
"query": "status != Closed and status != Done AND \"Project\" = \"CSS\" ",
41+
"siteId": "jira.corp.adobe.com"
42+
}
43+
],
44+
"atlascode.jira.lastCreateSiteAndProject": {
45+
"projectKey": "CSS",
46+
"siteId": "jira.corp.adobe.com"
47+
},
48+
"atlascode.jira.workingSite": {
49+
"baseUrlSuffix": "jira.corp.adobe.com"
50+
},
51+
"editor.defaultFormatter": "esbenp.prettier-vscode",
52+
"emmet.includeLanguages": {
53+
"postcss": "css"
54+
},
55+
"emmet.syntaxProfiles": {
56+
"postcss": "css"
57+
},
58+
"eslint.packageManager": "yarn",
59+
"files.associations": {
60+
"*.css": "postcss"
61+
},
62+
"githubIssues.issueBranchTitle": "${author}/${sanitizedIssueTitle}-gh-${issueNumber}",
63+
"githubIssues.queries": [
64+
{
65+
"label": "My issues",
66+
"query": "default"
67+
},
68+
{
69+
"label": "Created issues",
70+
"query": "author:${user} state:open repo:${owner}/${repository} sort:created-desc"
71+
},
72+
{
73+
"label": "Recent issues",
74+
"query": "state:open repo:${owner}/${repository} sort:updated-desc"
75+
}
76+
],
77+
"githubPullRequests.queries": [
78+
{
79+
"label": "Waiting for my review",
80+
"query": "is:open review-requested:${user}"
81+
},
82+
{
83+
"label": "Assigned to me",
84+
"query": "is:open assignee:${user}"
85+
},
86+
{
87+
"label": "Created by me",
88+
"query": "is:open author:${user}"
89+
},
90+
{
91+
"label": "Mentioned me",
92+
"query": "is:open mentions:${user}"
93+
}
94+
],
95+
"prettier.configPath": ".prettierrc",
96+
"prettier.ignorePath": ".prettierignore",
97+
"prettier.prettierPath": "./node_modules/prettier",
98+
"stylelint.packageManager": "yarn",
99+
"stylelint.reportNeedlessDisables": true,
100+
"stylelint.validate": ["css", "postcss"],
101+
"yaml.schemas": {
102+
"~/.vscode/extensions/atlassian.atlascode-3.0.4/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
103+
}
3104
}

0 commit comments

Comments
 (0)