* Improved development server Allow running the D-Installer module from a local machine, forward the connection to the target Cockpit instance * Always use HTTPS, even for a local Cockpit * Allow external connections * Login from the development server automatically * Handle connection errors * Show target info in the sidebar * Do not link to localhost from outside * Added unit tests
65 lines
2 KiB
JSON
65 lines
2 KiB
JSON
{
|
|
"root": true,
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true,
|
|
"jest": true
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"standard",
|
|
"standard-jsx",
|
|
"standard-react",
|
|
"plugin:@typescript-eslint/recommended"
|
|
],
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 7,
|
|
"ecmaFeatures": {
|
|
"jsx": true
|
|
},
|
|
"sourceType": "module"
|
|
},
|
|
"plugins": ["flowtype", "react", "react-hooks", "@typescript-eslint"],
|
|
"rules": {
|
|
"indent": ["error", 2,
|
|
{
|
|
"ObjectExpression": "first",
|
|
"CallExpression": {"arguments": "first"},
|
|
"MemberExpression": 1,
|
|
"ignoredNodes": [ "JSXAttribute" ],
|
|
"SwitchCase": 1
|
|
}],
|
|
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
|
|
"no-var": "error",
|
|
"no-use-before-define": "off",
|
|
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
|
|
"@typescript-eslint/no-use-before-define": "warn",
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
|
|
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
|
|
"react/jsx-indent": ["error", 2],
|
|
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
|
|
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "error",
|
|
|
|
"camelcase": "off",
|
|
"comma-dangle": "off",
|
|
"curly": "off",
|
|
"jsx-quotes": "off",
|
|
"key-spacing": "off",
|
|
"no-console": "off",
|
|
"quotes": "off",
|
|
"react/jsx-curly-spacing": "off",
|
|
"react/jsx-indent-props": "off",
|
|
"react/prop-types": "off",
|
|
"space-before-function-paren": "off",
|
|
"n/no-callback-literal": "off"
|
|
},
|
|
"globals": {
|
|
"require": false,
|
|
"module": false,
|
|
"COCKPIT_TARGET_URL": "readonly"
|
|
}
|
|
}
|