Skip to content

Commit a5781ac

Browse files
Changes
* Adding linting and prettier for staged files * Using Compile instead of build for launch task for vscode
1 parent c8f925b commit a5781ac

File tree

9 files changed

+1896
-102
lines changed

9 files changed

+1896
-102
lines changed

.huskyrc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"hooks": {
3-
"pre-commit": "npm run lint && npm run format && npm run build && npm run test"
4-
}
5-
}
2+
"hooks": {
3+
"pre-commit": "npm run lint && lint-staged && npm run test"
4+
}
5+
}

.jshintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"esnext": "true"
2+
"esnext": "true"
33
}

.lintstagedrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"*.css": ["npm run format:css", "git add"],
3+
"*.html": ["npm run format:html", "git add"],
4+
"*.js": ["npm run format:js", "git add"],
5+
"*.json": ["npm run format:json", "git add"],
6+
"*.md": ["npm run format:md", "git add"],
7+
".*rc": ["npm run format:rc", "git add"],
8+
"*.ts": ["npm run format:ts", "git add"]
9+
}

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"tabWidth": 4,
1111
"trailingComma": "all",
1212
"useTabs": true
13-
}
13+
}

.vscode/launch.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
2121
"args": ["${workspaceRoot}/lib/spec/core/*.js"],
2222
"cwd": "${workspaceRoot}",
23-
"preLaunchTask": "Run Build",
23+
"preLaunchTask": "Run Compile",
2424
"outFiles": [],
2525
"internalConsoleOptions": "openOnSessionStart"
2626
},
@@ -31,7 +31,7 @@
3131
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
3232
"args": ["${workspaceRoot}/spec/development/workload/*.js"],
3333
"cwd": "${workspaceRoot}",
34-
"preLaunchTask": "Run Build",
34+
"preLaunchTask": "Run Compile",
3535
"outFiles": [],
3636
"internalConsoleOptions": "openOnSessionStart"
3737
},
@@ -42,7 +42,7 @@
4242
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
4343
"args": ["${workspaceRoot}/lib/spec/middleware/*.js"],
4444
"cwd": "${workspaceRoot}",
45-
"preLaunchTask": "Run Build",
45+
"preLaunchTask": "Run Compile",
4646
"outFiles": [],
4747
"internalConsoleOptions": "openOnSessionStart"
4848
},
@@ -53,7 +53,7 @@
5353
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
5454
"args": ["${workspaceRoot}/lib/spec/content/*.js"],
5555
"cwd": "${workspaceRoot}",
56-
"preLaunchTask": "Run Build",
56+
"preLaunchTask": "Run Compile",
5757
"outFiles": [],
5858
"internalConsoleOptions": "openOnSessionStart"
5959
}

.vscode/tasks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Run Build",
7+
"label": "Run Compile",
88
"type": "npm",
9-
"script": "build",
9+
"script": "compile",
1010
"group": "build"
1111
}
1212
]

0 commit comments

Comments
 (0)