-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (66 loc) · 1.32 KB
/
eslint.config.js
File metadata and controls
67 lines (66 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import eslintPluginPrettier from "eslint-plugin-prettier";
import globals from "globals";
export default [
{
ignores: [
"node_modules/**/*",
"core/scripts/APIandLibraries/**/*",
"**/*.min.js",
"**/playwright-report/**/*",
"**/test-results/**/*",
],
},
{
languageOptions: {
ecmaVersion: 2021,
sourceType: "module",
globals: {
...globals.browser,
...globals.jest,
...globals.node,
},
},
plugins: {
eslintPluginPrettier,
},
rules: {
camelcase: "off",
indent: ["error", "tab"],
"no-alert": "off",
"no-console": "off",
"no-continue": "off",
"no-param-reassign": "off",
"no-restricted-syntax": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"eslintPluginPrettier/prettier": "error",
semi: ["error", "always"],
},
},
// Jest-specific configuration for test files
{
files: ["**/*.test.js", "**/test/**/*.js"],
languageOptions: {
globals: {
...globals.jest,
},
},
},
// Playwright-specific configuration for e2e test files
{
files: ["**/playwright/**/*.js", "**/*.spec.js"],
languageOptions: {
globals: {
...globals.node,
// Playwright test runner globals
test: true,
expect: true,
beforeAll: true,
afterAll: true,
beforeEach: true,
afterEach: true,
},
},
},
];