Skip to content

Commit 1bb78ea

Browse files
committed
Initial Commit
1 parent 4996bf5 commit 1bb78ea

18 files changed

Lines changed: 9586 additions & 0 deletions

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
[*]
5+
end_of_line = crlf
6+
insert_final_newline = true
7+
8+
# Matches multiple files with brace expansion notation
9+
# Set default charset
10+
[*.{js,ts,tsx,json}]
11+
charset = utf-8
12+
indent_style = space
13+
indent_size = 2

.eslintrc.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
ecmaFeatures: {
5+
jsx: true,
6+
},
7+
},
8+
settings: {
9+
react: {
10+
version: 'detect',
11+
},
12+
},
13+
rules: {
14+
// Indentation rule
15+
indent: 0,
16+
'@typescript-eslint/indent': ['error', 2],
17+
18+
// Force single quotes
19+
quotes: ['error', 'single'],
20+
21+
// Allow logs
22+
'no-console': 1,
23+
24+
// Force no ununsed variables
25+
'no-unused-vars': 2,
26+
27+
// Allow object type
28+
'@typescript-eslint/ban-types': 0,
29+
30+
// Force windows linebreak styles
31+
'linebreak-style': [2, 'unix'],
32+
33+
// Force semicolons
34+
semi: [2, 'always'],
35+
36+
// Turn off explicit return type
37+
'@typescript-eslint/explicit-function-return-type': 0,
38+
39+
// Turn off interface name prefixing
40+
'@typescript-eslint/interface-name-prefix': 0,
41+
42+
// React rules
43+
'react/display-name': 0,
44+
'react/forbid-prop-types': 0,
45+
'react/jsx-closing-bracket-location': 1,
46+
'react/jsx-curly-spacing': 1,
47+
'react/jsx-handler-names': 1,
48+
'react/jsx-indent': ['warn', 2],
49+
'react/jsx-key': 1,
50+
'react/jsx-max-props-per-line': 0,
51+
'react/jsx-no-bind': 0,
52+
'react/jsx-no-duplicate-props': 1,
53+
'react/jsx-no-literals': 0,
54+
'react/jsx-no-undef': 1,
55+
'react/jsx-pascal-case': 1,
56+
'react/jsx-sort-prop-types': 0,
57+
'react/jsx-sort-props': 0,
58+
'react/jsx-uses-react': 1,
59+
'react/jsx-uses-vars': 1,
60+
'react/no-danger': 1,
61+
'react/no-deprecated': 1,
62+
'react/no-did-mount-set-state': 1,
63+
'react/no-did-update-set-state': 1,
64+
'react/no-direct-mutation-state': 1,
65+
'react/no-is-mounted': 1,
66+
'react/no-multi-comp': 0,
67+
'react/no-set-state': 1,
68+
'react/no-string-refs': 0,
69+
'react/no-unknown-property': 1,
70+
'react/prefer-es6-class': 1,
71+
'react/react-in-jsx-scope': 1,
72+
'react/self-closing-comp': 1,
73+
'react/sort-comp': 1,
74+
75+
// React Hooks rules
76+
'react-hooks/rules-of-hooks': 'error',
77+
'react-hooks/exhaustive-deps': 'warn',
78+
},
79+
env: {
80+
browser: true,
81+
es6: true,
82+
node: true,
83+
},
84+
plugins: ['react', 'react-hooks', '@typescript-eslint'],
85+
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
86+
};

.gitignore

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Bower dependency directory
28+
bower_components
29+
30+
# node-waf configuration
31+
.lock-wscript
32+
33+
# Compiled binary addons
34+
build/Release
35+
36+
# Dependency directories
37+
node_modules/
38+
jspm_packages/
39+
40+
# TypeScript v1 declaration files
41+
typings/
42+
43+
# Optional npm cache directory
44+
.npm
45+
46+
# Optional eslint cache
47+
.eslintcache
48+
49+
# Optional REPL history
50+
.node_repl_history
51+
52+
# Output of 'npm pack'
53+
*.tgz
54+
55+
# Yarn Integrity file
56+
.yarn-integrity
57+
58+
# dotenv environment variables file
59+
.env
60+
.env.test
61+
62+
# Ignore Visual Studio Code folder
63+
.vscode/
64+
65+
# Ignore VSTS extension builds
66+
*.vsix
67+
68+
# Ignore lib necessary only for debugging
69+
lib/
70+
71+
# Ignore SSL private keys and certificates
72+
*.crt
73+
*.key
74+
*.pem
75+
*.srl
76+
*.csr
77+
78+
# Ignore openssl config for generating self-signed SSL certificate for debug
79+
openssl.conf
80+
81+
# Ignore webpack build
82+
dist/

