forked from vuestorefront/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
65 lines (63 loc) · 1.67 KB
/
.eslintrc.js
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
const { resolve } = require('path');
module.exports = {
env: {
jest: true,
node: true,
browser: true,
es6: true,
commonjs: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: [
resolve(__dirname, './tsconfig.json'),
resolve(__dirname, './packages/api-client/tsconfig.eslint.json'),
resolve(__dirname, './packages/theme/tsconfig.json'),
resolve(__dirname, './packages/theme/tests/e2e/tsconfig.json'),
resolve(__dirname, './packages/load-tests/tsconfig.json'),
],
tsconfigRootDir: __dirname,
extraFileExtensions: ['.vue'],
ecmaVersion: 2021,
sourceType: 'module',
},
extends: [
'@vue-storefront/eslint-config-base',
'@vue-storefront/eslint-config-typescript',
'@vue-storefront/eslint-config-import',
'@vue-storefront/eslint-config-vue',
'@vue-storefront/eslint-config-jest',
],
globals: {
"__ENV": "readonly",
},
rules: {
"@typescript-eslint/no-floating-promises": "off",
"jest/expect-expect": [
"error",
{
"assertFunctionNames": ["expect", "getByRole", "getByTestId", "getByText"],
}
],
"no-plusplus": "off",
},
overrides: [
{
"files": ["packages/theme/tests/e2e/**/*"],
"rules": {
"jest/expect-expect": "off",
"promise/catch-or-return": "off", // conflicts with Cypress.Chainable
"promise/always-return": "off",
"vue/no-v-text-v-html-on-component": "warn",
"vue/no-setup-props-destructure": "warn",
}
},
{
"files": ["internals/**/*"],
"rules": {
"unicorn/prefer-module": "off",
}
}
]
}