-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
149 lines (149 loc) · 4.12 KB
/
Copy pathpackage.json
File metadata and controls
149 lines (149 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"name": "wl-sql",
"displayName": "WL SQL",
"description": "Coding Convention",
"version": "0.0.4",
"engines": {
"vscode": "^1.74.0"
},
"publisher": "RithyTep",
"repository": {
"type": "git",
"url": "https://github.com/RithyTep/wl-sql"
},
"license": "MIT",
"categories": [
"Formatters",
"Linters",
"Snippets"
],
"activationEvents": [
"onLanguage:sql"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "wl-sql.formatDocument",
"title": "Format SQL Document (WL Convention)",
"category": "WL SQL"
},
{
"command": "wl-sql.formatSelection",
"title": "Format SQL Selection (WL Convention)",
"category": "WL SQL"
},
{
"command": "wl-sql.validateDocument",
"title": "Validate SQL Convention",
"category": "WL SQL"
}
],
"keybindings": [
{
"command": "wl-sql.formatDocument",
"key": "shift+alt+f",
"when": "editorLangId == sql"
}
],
"languages": [
{
"id": "sql",
"aliases": [
"SQL",
"sql"
],
"extensions": [
".sql"
]
}
],
"snippets": [
{
"language": "sql",
"path": "./snippets/sql-snippets.json"
}
],
"configuration": {
"type": "object",
"title": "WL SQL Configuration",
"properties": {
"wl-sql.enableFormatOnSave": {
"type": "boolean",
"default": true,
"description": "Enable automatic formatting on save"
},
"wl-sql.enableLinting": {
"type": "boolean",
"default": true,
"description": "Enable SQL convention linting"
},
"wl-sql.useBaseFormatter": {
"type": "boolean",
"default": true,
"description": "Use poor-mans-t-sql-formatter as base formatter before applying WL conventions"
},
"wl-sql.maxLineWidth": {
"type": "number",
"default": 120,
"description": "Maximum line width for formatted SQL"
},
"wl-sql.expandCommaLists": {
"type": "boolean",
"default": true,
"description": "Expand comma-separated lists (SELECT columns, etc.) to separate lines"
},
"wl-sql.trailingCommas": {
"type": "boolean",
"default": true,
"description": "Place commas at the end of lines (vs beginning)"
},
"wl-sql.expandBooleanExpressions": {
"type": "boolean",
"default": true,
"description": "Expand AND/OR conditions to separate lines"
},
"wl-sql.expandCaseStatements": {
"type": "boolean",
"default": true,
"description": "Expand CASE statements with each WHEN on a separate line"
},
"wl-sql.breakJoinOnSections": {
"type": "boolean",
"default": true,
"description": "Put JOIN ON conditions on separate lines"
},
"wl-sql.addNoLock": {
"type": "boolean",
"default": true,
"description": "Automatically add WITH(NOLOCK) to table references"
},
"wl-sql.minNvarcharLength": {
"type": "number",
"default": 200,
"description": "Minimum length for NVARCHAR when unknown (linting warning)"
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"test-compile": "tsc -p ./",
"test": "mocha -r ts-node/register 'src/test/formatter.test.ts' --exit"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/vscode": "^1.74.0",
"esbuild": "^0.17.11",
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
"dependencies": {
"poor-mans-t-sql-formatter": "^1.6.10"
}
}