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:
2024-07-28 21:11:31 +00:00
committed by Naomi the Technomancer
parent dea44dbd7f
commit f13bcd87a9
25 changed files with 3127 additions and 752 deletions
+33
View File
@@ -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}!`);
}
});
});