azure-devops-extension-dev.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id":"RestDataMappingPicklistDev",
3+
"version": "0.1.0",
4+
"baseUri": "https://localhost:44300"
5+
}

azure-devops-extension.json

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"manifestVersion": 1.0,
3+
"id": "RestDataMappingPicklist",
4+
"publisher": "dedac",
5+
"version": "0.1.0",
6+
"name": "Rest Data Mapping Picklist",
7+
"description": "Load work item values from a specified REST endpoint and map additional REST data to your work item",
8+
"public": false,
9+
"icons": {
10+
"default": "img/logo.png"
11+
},
12+
"categories": [
13+
"Azure Boards"
14+
],
15+
"targets": [
16+
{
17+
"id": "Microsoft.VisualStudio.Services.Cloud"
18+
}
19+
],
20+
"scopes": [
21+
"vso.work",
22+
"vso.work_write"
23+
],
24+
"contributions": [
25+
{
26+
"id": "rest-data-mapping-picklist",
27+
"type": "ms.vss-work-web.work-item-form-control",
28+
"targets": [
29+
"ms.vss-work-web.work-item-form"
30+
],
31+
"properties": {
32+
"name": "Rest Data Mapping Picklist",
33+
"uri": "/dist/selector.html",
34+
"height" : 74,
35+
36+
"inputs": [
37+
{
38+
"id": "FieldName",
39+
"name": "Select the field for this control.",
40+
"description": "The field associated with the control.",
41+
"type": "WorkItemField",
42+
"properties": {
43+
"workItemFieldTypes": ["String", "PlainText", "HTML"]
44+
},
45+
"validation": {
46+
"dataType": "String",
47+
"isRequired": true
48+
}
49+
},
50+
{
51+
"id": "RestServiceKeyField",
52+
"name": "Rest Service Key Field",
53+
"description": "Select the key field from the rest service that matches the control field",
54+
"validation": {
55+
"dataType": "String",
56+
"isRequired": true
57+
}
58+
},
59+
{
60+
"id": "RestServiceAddress",
61+
"name": "Rest Service Address",
62+
"description": "The URL to load the rest service",
63+
"validation": {
64+
"dataType": "String",
65+
"isRequired": true
66+
}
67+
},
68+
{
69+
"id": "RestServiceUserName",
70+
"name": "Rest Service User Name",
71+
"description": "The name of the property to load from the rest service",
72+
"validation": {
73+
"dataType": "String",
74+
"isRequired": false
75+
}
76+
},
77+
{
78+
"id": "RestServicePassword",
79+
"name": "Rest Service Password",
80+
"description": "Rest Service Password",
81+
"inputMode": "PasswordBox",
82+
"isConfidential": true,
83+
"validation": {
84+
"isRequired": true,
85+
"dataType": "String"
86+
}
87+
},
88+
{
89+
"id": "ErrorMessage",
90+
"name": "Property not found error message",
91+
"description": "Error message to display if the property is not available",
92+
"validation": {
93+
"isRequired": false,
94+
"dataType": "String"
95+
}
96+
},
97+
{
98+
"id": "RestCallParameters",
99+
"name": "Rest Call URL Parameters (JSON format)",
100+
"description": "Rest Service Password",
101+
"inputMode": "TextArea",
102+
"validation": {
103+
"isRequired": false,
104+
"dataType": "String"
105+
}
106+
},
107+
{
108+
"id": "FieldMap",
109+
"name": "Rest Service Field Map",
110+
"description": "Map additional rest service fields with JSON to Work Item Fields",
111+
"inputMode": "TextArea",
112+
"validation": {
113+
"isRequired": false,
114+
"dataType": "String"
115+
}
116+
}
117+
]
118+
}
119+
}
120+
],
121+
"files": [
122+
{
123+
"path": "dist",
124+
"addressable": true
125+
}
126+
]
127+
}

img/Logo.png

2.47 KB
Loading

0 commit comments

Comments
 (0)