game-algorithms/frontend/.eslintrc.cjs

45 lines
1.2 KiB
JavaScript

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jsdoc/recommended"],
plugins: ["svelte3", "@typescript-eslint", "jsdoc"],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
settings: {
"svelte3/typescript": () => require("typescript")
},
parserOptions: {
sourceType: "module",
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
semi: 2,
"semi-spacing": ["error", {before: false, after: false}],
"object-curly-spacing": ["error", "always"],
"sort-imports": 2,
indent: ["error", "tab"],
"eol-last": 2,
"max-len": ["error", {code: 120}],
"prefer-const": 2,
quotes: ["error", "double"],
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-unused-vars": 2,
"jsdoc/require-description": 2,
"jsdoc/require-jsdoc": 2,
"jsdoc/require-param-description": 2,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 0,
"jsdoc/require-returns": ["error", {forceReturnsWithAsync: true}],
"jsdoc/require-returns-check": 2,
"jsdoc/require-returns-description": 2,
"jsdoc/require-returns-type": 0
}
};