Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cause lint issues (for testing) #2

Closed
wants to merge 5 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Prepare
run: npm ci
- name: Lint
uses: mooyoul/tslint-actions@master
uses: mooyoul/tslint-actions@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pattern: '*.ts'
8 changes: 8 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { Configuration, Linter, RuleSeverity } from "tslint";

const CHECK_NAME = "TSLint Checks";




const SeverityAnnotationLevelMap = new Map<RuleSeverity, "warning" | "failure">([
["warning", "warning"],
["error", "failure"],
Expand Down Expand Up @@ -49,6 +52,9 @@ const SeverityAnnotationLevelMap = new Map<RuleSeverity, "warning" | "failure">(
formatter: "json",
};

// oops
Math.floor(0x40 >>> 4);

// Create a new Linter instance
const result = (() => {
if (projectFileName && !pattern) {
Expand Down Expand Up @@ -81,6 +87,8 @@ const SeverityAnnotationLevelMap = new Map<RuleSeverity, "warning" | "failure">(
}
})();

console.log("breaking lint passing");

const annotations: Octokit.ChecksCreateParamsOutputAnnotations[] = result.failures.map((failure) => ({
path: failure.getFileName(),
start_line: failure.getStartPosition().getLineAndCharacter().line,
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"jsRules": {},
"rules": {
"object-literal-sort-keys": false,
"interface-name": [true, "never-prefix"]
"interface-name": [true, "never-prefix"],
"no-console": { "severity": "warning" }
},
"rulesDirectory": []
}