Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
* Adding linting and prettier for staged files
* Using Compile instead of build for launch task for vscode
  • Loading branch information
muthurathinam-m committed Feb 5, 2019
1 parent c8f925b commit a5781ac
Show file tree
Hide file tree
Showing 9 changed files with 1,896 additions and 102 deletions.
8 changes: 4 additions & 4 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"hooks": {
"pre-commit": "npm run lint && npm run format && npm run build && npm run test"
}
}
"hooks": {
"pre-commit": "npm run lint && lint-staged && npm run test"
}
}
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"esnext": "true"
"esnext": "true"
}
9 changes: 9 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"*.css": ["npm run format:css", "git add"],
"*.html": ["npm run format:html", "git add"],
"*.js": ["npm run format:js", "git add"],
"*.json": ["npm run format:json", "git add"],
"*.md": ["npm run format:md", "git add"],
".*rc": ["npm run format:rc", "git add"],
"*.ts": ["npm run format:ts", "git add"]
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"tabWidth": 4,
"trailingComma": "all",
"useTabs": true
}
}
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/core/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Build",
"preLaunchTask": "Run Compile",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
},
Expand All @@ -31,7 +31,7 @@
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/spec/development/workload/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Build",
"preLaunchTask": "Run Compile",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
},
Expand All @@ -42,7 +42,7 @@
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/middleware/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Build",
"preLaunchTask": "Run Compile",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
},
Expand All @@ -53,7 +53,7 @@
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["${workspaceRoot}/lib/spec/content/*.js"],
"cwd": "${workspaceRoot}",
"preLaunchTask": "Run Build",
"preLaunchTask": "Run Compile",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
}
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "2.0.0",
"tasks": [
{
"label": "Run Build",
"label": "Run Compile",
"type": "npm",
"script": "build",
"script": "compile",
"group": "build"
}
]
Expand Down
Loading

0 comments on commit a5781ac

Please sign in to comment.