nu-lint 1.1.0

Linter for Nu shell scripts that helpfully suggests improvements
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::RULE;

#[test]
fn detect_structured_data_to_jq() {
    RULE.assert_detects("ls | ^jq '.'");
    RULE.assert_detects("{ a: 1 } | ^jq '.a'");
    RULE.assert_detects("[1, 2, 3] | ^jq '.[]'");
}

#[test]
fn detect_all_json_tools() {
    RULE.assert_detects("ls | ^json_pp");
    RULE.assert_detects("{ name: 'test' } | ^jsonlint");
}