Skip to content

Commit

Permalink
chore: deprecate lint itests (#25655)
Browse files Browse the repository at this point in the history
  • Loading branch information
HasanAlrimawi authored Sep 16, 2024
1 parent acc32e1 commit 36a1a79
Show file tree
Hide file tree
Showing 123 changed files with 814 additions and 299 deletions.
267 changes: 0 additions & 267 deletions tests/integration/lint_tests.rs

This file was deleted.

2 changes: 0 additions & 2 deletions tests/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ mod js_unit_tests;
mod jsr;
#[path = "jupyter_tests.rs"]
mod jupyter;
#[path = "lint_tests.rs"]
mod lint;
#[path = "lsp_tests.rs"]
mod lsp;
#[path = "node_unit_tests.rs"]
Expand Down
5 changes: 5 additions & 0 deletions tests/specs/lint/all/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint file1.js file2.ts ignored_file.ts",
"output": "expected.out",
"exitCode": 1
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions tests/specs/lint/compact/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint --compact file1.js ignored_file.tss",
"output": "expected_compact.out",
"exitCode": 1
}
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/specs/lint/compact/file1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// deno-lint-ignore
while (false) {}
5 changes: 5 additions & 0 deletions tests/specs/lint/glob/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint --ignore=without_config/malformed.js,with_config/ without_config/",
"output": "expected_glob.out",
"exitCode": 1
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/specs/lint/glob/without_config/file1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// deno-lint-ignore
while (false) {}
6 changes: 6 additions & 0 deletions tests/specs/lint/glob/without_config/file2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
try {
await Deno.open("./some/file.txt");
} catch (_e) {}

// deno-lint-ignore no-explicit-any
function _foo(): any {}
3 changes: 3 additions & 0 deletions tests/specs/lint/glob/without_config/ignored_file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// deno-lint-ignore-file

function foo(): any {}
5 changes: 5 additions & 0 deletions tests/specs/lint/ignore/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint --ignore=without_config/file1.js,without_config/malformed.js,without_config/lint_with_config/ without_config",
"output": "expected_ignore.out",
"exitCode": 1
}
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/specs/lint/ignore/without_config/file1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// deno-lint-ignore
while (false) {}
6 changes: 6 additions & 0 deletions tests/specs/lint/ignore/without_config/file2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
try {
await Deno.open("./some/file.txt");
} catch (_e) {}

// deno-lint-ignore no-explicit-any
function _foo(): any {}
3 changes: 3 additions & 0 deletions tests/specs/lint/ignore/without_config/ignored_file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// deno-lint-ignore-file

function foo(): any {}
4 changes: 4 additions & 0 deletions tests/specs/lint/ignore/without_config/malformed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// deno-fmt-ignore-file

// intentionally malformed file
export class A B C
5 changes: 5 additions & 0 deletions tests/specs/lint/ignore_unexplicit_files/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint --ignore=./",
"output": "lint.out",
"exitCode": 1
}
1 change: 1 addition & 0 deletions tests/specs/lint/ignore_unexplicit_files/lint.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error: No target files found.
5 changes: 5 additions & 0 deletions tests/specs/lint/json/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"args": "lint --json file1.js file2.ts ignored_file.ts malformed.js",
"output": "expected_json.out",
"exitCode": 1
}
File renamed without changes.
2 changes: 2 additions & 0 deletions tests/specs/lint/json/file1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// deno-lint-ignore
while (false) {}
6 changes: 6 additions & 0 deletions tests/specs/lint/json/file2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
try {
await Deno.open("./some/file.txt");
} catch (_e) {}

// deno-lint-ignore no-explicit-any
function _foo(): any {}
3 changes: 3 additions & 0 deletions tests/specs/lint/json/ignored_file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// deno-lint-ignore-file

function foo(): any {}
4 changes: 4 additions & 0 deletions tests/specs/lint/json/malformed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// deno-fmt-ignore-file

// intentionally malformed file
export class A B C
16 changes: 16 additions & 0 deletions tests/specs/lint/jsx/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"steps": [
{
"if": "windows",
"args": "lint main.jsx",
"output": "main_windows.out",
"exitCode": 1
},
{
"if": "unix",
"args": "lint main.jsx",
"output": "main_unix.out",
"exitCode": 1
}
]
}
1 change: 1 addition & 0 deletions tests/specs/lint/jsx/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const data = <div>hello</div>;
Loading

0 comments on commit 36a1a79

Please sign in to comment.