Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
dapirian committed Sep 5, 2023
1 parent 6c9d715 commit 9743e97
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
12 changes: 12 additions & 0 deletions linters/deno/deno.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { linterCheckTest, linterFmtTest } from "tests";
// Uncomment and use if your tool is a linter
// linterCheckTest({ linterName: "deno" });

// Uncomment and use if your tool is a formatter
linterFmtTest({ linterName: "deno" });

// Guidelines for configuring tests:
// - By default, linters and formatters will only run on files with syntax `<name>.in.<extension>`
// - You can customize test setup using the `preCheck` callback (see git_diff_check.test.ts and golangci_lint.test.ts)
// - You can specify additional customization using the `customLinterCheckTest and customLinterFmtTest` helpers
// - Additional information on test setup can be found in tests/readme.md
42 changes: 42 additions & 0 deletions linters/deno/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 0.1
downloads:
- name: deno
downloads:
- os:
macos: apple-darwin
linux: unknown-linux-gnu
windows: windows-msvc
cpu:
x86_64: x86_64
arm_64: aarch64
url: https://github.com/denoland/deno/releases/download/v${version}/deno-${cpu}-${os}.zip
tools:
definitions:
- name: deno
download: deno
known_good_version: 1.36.4
shims:
- name: deno
target: deno
lint:
definitions:
- name: deno
files: [javascript, typescript, markdown, json]
commands:
- name: format
output: rewrite
run: deno fmt ${target}
success_codes: [0, 1]
cache_results: true
formatter: true
batch: true
in_place: true
tools: [deno]
suggest_if: config_present
direct_configs:
- deno.json
- deno.jsonc
known_good_version: 1.36.4
version_command:
parse_regex: deno ${semver} .*
run: deno --version
5 changes: 5 additions & 0 deletions linters/deno/test_data/basic.in.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const identity = [
1, 0, 0,
0, 1, 0,
0, 0, 1,
];
16 changes: 16 additions & 0 deletions linters/deno/test_data/deno_v1.36.4_basic.fmt.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Testing formatter deno test basic 1`] = `
"export const identity = [
1,
0,
0,
0,
1,
0,
0,
0,
1,
];
"
`;

0 comments on commit 9743e97

Please sign in to comment.