Skip to content

Commit

Permalink
feat: add ts-standard linter for ts standard
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Andersson <josef.andersson@gmail.com>
  • Loading branch information
janderssonse committed Jun 18, 2023
1 parent f880407 commit c901683
Show file tree
Hide file tree
Showing 34 changed files with 136 additions and 130 deletions.
29 changes: 29 additions & 0 deletions .automation/generated/linter-helps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .automation/generated/linter-links-previews.json
Expand Up @@ -539,6 +539,11 @@
"image": null,
"title": "Redirecting"
},
"ts-standard": {
"description": "English \u2022 Espan\u0303ol (Latinoame\u0301rica) \u2022 Franc\u0327ais \u2022 Bahasa Indonesia \u2022 Italiano (Italian) \u2022 \u65e5\u672c\u8a9e (Japanese) \u2022 \u1112\u1161\u11ab\u1100\u116e\u11a8\u110b\u1165 (Korean) \u2022 Portugue\u0302s (Brasil) \u2022 \u7b80\u4f53\u4e2d\u6587 (Simplified Chinese) \u2022 \u7e41\u9ad4\u4e2d\u6587 (Taiwanese Mandarin).",
"image": null,
"title": "JavaScript Standard Style"
},
"tsqllint": {
"description": "Configurable linting for TSQL. Contribute to tsqllint/tsqllint development by creating an account on GitHub.",
"image": "https://opengraph.githubassets.com/07bcefab8d31eb93bc746724c678639f64a396bb33c2f36f56b4c47d73906d60/tsqllint/tsqllint",
Expand Down
1 change: 1 addition & 0 deletions .automation/generated/linter-versions.json
Expand Up @@ -104,6 +104,7 @@
"terrascan": "1.18.1",
"tflint": "0.46.1",
"trivy": "0.42.1",
"ts-standard": "12.0.2",
"tsqllint": "1.15.3.0",
"v8r": "2.0.0",
"vale": "2.27.0",
Expand Down
Expand Up @@ -2,7 +2,7 @@ Results of standard linter (version 15.0.1)
See documentation on https://megalinter.io/descriptors/typescript_standard/
-----------------------------------------------

[ERROR] .automation/test/typescript/typescript_bad_1.ts
standard: Use JavaScript Standard Style (https://standardjs.com)
.automation/test/typescript/typescript_bad_1.ts:5:39: Parsing error: Unterminated regular expression literal.
[ERROR] .automation/test/typescript_standard/typescript_bad_1.ts
ts-standard: Use TypeScript Standard Style (https://standardjs.com)
.automation/test/typescript_standard/typescript_bad_1.ts:5:39: Parsing error: Unterminated regular expression literal.

Expand Up @@ -2,6 +2,6 @@ Results of standard linter (version 15.0.1)
See documentation on https://megalinter.io/descriptors/typescript_standard/
-----------------------------------------------

[SUCCESS] .automation/test/typescript/typescript_good_1.ts
[SUCCESS] .automation/test/typescript_standard/typescript_good_1.ts


This file was deleted.

13 changes: 13 additions & 0 deletions .automation/test/typescript/tsconfig.json
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"noImplicitAny": true,
"strictNullChecks": true
},
"files": [
"typescript_bad_1.ts",
"typescript_good_1.ts",
"typescript_good_2.ts",
"typescript_fix_1.ts",
"typescript_fix_2.ts",
]
}
4 changes: 2 additions & 2 deletions .automation/test/typescript/typescript_fix_1.ts 100644 → 100755
@@ -1,2 +1,2 @@
const str: String = 'foo';
console.log(str)
const str: String = 'foo'
console.log(str)
4 changes: 2 additions & 2 deletions .automation/test/typescript/typescript_fix_2.ts 100644 → 100755
@@ -1,2 +1,2 @@
const str: String = 'foo';
console.log(str)
const str: String = 'foo'
console.log(str)
2 changes: 1 addition & 1 deletion .automation/test/typescript/typescript_good_1.ts
@@ -1,4 +1,4 @@
const spiderman = (person) => {
const spiderman = (person: string): string => {
return 'Hello, ' + person
}

Expand Down
2 changes: 1 addition & 1 deletion .automation/test/typescript/typescript_good_2.ts
@@ -1,4 +1,4 @@
const spiderman = (person) => {
const spiderman = (person: string): string => {
return 'Hello, ' + person
}

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Expand Up @@ -243,7 +243,8 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
tekton-lint \
prettyjson \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser && \
@typescript-eslint/parser \
ts-standard && \
echo "Cleaning npm cache…" \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files…" \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -266,7 +266,7 @@ All linters are integrated in the [MegaLinter docker image](https://hub.docker.c
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/swift.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**SWIFT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift.md) | [**swiftlint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md)<br/>[_SWIFT_SWIFTLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/swift_swiftlint.md) | [![GitHub stars](https://img.shields.io/github/stars/realm/SwiftLint?cacheSeconds=3600)](https://github.com/realm/SwiftLint) ![autofix](https://shields.io/badge/-autofix-green) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/tsx.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**TSX**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md)<br/>[_TSX_ESLINT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/tsx_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/jsx-eslint/eslint-plugin-react?cacheSeconds=3600)](https://github.com/jsx-eslint/eslint-plugin-react) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/typescript.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**eslint**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md)<br/>[_TYPESCRIPT_ES_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_eslint.md) | [![GitHub stars](https://img.shields.io/github/stars/typescript-eslint/typescript-eslint?cacheSeconds=3600)](https://github.com/typescript-eslint/typescript-eslint) ![autofix](https://shields.io/badge/-autofix-green) ![sarif](https://shields.io/badge/-SARIF-orange) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/typescript.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)<br/>[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/standard?cacheSeconds=3600)](https://github.com/standard/standard) ![autofix](https://shields.io/badge/-autofix-green) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/typescript.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**ts-standard**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md)<br/>[_TYPESCRIPT_STANDARD_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_standard.md) | [![GitHub stars](https://img.shields.io/github/stars/standard/ts-standard?cacheSeconds=3600)](https://github.com/standard/ts-standard) ![autofix](https://shields.io/badge/-autofix-green) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/typescript.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**TYPESCRIPT**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript.md) | [**prettier**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md)<br/>[_TYPESCRIPT_PRETTIER_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/typescript_prettier.md) | [![GitHub stars](https://img.shields.io/github/stars/prettier/prettier?cacheSeconds=3600)](https://github.com/prettier/prettier) ![formatter](https://shields.io/badge/-format-yellow) |
| <img src="https://github.com/oxsecurity/megalinter/raw/main/docs/assets/icons/vbdotnet.ico" alt="" height="32px" class="megalinter-icon"></a> <!-- linter-icon --> | [**Visual Basic .NET** (VBDOTNET)](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet.md) | [**dotnet-format**](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md)<br/>[_VBDOTNET_DOTNET_FORMAT_](https://github.com/oxsecurity/megalinter/tree/main/docs/descriptors/vbdotnet_dotnet_format.md) | [![GitHub stars](https://img.shields.io/github/stars/dotnet/format?cacheSeconds=3600)](https://github.com/dotnet/format) ![formatter](https://shields.io/badge/-format-yellow) |

Expand Down

0 comments on commit c901683

Please sign in to comment.