webpack/.eslintrc.js

103 lines
2.5 KiB
JavaScript
Raw Normal View History

module.exports = {
2018-03-16 11:07:39 +01:00
root: true,
plugins: ["prettier", "node", "jest", "jsdoc"],
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",
"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",
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",
"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" }],
"no-unsafe-negation": "error",
"no-loop-func": "warn",
indent: "off",
"no-console": "off",
"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",
"node/process-exit-as-throw": "error",
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
"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"
},
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",
return: "returns",
constructor: "constructor",
prop: "property",
arg: "param",
augments: "extends",
description: false,
desc: false,
inheritdoc: false,
class: false
},
overrideReplacesDocs: false
}
2018-03-16 11:07:39 +01:00
},
overrides: [
{
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
env: {
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
};