-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy patheslint.config.js
More file actions
94 lines (84 loc) · 2.09 KB
/
Copy patheslint.config.js
File metadata and controls
94 lines (84 loc) · 2.09 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
process.env.ENABLE_NEW_JSX_TRANSFORM = 'true';
const globals = require('globals');
const mcAppConfig = require('@commercetools-frontend/eslint-config-mc-app');
module.exports = [
{
ignores: [
'dist/',
'**/dist/',
'proxy_exports/**/*.js',
'node_modules/*',
'**/node_modules/*',
'vendors/*',
'**/raw-components',
'generators/**',
],
},
// Spread the base config (replaces "extends")
...mcAppConfig,
// testing-library overrides for spec/test files
{
files: ['**/*.{spec,test}.{js,jsx,ts,tsx}'],
rules: {
'testing-library/no-node-access': 'off',
'testing-library/no-container': 'off',
},
},
// testing-library overrides for test utility files
{
files: [
'**/test-utils/**/*.{jsx,tsx}',
'**/*test-utils.{jsx,tsx}',
'**/*test-helpers.{jsx,tsx}',
],
rules: {
'testing-library/no-node-access': 'off',
'testing-library/no-container': 'off',
},
},
// React display-name override for visual routes and docs
// (react plugin is registered for *.js, *.jsx, *.tsx)
{
files: ['**/*.visualroute.js', '**/docs/*.js'],
rules: {
'react/display-name': 'off',
},
},
// Docs snippets show imports from a consumer's perspective,
// not the documenting workspace's own declared deps.
{
files: ['**/docs/**', '**/_docs/**'],
rules: {
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
// Globals for visual spec files
{
files: ['**/*.visualspec.js'],
languageOptions: {
globals: {
...globals.jest,
page: 'readonly',
HOST: 'readonly',
globalThis: 'readonly',
},
},
},
// Bundle spec files use jest globals but don't match *.{spec,test}.js pattern
{
files: ['**/*.bundlespec.js'],
languageOptions: {
globals: {
...globals.jest,
},
},
},
// Version files — allow anonymous default exports
{
files: ['**/version.js', '**/version.ts'],
rules: {
'import/no-anonymous-default-export': 'off',
},
},
];