Skip to content

Commit

Permalink
Merge pull request #25 from microsoft/main
Browse files Browse the repository at this point in the history
HaLaGu1L btc
  • Loading branch information
HaLaGu1L authored Jan 10, 2025
2 parents 7b7c63c + 4dd6e8e commit a62e1af
Show file tree
Hide file tree
Showing 177 changed files with 3,116 additions and 2,040 deletions.
32 changes: 32 additions & 0 deletions .eslint-plugin-local/vscode-dts-use-export.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*---------------------------------------------------------------------------------------------
* 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/utils';
import * as eslint from 'eslint';

export = new class VscodeDtsUseExport implements eslint.Rule.RuleModule {

readonly meta: eslint.Rule.RuleMetaData = {
messages: {
useExport: `Public api types must use 'export'`,
},
schema: false,
};

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
return {
['TSModuleDeclaration :matches(TSInterfaceDeclaration, ClassDeclaration, VariableDeclaration, TSEnumDeclaration, TSTypeAliasDeclaration)']: (node: any) => {
const parent = (<TSESTree.Node>node).parent;
if (parent && parent.type !== TSESTree.AST_NODE_TYPES.ExportNamedDeclaration) {
context.report({
node,
messageId: 'useExport'
});
}
}
};
}
};

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
20.18.1
3 changes: 3 additions & 0 deletions build/azure-pipelines/product-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
sdl:
binskim:
enabled: false
justificationForDisabling: "BinSkim rebaselining is failing"
tsa:
enabled: true
configFile: $(Build.SourcesDirectory)/build/azure-pipelines/config/tsaoptions.json
Expand Down
4 changes: 2 additions & 2 deletions build/npm/preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]);

if (!process.env['VSCODE_SKIP_NODE_VERSION_CHECK']) {
if (majorNodeVersion < 20 || (majorNodeVersion === 20 && minorNodeVersion < 18)) {
console.error('\x1b[1;31m*** Please use Node.js v20.18.0 or later for development.\x1b[0;0m');
if (majorNodeVersion < 20 || (majorNodeVersion === 20 && minorNodeVersion < 18) || (majorNodeVersion === 20 && minorNodeVersion === 18 && patchNodeVersion < 1)) {
console.error('\x1b[1;31m*** Please use Node.js v20.18.1 or later for development.\x1b[0;0m');
throw new Error();
}
}
Expand Down
Loading

0 comments on commit a62e1af

Please sign in to comment.