2020-02-14 00:41:49 +01:00
|
|
|
extends:
|
|
|
|
- chartjs
|
2021-08-11 14:23:18 +02:00
|
|
|
- plugin:es/restrict-to-es2018
|
2021-03-30 16:32:39 +02:00
|
|
|
- plugin:markdown/recommended
|
2018-01-06 23:59:13 +01:00
|
|
|
|
2021-08-11 14:23:18 +02:00
|
|
|
settings:
|
|
|
|
es:
|
|
|
|
aggressive: true
|
|
|
|
|
2018-01-06 23:59:13 +01:00
|
|
|
env:
|
2019-12-27 23:13:24 +01:00
|
|
|
es6: true
|
2018-01-06 23:59:13 +01:00
|
|
|
browser: true
|
|
|
|
node: true
|
2018-02-03 13:28:54 +01:00
|
|
|
|
2019-10-31 23:45:13 +01:00
|
|
|
parserOptions:
|
2022-08-04 15:17:40 +02:00
|
|
|
ecmaVersion: 2022
|
2020-02-14 00:41:49 +01:00
|
|
|
sourceType: module
|
|
|
|
ecmaFeatures:
|
|
|
|
impliedStrict: true
|
|
|
|
modules: true
|
2019-10-31 23:45:13 +01:00
|
|
|
|
2020-11-19 20:23:24 +01:00
|
|
|
plugins: ['html', 'es']
|
2020-02-14 00:41:49 +01:00
|
|
|
|
|
|
|
rules:
|
2020-11-19 20:23:24 +01:00
|
|
|
class-methods-use-this: "off"
|
|
|
|
complexity: ["warn", 10]
|
|
|
|
max-statements: ["warn", 30]
|
|
|
|
no-empty-function: "off"
|
|
|
|
no-use-before-define: ["error", { "functions": false }]
|
|
|
|
# disable everything, except Rest/Spread Properties in ES2018
|
2022-08-05 00:43:26 +02:00
|
|
|
es/no-import-meta: "off"
|
2020-11-19 20:23:24 +01:00
|
|
|
es/no-async-iteration: "error"
|
|
|
|
es/no-malformed-template-literals: "error"
|
|
|
|
es/no-regexp-lookbehind-assertions: "error"
|
|
|
|
es/no-regexp-named-capture-groups: "error"
|
|
|
|
es/no-regexp-s-flag: "error"
|
|
|
|
es/no-regexp-unicode-property-escapes: "error"
|
2022-08-05 22:36:56 +02:00
|
|
|
es/no-dynamic-import: "off"
|
2022-08-22 17:58:57 +02:00
|
|
|
|
|
|
|
overrides:
|
|
|
|
- files: ['**/*.ts']
|
|
|
|
parser: '@typescript-eslint/parser'
|
|
|
|
plugins:
|
|
|
|
- '@typescript-eslint'
|
|
|
|
extends:
|
|
|
|
- chartjs
|
|
|
|
- plugin:@typescript-eslint/recommended
|
|
|
|
|
|
|
|
rules:
|
2022-10-12 13:08:37 +02:00
|
|
|
complexity: ["warn", 10]
|
|
|
|
max-statements: ["warn", 30]
|
2022-08-22 17:58:57 +02:00
|
|
|
# Replace stock eslint rules with typescript-eslint equivalents for proper
|
|
|
|
# TypeScript support.
|
|
|
|
indent: "off"
|
|
|
|
"@typescript-eslint/indent": ["error", 2]
|
|
|
|
no-use-before-define: "off"
|
|
|
|
'@typescript-eslint/no-use-before-define': "error"
|
|
|
|
no-shadow: "off"
|
|
|
|
'@typescript-eslint/no-shadow': "error"
|
|
|
|
space-before-function-paren: "off"
|
|
|
|
'@typescript-eslint/space-before-function-paren': [2, never]
|