mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 21:42:20 +02:00
eslint config + packages
This commit is contained in:
parent
bbfb4bb795
commit
616f011ef0
27
.eslintrc.json
Normal file
27
.eslintrc.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser for TypeScript
|
||||||
|
"plugins": ["@typescript-eslint", "import"], // Includes TypeScript and import plugins
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["src/**/*.{ts,tsx,js,jsx}"], // Applies these rules to all TypeScript and JavaScript files in the src directory
|
||||||
|
"rules": {
|
||||||
|
// General rules that apply to all files
|
||||||
|
"eqeqeq": ["error", "always"], // Enforces the use of === and !== instead of == and !=
|
||||||
|
"curly": ["error", "all"], // Requires curly braces for all control statements
|
||||||
|
"indent": ["error", 2], // Enforces a 2-space indentation
|
||||||
|
"quotes": ["error", "single"], // Enforces the use of single quotes for strings
|
||||||
|
"semi": ["error", "always"], // Requires semicolons at the end of statements
|
||||||
|
"no-var": "error", // Disallows the use of var, enforcing let or const instead
|
||||||
|
"prefer-const": "error", // Prefers the use of const for variables that are never reassigned
|
||||||
|
"no-undef": "off", // Disables the rule that disallows the use of undeclared variables (TypeScript handles this)
|
||||||
|
"@typescript-eslint/no-unused-vars": [ "error", {
|
||||||
|
"args": "none", // Allows unused function parameters. Useful for functions with specific signatures where not all parameters are always used.
|
||||||
|
"ignoreRestSiblings": true // Allows unused variables that are part of a rest property in object destructuring. Useful for excluding certain properties from an object while using the rest.
|
||||||
|
}],
|
||||||
|
"import/no-unused-modules": ["error", { "missingExports": true, "unusedExports": false }], // Only checks for unused imports, not unused exports
|
||||||
|
"eol-last": ["error", "always"], // Enforces at least one newline at the end of files
|
||||||
|
"camelcase": ["error", { "properties": "always" }] // Enforces camelCase naming convention for properties
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
6514
package-lock.json
generated
6514
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,15 +13,20 @@
|
|||||||
"test:watch": "vitest watch --coverage"
|
"test:watch": "vitest watch --coverage"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.3.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
||||||
|
"@typescript-eslint/parser": "^7.10.0",
|
||||||
"@vitest/coverage-istanbul": "^1.4.0",
|
"@vitest/coverage-istanbul": "^1.4.0",
|
||||||
"axios": "^1.6.2",
|
"axios": "^1.6.2",
|
||||||
"axios-cache-interceptor": "^1.3.2",
|
"axios-cache-interceptor": "^1.3.2",
|
||||||
"eslint": "^8.25.0",
|
"eslint": "^8.57.0",
|
||||||
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"jsdom": "^24.0.0",
|
"jsdom": "^24.0.0",
|
||||||
"json-beautify": "^1.1.1",
|
"json-beautify": "^1.1.1",
|
||||||
"phaser3spectorjs": "^0.0.8",
|
"phaser3spectorjs": "^0.0.8",
|
||||||
"pokenode-ts": "^1.20.0",
|
"pokenode-ts": "^1.20.0",
|
||||||
"typescript": "^5.0.3",
|
"typescript": "^5.4.5",
|
||||||
|
"typescript-eslint": "^7.10.0",
|
||||||
"vite": "^4.5.0",
|
"vite": "^4.5.0",
|
||||||
"vite-plugin-fs": "^0.4.4",
|
"vite-plugin-fs": "^0.4.4",
|
||||||
"vitest": "^1.4.0",
|
"vitest": "^1.4.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user