Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format using dprint #797

Merged
merged 2 commits into from
Jan 31, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"excludes": [
"./examples-testing",
"./three.js",
"pnpm-lock.yaml"
],
"prettier": {
"associations": [
"**/*.{yaml,yml}"
],
"yml.tabWidth": 2,
"yaml.tabWidth": 2,
"yml.singleQuote": true,
"yaml.singleQuote": true
},
"plugins": [
"https://plugins.dprint.dev/typescript-0.88.8.wasm",
"https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/prettier-0.32.1.json@19aa403ef0862ba8c41164e3dc6f84c0b7a66c2b11e42726b23dd25e6302ada9"
],
"indentWidth": 4,
"lineWidth": 120,
"json": {
"trailingCommas": "never" // Our tsconfig files must be parsable by JSON.parse.
}
}
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ['plugin:@definitelytyped/all'],
extends: ["plugin:@definitelytyped/all"],
};
128 changes: 64 additions & 64 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
name: CI
on:
pull_request: {}
pull_request: {}

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: 'three-ts-types'
- uses: actions/checkout@v4
with:
repository: 'DefinitelyTyped/DefinitelyTyped'
path: 'DefinitelyTyped'
filter: blob:none
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: rsync -av three-ts-types/types/three/ DefinitelyTyped/types/three
- run: git add -A
working-directory: 'DefinitelyTyped'
- run: git config --global user.email "nbierema@gmail.com"
- run: git config --global user.name "Nathan Bierema"
- run: git commit -m "Changes"
working-directory: 'DefinitelyTyped'
- run: pnpm install --filter . --filter '...[origin/master]'
working-directory: 'DefinitelyTyped'
- run: pnpm run test-all
working-directory: 'DefinitelyTyped'
check-fomatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install
- run: pnpm run format-check
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install
- run: pnpm run create-examples
working-directory: examples-testing
- run: git apply changes.patch
working-directory: examples-testing
- run: pnpm run type-check
working-directory: examples-testing
- run: pnpm run format-check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: 'three-ts-types'
- uses: actions/checkout@v4
with:
repository: 'DefinitelyTyped/DefinitelyTyped'
path: 'DefinitelyTyped'
filter: blob:none
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: rsync -av three-ts-types/types/three/ DefinitelyTyped/types/three
- run: git add -A
working-directory: 'DefinitelyTyped'
- run: git config --global user.email "nbierema@gmail.com"
- run: git config --global user.name "Nathan Bierema"
- run: git commit -m "Changes"
working-directory: 'DefinitelyTyped'
- run: pnpm install --filter . --filter '...[origin/master]'
working-directory: 'DefinitelyTyped'
- run: pnpm run test-all
working-directory: 'DefinitelyTyped'
check-fomatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install
- run: pnpm run format-check
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install
- run: pnpm run create-examples
working-directory: examples-testing
- run: git apply changes.patch
working-directory: examples-testing
- run: pnpm run type-check
working-directory: examples-testing
- run: pnpm run format-check
File renamed without changes.
3 changes: 0 additions & 3 deletions notNeededPackages.json

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"test-all": "node --require source-map-support/register node_modules/@definitelytyped/dtslint-runner/ --path .",
"test": "node --require source-map-support/register node_modules/@definitelytyped/dtslint/ types/three",
"lint": "node --require source-map-support/register node_modules/@definitelytyped/dtslint/ types/three",
"format": "prettier --write .",
"format-check": "prettier --check ."
"format": "dprint fmt",
"format-check": "dprint check"
},
"devDependencies": {
"@definitelytyped/definitions-parser": "latest",
"@definitelytyped/dts-critic": "latest",
"@definitelytyped/dtslint": "latest",
"@definitelytyped/dtslint-runner": "latest",
"@definitelytyped/eslint-plugin": "latest",
Expand All @@ -18,7 +19,7 @@
"@definitelytyped/utils": "latest",
"@types/stats.js": "*",
"@types/webxr": "*",
"prettier": "2.8.8",
"dprint": "^0.45.0",
"source-map-support": "^0.5.21",
"typescript": "latest"
}
Expand Down
Loading
Loading