feat: add rules for playwright (!3)

Reviewed-on: https://codeberg.org/nhcarrigan/eslint-config/pulls/3
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
2024-09-26 00:55:54 +00:00
committed by Naomi the Technomancer
parent 883274a3e4
commit 96935e12b4
6 changed files with 123 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { describe, expect, it } from "vitest";
import { playwrightRules } from "../src/rules/playwright.ts";
describe("playwright configs", () => {
it("should never be an error", () => {
expect.assertions(42);
const rules = Object.entries(playwrightRules);
for (const [ name, rule ] of rules) {
expect(Array.isArray(rule)
? rule.at(0)
: rule, `${name} appears to be set to an error!`).not.toBe("error");
continue;
}
});
});