2021-05-09 18:51:26 +00:00
|
|
|
"use strict";
|
2020-02-21 08:34:55 +00:00
|
|
|
|
2018-11-08 06:48:01 +00:00
|
|
|
module.exports = {
|
2021-05-09 18:51:26 +00:00
|
|
|
extends: [
|
|
|
|
"plugin:compat/recommended",
|
|
|
|
"plugin:node/recommended",
|
|
|
|
"plugin:no-unsanitized/DOM",
|
|
|
|
"plugin:promise/recommended",
|
|
|
|
"plugin:import/errors",
|
|
|
|
"plugin:markdown/recommended",
|
|
|
|
"plugin:sonarjs/recommended",
|
|
|
|
"eslint:recommended"
|
|
|
|
],
|
2021-05-12 23:00:09 +00:00
|
|
|
plugins: [ "jsdoc", "promise", "html", "import", "sonarjs" ],
|
2018-11-16 07:15:17 +00:00
|
|
|
parserOptions: {
|
2020-07-31 23:23:28 +00:00
|
|
|
ecmaVersion: 2020,
|
2021-05-09 18:51:26 +00:00
|
|
|
sourceType: "module"
|
2018-11-08 06:48:01 +00:00
|
|
|
},
|
2018-11-16 07:15:17 +00:00
|
|
|
env: {
|
2020-07-26 18:11:18 +00:00
|
|
|
browser: true,
|
|
|
|
es6: true
|
2018-11-08 06:48:01 +00:00
|
|
|
},
|
2018-11-16 07:15:17 +00:00
|
|
|
rules: {
|
2021-05-09 18:51:26 +00:00
|
|
|
"node/no-unsupported-features/es-syntax": 0,
|
2021-05-12 23:00:09 +00:00
|
|
|
"no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ],
|
|
|
|
"sonarjs/cognitive-complexity": [ "warn", 40 ],
|
2021-05-09 18:51:26 +00:00
|
|
|
"sonarjs/no-duplicate-string": 0,
|
2021-05-12 22:46:46 +00:00
|
|
|
"semi" : "error",
|
2021-05-12 23:00:09 +00:00
|
|
|
"no-trailing-spaces": "error",
|
|
|
|
"array-bracket-spacing": [ "error", "always" ],
|
|
|
|
"comma-spacing": "error",
|
|
|
|
"object-curly-spacing": [ "error", "always" ],
|
2020-07-26 18:11:18 +00:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
2021-05-12 23:00:09 +00:00
|
|
|
files: [ 'cypress/**/*' ],
|
|
|
|
extends: [
|
2021-05-09 18:51:26 +00:00
|
|
|
"plugin:cypress/recommended"
|
2020-07-31 23:23:28 +00:00
|
|
|
],
|
|
|
|
env: {
|
2021-05-09 18:51:26 +00:00
|
|
|
mocha: true,
|
2020-07-31 23:23:28 +00:00
|
|
|
node: true
|
|
|
|
},
|
2021-05-09 18:51:26 +00:00
|
|
|
globals: {
|
|
|
|
"assert": true
|
2020-07-31 23:23:28 +00:00
|
|
|
},
|
|
|
|
rules: {
|
2021-05-09 18:51:26 +00:00
|
|
|
// with ci, instrumented is not created before linter
|
2021-05-12 23:00:09 +00:00
|
|
|
"import/no-unresolved": [ 2, { ignore: [ 'instrumented' ] } ],
|
2021-05-09 18:51:26 +00:00
|
|
|
"node/no-missing-import": 0
|
2020-07-31 23:23:28 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2021-05-12 23:00:09 +00:00
|
|
|
files: [ 'docs/**/*' ],
|
2021-05-09 18:51:26 +00:00
|
|
|
rules: { // md files have example that don't need a strict checking
|
|
|
|
"no-undef": 0,
|
|
|
|
"import/no-unresolved": 0,
|
|
|
|
"node/no-missing-import": 0,
|
|
|
|
"jsdoc/check-examples": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
rejectExampleCodeRegex: "^`",
|
|
|
|
checkDefaults: true,
|
|
|
|
checkParams: true,
|
|
|
|
checkProperties: true
|
|
|
|
}
|
2020-07-31 23:23:28 +00:00
|
|
|
]
|
|
|
|
}
|
2020-07-26 18:11:18 +00:00
|
|
|
}
|
|
|
|
]
|
2018-11-08 06:48:01 +00:00
|
|
|
};
|