mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-03 15:04:56 +01:00
* Added and enforced `no-fallthrough` * Fixed errors * Fix package.json * Moved vule to biom * Fixed stuff * Added workspace files to .gitignore for anyone who wants to do this stuff * reverted accidental gitignore changes * Update biome.jsonc Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> * Update biome.jsonc Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> * Update pokemon-species.ts * Update biome.jsonc to apply reviews * Fixed package.json * Fix typo --------- Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
44 lines
1.6 KiB
JavaScript
44 lines
1.6 KiB
JavaScript
/** @ts-check */
|
|
import tseslint from "typescript-eslint";
|
|
import stylisticTs from "@stylistic/eslint-plugin-ts";
|
|
import parser from "@typescript-eslint/parser";
|
|
import importX from "eslint-plugin-import-x";
|
|
|
|
export default tseslint.config(
|
|
{
|
|
name: "eslint-config",
|
|
files: ["src/**/*.{ts,tsx,js,jsx}", "test/**/*.{ts,tsx,js,jsx}"],
|
|
ignores: ["dist/*", "build/*", "coverage/*", "public/*", ".github/*", "node_modules/*", ".vscode/*"],
|
|
languageOptions: {
|
|
parser: parser,
|
|
},
|
|
plugins: {
|
|
"import-x": importX,
|
|
"@stylistic/ts": stylisticTs,
|
|
"@typescript-eslint": tseslint.plugin,
|
|
},
|
|
rules: {
|
|
"no-undef": "off", // Disables the rule that disallows the use of undeclared variables (TypeScript handles this)
|
|
"no-extra-semi": "error", // Disallows unnecessary semicolons for TypeScript-specific syntax
|
|
"import-x/extensions": ["error", "never", { json: "always" }], // Enforces no extension for imports unless json
|
|
},
|
|
},
|
|
{
|
|
name: "eslint-tests",
|
|
files: ["test/**/**.test.ts"],
|
|
languageOptions: {
|
|
parser: parser,
|
|
parserOptions: {
|
|
project: ["./tsconfig.json"],
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tseslint.plugin,
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-floating-promises": "error", // Require Promise-like statements to be handled appropriately. - https://typescript-eslint.io/rules/no-floating-promises/
|
|
"@typescript-eslint/no-misused-promises": "error", // Disallow Promises in places not designed to handle them. - https://typescript-eslint.io/rules/no-misused-promises/
|
|
},
|
|
},
|
|
);
|