Skip to content

Commit

Permalink
Run dprint on json (microsoft#55602)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Sep 1, 2023
1 parent 512d632 commit 0f91f7d
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"include": ["src/**", "built/local/**"],
"exclude": ["**/node_modules/**"],
"mergeAsync": true
}
}
3 changes: 2 additions & 1 deletion .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.86.1.wasm",
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe"
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe",
"https://plugins.dprint.dev/json-0.17.4.wasm"
]
}
12 changes: 8 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"plugin:@typescript-eslint/stylistic"
],
"plugins": [
"@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort"
"@typescript-eslint",
"no-null",
"eslint-plugin-local",
"simple-import-sort"
],
"ignorePatterns": [
"**/node_modules/**",
Expand Down Expand Up @@ -113,7 +116,7 @@
"local/only-arrow-functions": [
"error",
{
"allowNamedFunctions": true ,
"allowNamedFunctions": true,
"allowDeclarations": true
}
],
Expand All @@ -133,7 +136,7 @@
"overrides": [
// By default, the ESLint CLI only looks at .js files. But, it will also look at
// any files which are referenced in an override config. Most users of typescript-eslint
// get this behavior by default by extending a recommended typescript-eslint config, which
// get this behavior by default by extending a recommended typescript-eslint config, which
// just so happens to override some core ESLint rules. We don't extend from any config, so
// explicitly reference TS files here so the CLI picks them up.
//
Expand All @@ -146,7 +149,8 @@
"files": ["*.mjs", "*.mts"],
"rules": {
// These globals don't exist outside of CJS files.
"no-restricted-globals": ["error",
"no-restricted-globals": [
"error",
{ "name": "__filename" },
{ "name": "__dirname" },
{ "name": "require" },
Expand Down
10 changes: 5 additions & 5 deletions .github/workflow-resources/.lsifrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"project": "../../src/tsconfig.json",
"source": "../../package.json",
"package": "../../package.json",
"out": "../../typescript.lsif"
}
"project": "../../src/tsconfig.json",
"source": "../../package.json",
"package": "../../package.json",
"out": "../../typescript.lsif"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"unwantedRecommendations": [
"ms-vscode.vscode-typescript-tslint-plugin"
]
}
}
98 changes: 49 additions & 49 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copy this file into '.vscode/launch.json' or merge its
contents into your existing configurations.
Expand All @@ -13,52 +13,52 @@
*/

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests (currently opened test)",
"runtimeArgs": ["--nolazy"],
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"bdd",
"--no-timeouts",
"--colors",
"built/local/run.js",
"-f",
// You can change this to be the name of a specific test file (without the file extension)
// to consistently launch the same test
"${fileBasenameNoExtension}",
"--skip-percent",
"0"
],
"env": {
"NODE_ENV": "testing"
},
"outFiles": [
"${workspaceFolder}/built/**/*.js",
"${workspaceFolder}/built/**/*.mjs",
"${workspaceFolder}/built/**/*.cjs",
"!**/node_modules/**"
],
"sourceMaps": true,
"smartStep": true,
"preLaunchTask": "npm: build:tests",
"console": "integratedTerminal",
"customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue"
},
{
// See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code
"type": "node",
"request": "attach",
"name": "Attach to VS Code TS Server via Port",
"processId": "${command:PickProcess}",
"customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue"
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests (currently opened test)",
"runtimeArgs": ["--nolazy"],
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"bdd",
"--no-timeouts",
"--colors",
"built/local/run.js",
"-f",
// You can change this to be the name of a specific test file (without the file extension)
// to consistently launch the same test
"${fileBasenameNoExtension}",
"--skip-percent",
"0"
],
"env": {
"NODE_ENV": "testing"
},
"outFiles": [
"${workspaceFolder}/built/**/*.js",
"${workspaceFolder}/built/**/*.mjs",
"${workspaceFolder}/built/**/*.cjs",
"!**/node_modules/**"
],
"sourceMaps": true,
"smartStep": true,
"preLaunchTask": "npm: build:tests",
"console": "integratedTerminal",
"customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue"
},
{
// See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code
"type": "node",
"request": "attach",
"name": "Attach to VS Code TS Server via Port",
"processId": "${command:PickProcess}",
"customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"problemMatcher": [
"$tsc"
]
},
}
]
}
3 changes: 2 additions & 1 deletion scripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},

"include": [
"**/*.mjs", "**/*.cjs"
"**/*.mjs",
"**/*.cjs"
]
}
3 changes: 2 additions & 1 deletion src/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"rules": {
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"no-restricted-globals": ["error",
"no-restricted-globals": [
"error",
{ "name": "setTimeout" },
{ "name": "clearTimeout" },
{ "name": "setInterval" },
Expand Down
8 changes: 4 additions & 4 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5294,7 +5294,7 @@
"category": "Error",
"code": 6258
},
"Found 1 error in {0}": {
"Found 1 error in {0}": {
"category": "Message",
"code": 6259
},
Expand Down Expand Up @@ -6276,9 +6276,9 @@
"category": "Message",
"code": 6930
},
"List of file name suffixes to search when resolving a module." : {
"category": "Error",
"code": 6931
"List of file name suffixes to search when resolving a module.": {
"category": "Error",
"code": 6931
},

"Variable '{0}' implicitly has an '{1}' type.": {
Expand Down
3 changes: 1 addition & 2 deletions src/compiler/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"types": ["node"]
},

"references": [
],
"references": [],

"include": ["**/*"]
}
6 changes: 4 additions & 2 deletions src/harness/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "../tsconfig-base",
"compilerOptions": {
"types": [
"node", "mocha", "chai"
"node",
"mocha",
"chai"
]
},
"references": [
Expand All @@ -11,7 +13,7 @@
{ "path": "../jsTyping" },
{ "path": "../server" },
{ "path": "../typingsInstallerCore" },
{ "path": "../deprecatedCompat" },
{ "path": "../deprecatedCompat" }
],

"include": ["**/*"]
Expand Down
4 changes: 2 additions & 2 deletions src/server/typesMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
"passport": "passport",
"passport-local": "passport-local",
"path": "pathjs",
"pdfkit":"pdfkit",
"pdfkit": "pdfkit",
"peer": "peerjs",
"peg": "pegjs",
"photoswipe": "photoswipe",
Expand Down Expand Up @@ -494,4 +494,4 @@
"ZeroClipboard": "zeroclipboard",
"ZSchema-browser": "z-schema"
}
}
}
6 changes: 4 additions & 2 deletions src/testRunner/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "../tsconfig-base",
"compilerOptions": {
"types": [
"node", "mocha", "chai"
"node",
"mocha",
"chai"
]
},
"references": [
Expand All @@ -13,7 +15,7 @@
{ "path": "../server" },
{ "path": "../typingsInstallerCore" },
{ "path": "../deprecatedCompat" },
{ "path": "../harness" },
{ "path": "../harness" }
],
"include": ["**/*"]
}
2 changes: 1 addition & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
{ "path": "./typescript" },
{ "path": "./typingsInstaller" },
{ "path": "./typingsInstallerCore" },
{ "path": "./watchGuard" },
{ "path": "./watchGuard" }
]
}
4 changes: 2 additions & 2 deletions src/tsserver/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../tsconfig-base",

"compilerOptions": {
"types": [
"node"
Expand All @@ -10,7 +10,7 @@
{ "path": "../compiler" },
{ "path": "../services" },
{ "path": "../jsTyping" },
{ "path": "../server" },
{ "path": "../server" }
],
"include": ["**/*"]
}

0 comments on commit 0f91f7d

Please sign in to comment.