Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions 18 .github/tsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "tsc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),(\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}
19 changes: 13 additions & 6 deletions 19 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ jobs:
run: |
npm uninstall typescript --no-save
npm uninstall tslint --no-save
- name: npm install and test
run: |
npm install
npm update
npm test

- run: npm install
- run: npm update

# Re: https://github.com/actions/setup-node/pull/125
- name: Register Problem Matcher for TSC
run: echo "##[add-matcher].github/tsc.json"

- name: Tests
run: npm test -- --no-lint

- name: Linter
run: npm run lint:ci

- name: Validate the browser can import TypeScript
run: gulp test-browser-integration

11 changes: 9 additions & 2 deletions 11 Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ const eslint = (folder) => async () => {
"node_modules/eslint/bin/eslint",
"--cache",
"--cache-location", `${folder}/.eslintcache`,
"--format", "autolinkable-stylish",
"--rulesdir", "scripts/eslint/built/rules",
"--ext", ".ts",
];
Expand All @@ -363,11 +362,19 @@ const eslint = (folder) => async () => {
args.push("--fix");
}

// Use stylish format on CI, so that it can be picked up by GH Action's rule matchers
if (cmdLineOptions.ci) {
args.push("--format", "stylish");
}
else {
args.push("--format", "autolinkable-stylish");
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylish:

/Users/ortatherox/dev/typescript/typescript-compiler/src/compiler/builderState.ts
  93:90  error  Missing semicolon  @typescript-eslint/semi
  94:83  error  Missing semicolon  @typescript-eslint/semi

Autolinkable Stylish

Error: /Users/ortatherox/dev/typescript/typescript-compiler/src/compiler/builderState.ts:93:90 @typescript-eslint/semi Missing semicolon.
Error: /Users/ortatherox/dev/typescript/typescript-compiler/src/compiler/builderState.ts:94:83 @typescript-eslint/semi Missing semicolon.

Stylish support is shipped with setup-node here: https://github.com/actions/setup-node/blob/master/.github/eslint-stylish.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this in the files tab of the PR:
Screen Shot 2020-06-23 at 1 37 29 PM

args.push(folder);

log(`Linting: ${args.join(" ")}`);
return exec(process.execPath, args);
}
};

const lintScripts = eslint("scripts");
lintScripts.displayName = "lint-scripts";
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.