Skip to content

Commit 4adf79b

Browse files
committed
Additional jest and eslint config for JSX
1 parent 2512cb5 commit 4adf79b

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

Diff for: .eslintrc.front.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ module.exports = {
2626
unnamedComponents: 'arrow-function',
2727
},
2828
],
29-
'import/no-unresolved': 0,
3029
'generator-star-spacing': 0,
3130
'no-console': 0,
3231
'require-atomic-updates': 0,
@@ -48,8 +47,16 @@ module.exports = {
4847
'implicit-arrow-linebreak': 0,
4948
'import/no-extraneous-dependencies': 0,
5049
'import/no-named-as-default': 0,
50+
'import/no-unresolved': 0,
5151
'import/order': 2,
5252
'import/prefer-default-export': 'off',
53+
'jsx-a11y/anchor-is-valid': [
54+
'error',
55+
{
56+
components: ['Link'],
57+
specialLink: ['to'],
58+
},
59+
],
5360
'jsx-a11y/click-events-have-key-events': 1,
5461
'max-len': [
5562
2,

Diff for: jest.config.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,19 @@ const jestConfig = {
3535
roots: ['<rootDir>/admin/src/', '<rootDir>/server/'],
3636
verbose: true,
3737
transform: {
38-
'\\.[jt]s$': '@swc/jest',
38+
'\\.[jt]s$': [
39+
'@swc/jest',
40+
{
41+
jsc: {
42+
parser: {
43+
jsx: true,
44+
dynamicImport: true,
45+
},
46+
// this should match the minimum supported node.js version
47+
target: 'es2020',
48+
},
49+
},
50+
],
3951
},
4052
};
4153

0 commit comments

Comments
 (0)