2017-04-20 04:05:28 +02:00
|
|
|
module.exports = {
|
2018-03-16 11:07:39 +01:00
|
|
|
root: true,
|
2019-07-09 22:15:14 +02:00
|
|
|
plugins: ["prettier", "node", "jest", "jsdoc"],
|
2018-08-24 16:57:16 +02:00
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:node/recommended",
|
|
|
|
"plugin:prettier/recommended"
|
|
|
|
],
|
2018-03-16 11:07:39 +01:00
|
|
|
env: {
|
|
|
|
node: true,
|
2018-04-11 23:30:28 +02:00
|
|
|
es6: true
|
2015-04-23 23:55:50 +02:00
|
|
|
},
|
2018-03-16 11:07:39 +01:00
|
|
|
parserOptions: {
|
2018-12-18 18:29:12 +01:00
|
|
|
ecmaVersion: 2018
|
2018-03-16 11:07:39 +01:00
|
|
|
},
|
|
|
|
rules: {
|
2017-11-15 13:52:01 +01:00
|
|
|
"prettier/prettier": "error",
|
2017-01-11 10:51:58 +01:00
|
|
|
"no-template-curly-in-string": "error",
|
|
|
|
"no-caller": "error",
|
2018-03-26 16:56:10 +02:00
|
|
|
"no-control-regex": "off",
|
2018-08-24 16:57:16 +02:00
|
|
|
yoda: "error",
|
|
|
|
eqeqeq: "error",
|
2016-12-29 17:10:41 +01:00
|
|
|
"eol-last": "error",
|
|
|
|
"no-extra-bind": "warn",
|
|
|
|
"no-process-exit": "warn",
|
|
|
|
"no-use-before-define": "off",
|
2018-12-18 18:29:12 +01:00
|
|
|
"no-unused-vars": ["error", { args: "none", ignoreRestSiblings: true }],
|
2021-08-04 15:55:58 +02:00
|
|
|
"no-loop-func": "off",
|
2018-03-16 11:07:39 +01:00
|
|
|
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
|
2020-03-03 13:37:18 +01:00
|
|
|
"jsdoc/check-indentation": "error",
|
2019-07-16 18:25:45 +02:00
|
|
|
"jsdoc/check-param-names": "error",
|
2020-03-03 13:37:18 +01:00
|
|
|
"jsdoc/check-property-names": "error",
|
|
|
|
"jsdoc/check-tag-names": "error",
|
|
|
|
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
|
2019-07-16 18:25:45 +02:00
|
|
|
"jsdoc/require-param-description": "error",
|
|
|
|
"jsdoc/require-param-name": "error",
|
|
|
|
"jsdoc/require-param-type": "error",
|
|
|
|
"jsdoc/require-param": "error",
|
2020-03-03 13:37:18 +01:00
|
|
|
"jsdoc/require-property": "error",
|
|
|
|
"jsdoc/require-property-name": "error",
|
|
|
|
"jsdoc/require-property-type": "error",
|
2019-07-16 18:25:45 +02:00
|
|
|
"jsdoc/require-returns-description": "error",
|
|
|
|
"jsdoc/require-returns-type": "error",
|
2020-03-30 18:02:44 +02:00
|
|
|
"jsdoc/require-returns": "error",
|
|
|
|
// Disallow @ts-ignore directive. Use @ts-expect-error instead
|
2020-05-27 20:34:55 +02:00
|
|
|
"no-warning-comments": [
|
|
|
|
"error",
|
|
|
|
{ terms: ["@ts-ignore"], location: "start" }
|
|
|
|
]
|
2019-07-09 23:38:18 +02:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
jsdoc: {
|
2020-03-03 13:37:18 +01:00
|
|
|
mode: "typescript",
|
2019-07-09 23:38:18 +02:00
|
|
|
// supported tags https://github.com/microsoft/TypeScript-wiki/blob/master/JSDoc-support-in-JavaScript.md
|
|
|
|
tagNamePreference: {
|
2019-08-06 08:55:00 +02:00
|
|
|
...["implements", "const", "memberof", "readonly", "yields"].reduce(
|
|
|
|
(acc, tag) => {
|
|
|
|
acc[tag] = {
|
|
|
|
message: `@${tag} currently not supported in Typescript`
|
|
|
|
};
|
|
|
|
return acc;
|
|
|
|
},
|
|
|
|
{}
|
|
|
|
),
|
2019-07-15 16:19:51 +02:00
|
|
|
extends: "extends",
|
2019-07-16 18:25:45 +02:00
|
|
|
return: "returns",
|
|
|
|
constructor: "constructor",
|
|
|
|
prop: "property",
|
|
|
|
arg: "param",
|
|
|
|
augments: "extends",
|
|
|
|
description: false,
|
|
|
|
desc: false,
|
|
|
|
inheritdoc: false,
|
2019-08-06 08:55:00 +02:00
|
|
|
class: "constructor"
|
2019-07-16 18:25:45 +02:00
|
|
|
},
|
|
|
|
overrideReplacesDocs: false
|
2019-07-09 23:38:18 +02:00
|
|
|
}
|
2018-03-16 11:07:39 +01:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
2019-06-22 16:26:35 +02:00
|
|
|
files: ["lib/**/*.runtime.js", "hot/*.js"],
|
2018-03-16 11:07:39 +01:00
|
|
|
env: {
|
2018-04-02 14:42:22 +02:00
|
|
|
es6: false,
|
|
|
|
browser: true
|
2018-03-16 11:07:39 +01:00
|
|
|
},
|
|
|
|
globals: {
|
2018-07-10 12:18:34 +02:00
|
|
|
Promise: false
|
2018-03-16 11:07:39 +01:00
|
|
|
},
|
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 5
|
|
|
|
}
|
2018-04-02 13:24:58 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ["test/**/*.js"],
|
|
|
|
env: {
|
2018-04-11 23:30:28 +02:00
|
|
|
"jest/globals": true
|
2018-07-10 12:18:34 +02:00
|
|
|
},
|
|
|
|
globals: {
|
2020-11-26 11:13:17 +01:00
|
|
|
nsObj: false,
|
|
|
|
jasmine: false
|
2018-04-11 23:30:28 +02:00
|
|
|
}
|
2018-03-16 11:07:39 +01:00
|
|
|
}
|
|
|
|
]
|
2017-04-20 08:53:44 +02:00
|
|
|
};
|