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: {
|
|
|
|
ecmaVersion: 2017
|
|
|
|
},
|
|
|
|
rules: {
|
2017-11-15 13:52:01 +01:00
|
|
|
"prettier/prettier": "error",
|
2016-12-29 17:10:41 +01:00
|
|
|
"no-undef": "error",
|
2017-01-11 10:51:58 +01:00
|
|
|
"no-extra-semi": "error",
|
|
|
|
"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",
|
2017-01-11 10:51:58 +01:00
|
|
|
"global-require": "off",
|
2018-09-19 13:05:22 +02:00
|
|
|
"brace-style": "off",
|
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-03-16 11:07:39 +01:00
|
|
|
"no-unused-vars": ["error", { args: "none" }],
|
2016-12-29 17:10:41 +01:00
|
|
|
"no-unsafe-negation": "error",
|
|
|
|
"no-loop-func": "warn",
|
2018-08-24 16:57:16 +02:00
|
|
|
indent: "off",
|
2016-12-29 17:10:41 +01:00
|
|
|
"no-console": "off",
|
2017-11-04 09:35:19 +01:00
|
|
|
"node/no-unsupported-features": "error",
|
2017-04-20 08:53:44 +02:00
|
|
|
"node/no-deprecated-api": "error",
|
|
|
|
"node/no-missing-import": "error",
|
2018-03-16 11:07:39 +01:00
|
|
|
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
|
2017-04-20 08:53:44 +02:00
|
|
|
"node/no-unpublished-bin": "error",
|
|
|
|
"node/no-unpublished-require": "error",
|
2019-07-09 22:15:14 +02:00
|
|
|
"node/process-exit-as-throw": "error",
|
2019-07-09 23:38:18 +02:00
|
|
|
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
|
2019-07-16 18:25:45 +02:00
|
|
|
"jsdoc/check-tag-names": "error",
|
|
|
|
"jsdoc/check-param-names": "error",
|
|
|
|
"jsdoc/require-param-description": "error",
|
|
|
|
"jsdoc/require-param-name": "error",
|
|
|
|
"jsdoc/require-param-type": "error",
|
|
|
|
"jsdoc/require-param": "error",
|
|
|
|
"jsdoc/require-returns-description": "error",
|
|
|
|
"jsdoc/require-returns-type": "error",
|
|
|
|
"jsdoc/require-returns": "error"
|
2019-07-09 23:38:18 +02:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
jsdoc: {
|
|
|
|
// supported tags https://github.com/microsoft/TypeScript-wiki/blob/master/JSDoc-support-in-JavaScript.md
|
|
|
|
tagNamePreference: {
|
|
|
|
...(['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,
|
|
|
|
class: false
|
|
|
|
},
|
|
|
|
overrideReplacesDocs: false
|
2019-07-09 23:38:18 +02:00
|
|
|
}
|
2018-03-16 11:07:39 +01:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
|
|
|
|
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: {
|
|
|
|
nsObj: 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
|
|
|
};
|