forked from posit-dev/positron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 1.82.0 from upstream (posit-dev#1338)
* Merge remote-tracking branch 'origin/main' into merge/1.82.0 * Merge remote-tracking branch 'origin/main' into merge/1.82.0 * skip extension alignment for test purposes * update product.json API proposal enablements for 1.82 * use ubuntu compatible gssapi dev package name * add new gssapi dependency * update to node 18 on CI * Merge remote-tracking branch 'origin/feature/consume-ark-binaries' into merge/1.82.0 * use node version for universal app too * restore nls.metadata.json workaround * merge codicons * set up nvm before using it * load correct node version before running yarn * update strategy for aligning x64/arm64 content * adapt to property => accessor format for snap() * remove failing ws-alignment tests * Merge remote-tracking branch 'origin/feature/consume-ark-binaries' into merge/1.82.0 * Merge tag '1.82.0' into merge/1.82.0 Lead-authored-by: Jonathan McPherson <[email protected]> Co-authored-by: positron-bot[bot] <173392469+positron-bot[bot]@users.noreply.github.com> Signed-off-by: Jonathan McPherson <[email protected]>
- Loading branch information
1 parent
35a88da
commit d3880a3
Showing
2,036 changed files
with
105,317 additions
and
39,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as eslint from 'eslint'; | ||
import { join } from 'path'; | ||
|
||
|
||
export = new class ApiProviderNaming implements eslint.Rule.RuleModule { | ||
|
||
readonly meta: eslint.Rule.RuleMetaData = { | ||
messages: { | ||
amdX: 'Use `import type` for import declarations, use `amdX#importAMDNodeModule` for import expressions' | ||
} | ||
}; | ||
|
||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { | ||
|
||
const modules = new Set<string>(); | ||
|
||
try { | ||
const { dependencies, optionalDependencies } = require(join(__dirname, '../package.json')); | ||
const all = Object.keys(dependencies).concat(Object.keys(optionalDependencies)); | ||
for (const key of all) { | ||
modules.add(key); | ||
} | ||
|
||
} catch (e) { | ||
console.error(e); | ||
throw e; | ||
} | ||
|
||
|
||
const checkImport = (node: any) => { | ||
|
||
if (node.type !== 'Literal' || typeof node.value !== 'string') { | ||
return; | ||
} | ||
|
||
if (node.parent.importKind === 'type') { | ||
return; | ||
} | ||
|
||
if (!modules.has(node.value)) { | ||
return; | ||
} | ||
|
||
context.report({ | ||
node, | ||
messageId: 'amdX' | ||
}); | ||
} | ||
|
||
return { | ||
['ImportExpression Literal']: checkImport, | ||
['ImportDeclaration Literal']: checkImport | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as eslint from 'eslint'; | ||
|
||
export = new class ApiProviderNaming implements eslint.Rule.RuleModule { | ||
|
||
readonly meta: eslint.Rule.RuleMetaData = { | ||
messages: { | ||
slow: 'Native private fields are much slower and should only be used when needed. Ignore this warning if you know what you are doing, use compile-time private otherwise. See https://github.com/microsoft/vscode/issues/185991#issuecomment-1614468158 for details', | ||
} | ||
}; | ||
|
||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { | ||
|
||
return { | ||
['PropertyDefinition PrivateIdentifier']: (node: any) => { | ||
context.report({ | ||
node, | ||
messageId: 'slow' | ||
}); | ||
}, | ||
['MethodDefinition PrivateIdentifier']: (node: any) => { | ||
context.report({ | ||
node, | ||
messageId: 'slow' | ||
}); | ||
} | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { TSESTree } from '@typescript-eslint/experimental-utils'; | ||
import * as eslint from 'eslint'; | ||
|
||
function isCallExpression(node: TSESTree.Node): node is TSESTree.CallExpression { | ||
return node.type === 'CallExpression'; | ||
} | ||
|
||
function isFunctionExpression(node: TSESTree.Node): node is TSESTree.FunctionExpression { | ||
return node.type.includes('FunctionExpression'); | ||
} | ||
|
||
export = new class NoAsyncSuite implements eslint.Rule.RuleModule { | ||
|
||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { | ||
function hasAsyncSuite(node: any) { | ||
if (isCallExpression(node) && node.arguments.length >= 2 && isFunctionExpression(node.arguments[1]) && node.arguments[1].async) { | ||
return context.report({ | ||
node: node as any, | ||
message: 'suite factory function should never be async' | ||
}); | ||
} | ||
} | ||
|
||
return { | ||
['CallExpression[callee.name=/suite$/][arguments]']: hasAsyncSuite, | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.