Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true
}

8 changes: 8 additions & 0 deletions build/ci/templates/build_compile_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ jobs:
vmImage: "macos-latest"
steps:
- template: build_compile_steps.yml

- job: Prettier
variables:
build: false
pool:
vmImage: "macos-latest"
steps:
- template: prettier_format.yml
27 changes: 27 additions & 0 deletions build/ci/templates/prettier_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
steps:
- task: NodeTool@0
displayName: "Use Node $(NodeVersion)"
inputs:
versionSpec: $(NodeVersion)

- task: Npm@1
displayName: "Use NPM $(NpmVersion)"
inputs:
command: custom
verbose: true
customCommand: "install -g npm@$(NpmVersion)"

- task: Npm@1
displayName: "npm ci"
inputs:
command: custom
verbose: true
customCommand: ci
# Check if all files are properly formatted
#
# Example command line (windows pwsh):
# > npm run prettier:check
- bash: |
npm run prettier:check
displayName: "Prettier formatting check"
failOnStderr: true
84 changes: 63 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,8 @@
"dump-datascience-webpack-stats": "npx -n --max_old_space_size=4096 webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json",
"compile-webviews": "gulp compile-webviews",
"compile-webviews-verbose": "npx webpack --config webpack.datascience-ui.config.js",
"prettier:format": "prettier --write '{src,uitests}/**/*.{ts,tsx,js,css}'",
"prettier:check": "prettier --check '{src,uitests}/**/*.{ts,tsx,js,css}'",
"postinstall": "node ./node_modules/vscode/bin/install && node ./build/ci/postInstall.js",
"test": "node ./out/test/standardTest.js && node ./out/test/multiRootTest.js",
"test:unittests": "mocha --opts ./build/.mocha.unittests.js.opts",
Expand Down Expand Up @@ -2411,6 +2413,7 @@
"node-has-native-dependencies": "^1.0.2",
"node-html-parser": "^1.1.13",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"raw-loader": "^0.5.1",
"react": "^16.5.2",
"react-data-grid": "^6.0.2-0",
Expand Down