Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import babelParser from "babel-eslint";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: [
"services/web/client/source/resource/",
"services/web/client/contrib/",
"services/web/client/source-output/",
"services/*node_modules/",
"services/dy-modeling/client/source/resource/",
"services/dy-modeling/client/source-output/",
"services/dy-modeling/server/source/thrift/",
],
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
osparc: false,
window: false,
},

parser: babelParser,
},

rules: {
"max-len": [2, 150],
"new-cap": "off",
"require-jsdoc": "off",
"linebreak-style": ["error", "unix"],
curly: ["warn", "all"],
"block-scoped-var": "warn",
"brace-style": ["warn", "1tbs"],

indent: ["warn", 2, {
SwitchCase: 1,
}],

"object-property-newline": "warn",

"object-curly-newline": ["warn", {
ObjectExpression: {
multiline: true,
minProperties: 1,
},

ObjectPattern: {
multiline: true,
minProperties: 3,
},
}],

"key-spacing": ["warn", {
singleLine: {
beforeColon: false,
afterColon: true,
},

multiLine: {
beforeColon: false,
afterColon: true,
},
}],

"no-dupe-keys": "warn",
"no-dupe-class-members": "warn",

"no-unused-vars": ["warn", {
args: "none",
}],
},
}];
59 changes: 59 additions & 0 deletions services/static-webserver/client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

// eslint-disable-next-line no-underscore-dangle
const __filename = fileURLToPath(import.meta.url);
// eslint-disable-next-line no-underscore-dangle
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("qx"), {
languageOptions: {
globals: {
...globals.browser,
qx: false,
q: false,
qxWeb: false,
osparc: false,
explorer: false,
Ajv: false,
objectPath: false,
},

ecmaVersion: 2017,
sourceType: "script",
},

rules: {
camelcase: ["error", {
properties: "always",
}],

"no-underscore-dangle": ["error", {
allowAfterThis: true,
enforceInMethodNames: false,
}],

"no-warning-comments": "off",
"no-confusing-arrow": "off",
"object-curly-newline": "off",

"newline-per-chained-call": ["error", {
ignoreChainWithDepth: 3,
}],

"no-eq-null": 0,
semi: "off",
"comma-dangle": "off",
"object-curly-spacing": "off",
"no-implicit-coercion": "off",
"arrow-body-style": "off",
},
}];
23 changes: 23 additions & 0 deletions tests/e2e/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import globals from "globals";

export default [{
languageOptions: {
globals: {
...globals.jest,
...globals.node,
...globals.browser,
page: true,
browser: true,
context: true,
jestPuppeteer: true,
console: true,
url: true,
apiVersion: true,
ourTimeout: true,
},
},

rules: {
"no-console": "off",
},
}];
Loading