mermaid/.eslintrc.json

138 lines
3.6 KiB
JSON
Raw Normal View History

2019-09-12 21:03:49 +02:00
{
"env": {
"browser": true,
2019-10-27 15:24:56 +01:00
"es6": true,
"jest/globals": true,
2019-10-27 15:24:56 +01:00
"node": true
2019-09-12 21:03:49 +02:00
},
2022-09-02 08:14:06 +02:00
"parser": "@typescript-eslint/parser",
2019-09-12 21:03:49 +02:00
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
2019-09-12 21:03:49 +02:00
},
2022-05-11 03:08:32 +02:00
"extends": [
"eslint:recommended",
2022-09-02 08:14:06 +02:00
"plugin:@typescript-eslint/recommended",
2022-05-11 03:08:32 +02:00
"plugin:json/recommended",
"plugin:markdown/recommended",
"plugin:@cspell/recommended",
2022-09-03 09:35:47 +02:00
"prettier"
2022-05-11 03:08:32 +02:00
],
2022-11-22 19:56:37 +01:00
"plugins": [
"@typescript-eslint",
"no-only-tests",
"html",
"jest",
"jsdoc",
"json",
"@cspell",
2022-11-22 20:35:08 +01:00
"lodash",
"unicorn"
2022-11-22 19:56:37 +01:00
],
2021-11-11 07:37:14 +01:00
"rules": {
2022-10-19 20:04:45 +02:00
"curly": "error",
"no-console": "error",
"no-prototype-builtins": "off",
"no-unused-vars": "off",
"cypress/no-async-tests": "off",
2022-09-02 08:14:06 +02:00
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description",
"ts-nocheck": "allow-with-description",
"ts-check": "allow-with-description",
"minimumDescriptionLength": 10
}
],
"json/*": ["error", "allowComments"],
"@cspell/spellchecker": [
"error",
{
"checkIdentifiers": false,
"checkStrings": false,
"checkStringTemplates": false
}
2022-10-18 17:33:18 +02:00
],
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
2022-11-22 19:56:37 +01:00
"no-only-tests/no-only-tests": "error",
2022-11-22 20:35:08 +01:00
"lodash/import-scope": ["error", "method"],
"unicorn/better-regex": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/no-array-push-push": "error",
"unicorn/no-for-loop": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-unnecessary-await": "error",
"unicorn/no-unsafe-regex": "warn",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-default-parameters": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-object-from-entries": "error",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/string-content": "error",
"unicorn/prefer-spread": "error",
"unicorn/no-lonely-if": "error"
},
"overrides": [
{
2022-10-09 16:08:32 +02:00
"files": ["cypress/**", "demos/**"],
"rules": {
2022-10-09 16:08:32 +02:00
"no-console": "off"
}
2022-05-11 03:08:32 +02:00
},
{
"files": ["*.{js,jsx,mjs,cjs}"],
"extends": ["plugin:jsdoc/recommended"],
"rules": {
"jsdoc/check-indentation": "off",
"jsdoc/check-alignment": "off",
"jsdoc/check-line-alignment": "off",
"jsdoc/multiline-blocks": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/tag-lines": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-description": "off"
}
},
{
"files": ["*.{ts,tsx}"],
"plugins": ["tsdoc"],
"rules": {
"tsdoc/syntax": "error"
}
},
{
2022-10-09 16:08:32 +02:00
"files": ["*.spec.{ts,js}", "cypress/**", "demos/**", "**/docs/**"],
"rules": {
2022-10-09 16:08:32 +02:00
"jsdoc/require-jsdoc": "off",
"@typescript-eslint/no-unused-vars": "off"
}
},
{
2022-10-09 16:08:32 +02:00
"files": ["*.html", "*.md", "**/*.md/*"],
"rules": {
2022-10-09 16:08:32 +02:00
"no-var": "error",
"no-undef": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
]
}