generated from nhcarrigan/template
feat: migrate to eslint verison 9 (#1)
This is a pretty sizeable change. It also removes all external configuration sets. Every rule is now defined by us. Additionally, this version will conflict with other formatters, and should not be used in tandem with Prettier. Reviewed-on: https://codeberg.org/nhcarrigan/eslint-config/pulls/1 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { suite, assert, test } from "vitest";
|
||||
import { stylisticRules } from "../src/rules/stylistic.ts";
|
||||
|
||||
suite("Stylistic Configs", () => {
|
||||
test("should never be an error", () => {
|
||||
const rules = Object.entries(stylisticRules);
|
||||
for (const [ name, rule ] of rules) {
|
||||
if (Array.isArray(rule)) {
|
||||
assert.include(
|
||||
[ "off", "warn" ],
|
||||
rule.at(0),
|
||||
`${name} appears to be set to an error!`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (typeof rule === "string") {
|
||||
assert.include(
|
||||
[ "off", "warn" ],
|
||||
rule,
|
||||
`${name} appears to be set to an error!`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
assert.fail(`Could not determine rule type for ${name}!`);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user