mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 13:52:18 +02:00
removed eslintrc config file duplicat
This commit is contained in:
parent
78f8abcf6c
commit
ebb7a81161
37
.eslintrc
37
.eslintrc
@ -1,17 +1,30 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser for TypeScript
|
||||
"plugins": ["@typescript-eslint", "import"], // Includes TypeScript and import plugins
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["src/**/*.ts"],
|
||||
"extends": "eslint:recommended"
|
||||
"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 !=
|
||||
"indent": ["error", 2], // Enforces a 2-space indentation
|
||||
"quotes": ["error", "single"], // Enforces the use of single quotes for strings
|
||||
"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.
|
||||
}],
|
||||
"eol-last": ["error", "always"] // Enforces at least one newline at the end of files
|
||||
}
|
||||
],
|
||||
"rules": {}
|
||||
}, {
|
||||
"files": ["src/**/*.{ts,tsx,js,jsx}"], // Applies these rules to all TypeScript and JavaScript files in the src directory
|
||||
"rules": {
|
||||
"@typescript-eslint/semi": ["error", "always"], // Requires semicolons for TypeScript-specific syntax
|
||||
"semi": "off", // Disables the general semi rule for TypeScript files
|
||||
"@typescript-eslint/no-extra-semi": ["error"] // Disallows unnecessary semicolons for TypeScript-specific syntax
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"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 !=
|
||||
"indent": ["error", 2], // Enforces a 2-space indentation
|
||||
"quotes": ["error", "single"], // Enforces the use of single quotes for strings
|
||||
"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.
|
||||
}],
|
||||
"eol-last": ["error", "always"] // Enforces at least one newline at the end of files
|
||||
}
|
||||
}, {
|
||||
"files": ["src/**/*.{ts,tsx,js,jsx}"], // Applies these rules to all TypeScript and JavaScript files in the src directory
|
||||
"rules": {
|
||||
"@typescript-eslint/semi": ["error", "always"], // Requires semicolons for TypeScript-specific syntax
|
||||
"semi": "off", // Disables the general semi rule for TypeScript files
|
||||
"@typescript-eslint/no-extra-semi": ["error"] // Disallows unnecessary semicolons for TypeScript-specific syntax
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user