Skip to content

Commit

Permalink
Merge branch 'main' into tagged-template-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Jun 17, 2022
2 parents 95b896b + 9f1983d commit e079811
Show file tree
Hide file tree
Showing 184 changed files with 5,289 additions and 2,547 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
{ "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
{ "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } },
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^([0-9]+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^([0-9]+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
{ "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
{ "selector": "property", "format": null }
],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"eslint.options": {
"rulePaths": ["./scripts/eslint/built/rules/"],
"ext": [".ts"]
"extensions": [".ts"]
},
// To use the last-known-good (LKG) compiler version:
// "typescript.tsdk": "lib"
Expand Down
4,016 changes: 1,753 additions & 2,263 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
"@octokit/rest": "latest",
"@types/chai": "latest",
"@types/convert-source-map": "latest",
"@types/fs-extra": "^9.0.13",
"@types/glob": "latest",
"@types/gulp": "^4.0.9",
"@types/gulp-concat": "latest",
"@types/gulp-newer": "latest",
"@types/gulp-rename": "0.0.33",
"@types/gulp-sourcemaps": "0.0.32",
"@types/gulp-rename": "latest",
"@types/gulp-sourcemaps": "latest",
"@types/merge2": "latest",
"@types/microsoft__typescript-etw": "latest",
"@types/minimatch": "latest",
Expand All @@ -47,29 +48,29 @@
"@types/mocha": "latest",
"@types/ms": "latest",
"@types/node": "latest",
"@types/node-fetch": "^2.3.4",
"@types/node-fetch": "^2.6.2",
"@types/q": "latest",
"@types/source-map-support": "latest",
"@types/xml2js": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/experimental-utils": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@typescript-eslint/utils": "^5.28.0",
"async": "latest",
"azure-devops-node-api": "^11.0.1",
"azure-devops-node-api": "^11.1.1",
"chai": "latest",
"chalk": "^4.1.2",
"convert-source-map": "latest",
"del": "5.1.0",
"diff": "^4.0.2",
"eslint": "7.12.1",
"eslint-formatter-autolinkable-stylish": "1.1.4",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"del": "6.1.1",
"diff": "^5.1.0",
"eslint": "8.17.0",
"eslint-formatter-autolinkable-stylish": "1.2.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsdoc": "39.3.2",
"eslint-plugin-no-null": "1.0.2",
"fancy-log": "latest",
"fs-extra": "^9.0.0",
"fs-extra": "^9.1.0",
"glob": "latest",
"gulp": "^4.0.0",
"gulp": "^4.0.2",
"gulp-concat": "latest",
"gulp-insert": "latest",
"gulp-newer": "latest",
Expand All @@ -81,14 +82,14 @@
"mocha": "latest",
"mocha-fivemat-progress-reporter": "latest",
"ms": "^2.1.3",
"node-fetch": "^2.6.1",
"prex": "^0.4.3",
"node-fetch": "^2.6.7",
"prex": "^0.4.7",
"q": "latest",
"source-map-support": "latest",
"typescript": "^4.5.5",
"vinyl": "latest",
"vinyl-sourcemaps-apply": "latest",
"xml2js": "^0.4.19"
"xml2js": "^0.4.23"
},
"scripts": {
"prepare": "gulp build-eslint-rules",
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer
if (fileName === protocolFileName) {
return ts.createSourceFile(fileName, protocolDts, options.target);
}
return originalGetSourceFile.apply(host, [fileName]);
return originalGetSourceFile.apply(host, [fileName, ts.ScriptTarget.Latest]);
};
const rootFiles = includeTypeScriptServices ? [protocolFileName, typeScriptServicesDts] : [protocolFileName];
return ts.createProgram(rootFiles, options, host);
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/boolean-trivia.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/experimental-utils";
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "boolean-trivia",
meta: {
docs: {
description: ``,
category: "Best Practices",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/debug-assert.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/experimental-utils";
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "debug-assert",
meta: {
docs: {
description: ``,
category: "Possible Errors",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/no-double-space.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree, AST_NODE_TYPES } from "@typescript-eslint/experimental-utils";
import { TSESTree, AST_NODE_TYPES } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "no-double-space",
meta: {
docs: {
description: ``,
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/no-in-operator.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree } from "@typescript-eslint/experimental-utils";
import { TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "no-in-operator",
meta: {
docs: {
description: ``,
category: "Best Practices",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/no-keywords.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree, AST_NODE_TYPES } from "@typescript-eslint/experimental-utils";
import { TSESTree, AST_NODE_TYPES } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "no-keywords",
meta: {
docs: {
description: `disallows the use of certain TypeScript keywords as variable or parameter names`,
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/no-type-assertion-whitespace.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree } from "@typescript-eslint/experimental-utils";
import { TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "no-type-assertion-whitespace",
meta: {
docs: {
description: ``,
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/object-literal-surrounding-space.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree } from "@typescript-eslint/experimental-utils";
import { TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "object-literal-surrounding-space",
meta: {
docs: {
description: ``,
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/one-namespace-per-file.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/experimental-utils";
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "one-namespace-per-file",
meta: {
docs: {
description: `Limits each file to having at most one top-level namespace declaration`,
category: "Possible Errors",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/only-arrow-functions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/experimental-utils";
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

type MessageId = "onlyArrowFunctionsError";
Expand All @@ -12,7 +12,6 @@ export = createRule<Options, MessageId>({
meta: {
docs: {
description: `Disallows traditional (non-arrow) function expressions.`,
category: "Best Practices",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/simple-indent.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree } from "@typescript-eslint/experimental-utils";
import { TSESTree } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "simple-indent",
meta: {
docs: {
description: "Enforce consistent indentation",
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
3 changes: 1 addition & 2 deletions scripts/eslint/rules/type-operator-spacing.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { TSESTree, AST_TOKEN_TYPES } from "@typescript-eslint/experimental-utils";
import { TSESTree, AST_TOKEN_TYPES } from "@typescript-eslint/utils";
import { createRule } from "./utils";

export = createRule({
name: "type-operator-spacing",
meta: {
docs: {
description: ``,
category: "Stylistic Issues",
recommended: "error",
},
messages: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/eslint/rules/utils.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { ESLintUtils } from "@typescript-eslint/experimental-utils";
import { ESLintUtils } from "@typescript-eslint/utils";
export const createRule = ESLintUtils.RuleCreator(() => "");
2 changes: 1 addition & 1 deletion scripts/eslint/tests/support/RuleTester.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "path";
import { TSESLint } from "@typescript-eslint/experimental-utils";
import { TSESLint } from "@typescript-eslint/utils";

export const ROOT_DIR = path.join(process.cwd(), "scripts", "eslint", "tests", "fixtures");
export const FILENAME = path.join(ROOT_DIR, "file.ts");
Expand Down
2 changes: 1 addition & 1 deletion scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"strictNullChecks": true,
"strict": true,
"removeComments": false,
"declaration": false,
"sourceMap": true,
Expand Down
Loading

0 comments on commit e079811

Please sign in to comment.