@mistertemp/libs-front-shared 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/eslint.config.mjs +180 -0
- package/package.json +21 -17
- package/src/components/ControlledInputDate/__tests__/ControlledInputDate.unit.test.tsx +0 -1
- package/src/components/ControlledInputTime/__tests__/ControlledInputTime.unit.test.tsx +3 -9
- package/src/components/ProfessionFilter/__tests__/ProfessionFilter.unit.test.tsx +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.1](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@3.0.0...@mistertemp/libs-front-shared@3.0.1) (2026-04-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **dependencies:** add react-hook-form as peer dependency ([#951](https://github.com/mistertemp/shared-libs-front/issues/951)) ([ceb76de](https://github.com/mistertemp/shared-libs-front/commit/ceb76de44f75f510accae638d8856b8f06279477))
|
|
9
|
+
|
|
10
|
+
## [3.0.0](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@2.1.0...@mistertemp/libs-front-shared@3.0.0) (2026-04-27)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* replacing react-router-dom with react-router + eslint 9 ([#949](https://github.com/mistertemp/shared-libs-front/issues/949))
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* replacing react-router-dom with react-router + eslint 9 ([#949](https://github.com/mistertemp/shared-libs-front/issues/949)) ([585e796](https://github.com/mistertemp/shared-libs-front/commit/585e796fcf41709f90223fe26111fca158a9536b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **deps:** bump i18next-http-backend in /libs-front-shared ([#927](https://github.com/mistertemp/shared-libs-front/issues/927)) ([a4e213e](https://github.com/mistertemp/shared-libs-front/commit/a4e213ee37559561297f23048b8c1a20b791a6bf))
|
|
25
|
+
* **deps:** bump postcss from 8.5.6 to 8.5.12 in /libs-front-shared ([#942](https://github.com/mistertemp/shared-libs-front/issues/942)) ([5785605](https://github.com/mistertemp/shared-libs-front/commit/578560559b3061887d6739e42cdeb312b6d754de))
|
|
26
|
+
|
|
3
27
|
## [2.1.0](https://github.com/mistertemp/shared-libs-front/compare/@mistertemp/libs-front-shared@2.0.0...@mistertemp/libs-front-shared@2.1.0) (2026-04-17)
|
|
4
28
|
|
|
5
29
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
|
|
2
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
3
|
+
import js from '@eslint/js';
|
|
4
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
5
|
+
import tsParser from '@typescript-eslint/parser';
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
7
|
+
import _import from 'eslint-plugin-import';
|
|
8
|
+
import jsxA11Y from 'eslint-plugin-jsx-a11y';
|
|
9
|
+
import prettier from 'eslint-plugin-prettier';
|
|
10
|
+
import react from 'eslint-plugin-react';
|
|
11
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
12
|
+
import globals from 'globals';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = path.dirname(__filename);
|
|
18
|
+
const compat = new FlatCompat({
|
|
19
|
+
baseDirectory: __dirname,
|
|
20
|
+
recommendedConfig: js.configs.recommended,
|
|
21
|
+
allConfig: js.configs.all,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default defineConfig([
|
|
25
|
+
globalIgnores([
|
|
26
|
+
'**/node_modules',
|
|
27
|
+
'**/dist',
|
|
28
|
+
'**/coverage',
|
|
29
|
+
'**/.eslintcache',
|
|
30
|
+
'**/pnpm-lock.yaml',
|
|
31
|
+
]),
|
|
32
|
+
{
|
|
33
|
+
extends: fixupConfigRules(
|
|
34
|
+
compat.extends(
|
|
35
|
+
'eslint:recommended',
|
|
36
|
+
'plugin:prettier/recommended',
|
|
37
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
38
|
+
'plugin:@typescript-eslint/recommended',
|
|
39
|
+
'plugin:react/recommended',
|
|
40
|
+
'plugin:react-hooks/recommended',
|
|
41
|
+
'plugin:jsx-a11y/recommended',
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
|
|
45
|
+
plugins: {
|
|
46
|
+
import: fixupPluginRules(_import),
|
|
47
|
+
react: fixupPluginRules(react),
|
|
48
|
+
prettier: fixupPluginRules(prettier),
|
|
49
|
+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
|
50
|
+
'simple-import-sort': simpleImportSort,
|
|
51
|
+
'jsx-a11y': fixupPluginRules(jsxA11Y),
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
languageOptions: {
|
|
55
|
+
globals: {
|
|
56
|
+
...globals.browser,
|
|
57
|
+
...globals.jest,
|
|
58
|
+
...globals.node,
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
parser: tsParser,
|
|
62
|
+
ecmaVersion: 'latest',
|
|
63
|
+
sourceType: 'module',
|
|
64
|
+
|
|
65
|
+
parserOptions: {
|
|
66
|
+
ecmaFeatures: {
|
|
67
|
+
jsx: true,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
settings: {
|
|
73
|
+
react: {
|
|
74
|
+
version: 'detect',
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
'import/resolver': {
|
|
78
|
+
node: {
|
|
79
|
+
extensions: ['js', '.json', '.ts', '.d.ts', '.tsx'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
rules: {
|
|
85
|
+
'import/extensions': [
|
|
86
|
+
'error',
|
|
87
|
+
'ignorePackages',
|
|
88
|
+
{
|
|
89
|
+
js: 'never',
|
|
90
|
+
ts: 'never',
|
|
91
|
+
tsx: 'never',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
|
|
95
|
+
'simple-import-sort/imports': [
|
|
96
|
+
'error',
|
|
97
|
+
{
|
|
98
|
+
groups: [['^@?\\w'], ['^\\u0000'], ['^[^.]'], ['^\\.']],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
|
|
102
|
+
'padding-line-between-statements': [
|
|
103
|
+
'error',
|
|
104
|
+
{
|
|
105
|
+
blankLine: 'always',
|
|
106
|
+
prev: '*',
|
|
107
|
+
next: ['return', 'if', 'for', 'switch'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
blankLine: 'always',
|
|
111
|
+
prev: 'class',
|
|
112
|
+
next: '*',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
blankLine: 'always',
|
|
116
|
+
prev: ['const', 'let', 'var'],
|
|
117
|
+
next: '*',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
blankLine: 'any',
|
|
121
|
+
prev: ['const', 'let', 'var'],
|
|
122
|
+
next: ['const', 'let', 'var'],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
blankLine: 'always',
|
|
126
|
+
prev: 'multiline-const',
|
|
127
|
+
next: '*',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
|
|
131
|
+
'@typescript-eslint/no-explicit-any': ['error'],
|
|
132
|
+
|
|
133
|
+
'@typescript-eslint/no-use-before-define': [
|
|
134
|
+
'error',
|
|
135
|
+
{
|
|
136
|
+
functions: false,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
|
|
140
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
141
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
142
|
+
'no-unused-vars': 'off',
|
|
143
|
+
|
|
144
|
+
'@typescript-eslint/no-unused-vars': [
|
|
145
|
+
'error',
|
|
146
|
+
{
|
|
147
|
+
argsIgnorePattern: '^_',
|
|
148
|
+
varsIgnorePattern: '^_',
|
|
149
|
+
caughtErrorsIgnorePattern: '^_',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
|
|
153
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
154
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
155
|
+
'react/prop-types': 'off',
|
|
156
|
+
'react/react-in-jsx-scope': 'off',
|
|
157
|
+
|
|
158
|
+
'react/jsx-filename-extension': [
|
|
159
|
+
1,
|
|
160
|
+
{
|
|
161
|
+
extensions: ['.tsx'],
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
|
|
165
|
+
'react/no-unescaped-entities': 'off',
|
|
166
|
+
|
|
167
|
+
'no-console': [
|
|
168
|
+
'error',
|
|
169
|
+
{
|
|
170
|
+
allow: ['info', 'warn', 'error'],
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
|
|
174
|
+
'react-hooks/set-state-in-effect': 'off',
|
|
175
|
+
|
|
176
|
+
// because of the filters
|
|
177
|
+
'react-hooks/refs': 'warn',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistertemp/libs-front-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"demo": "vite --config ./demo/vite.config.ts",
|
|
8
|
-
"lint": "eslint --cache .
|
|
9
|
-
"lint:fix": "eslint . --
|
|
8
|
+
"lint": "eslint --cache .",
|
|
9
|
+
"lint:fix": "eslint . --fix",
|
|
10
10
|
"lint-style": "stylelint '**/*.scss'",
|
|
11
11
|
"lint-style:fix": "stylelint '**/*.scss' --fix",
|
|
12
12
|
"type-check": "tsc --noEmit",
|
|
@@ -21,8 +21,10 @@
|
|
|
21
21
|
"extends": "./.stylelintrc"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
24
|
+
"@eslint/compat": "2.0.5",
|
|
25
|
+
"@eslint/eslintrc": "3.3.5",
|
|
26
|
+
"@eslint/js": "9.39.4",
|
|
27
|
+
"@mistertemp/design-system": "14.0.0",
|
|
26
28
|
"@mistertemp/libs-work-environments": "0.8.1",
|
|
27
29
|
"@mistertemp/types-shared": "2.7.0",
|
|
28
30
|
"@testing-library/dom": "10.4.1",
|
|
@@ -34,32 +36,33 @@
|
|
|
34
36
|
"@types/react": "18.3.12",
|
|
35
37
|
"@types/react-dom": "18.3.5",
|
|
36
38
|
"@types/react-transition-group": "4.4.12",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
38
|
-
"@typescript-eslint/parser": "8.
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "8.59.0",
|
|
40
|
+
"@typescript-eslint/parser": "8.59.0",
|
|
39
41
|
"@vitejs/plugin-react-swc": "4.1.0",
|
|
40
42
|
"date-fns": "3.6.0",
|
|
41
|
-
"eslint": "
|
|
43
|
+
"eslint": "9.39.4",
|
|
42
44
|
"eslint-config-prettier": "10.1.8",
|
|
43
45
|
"eslint-plugin-import": "2.32.0",
|
|
44
46
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
45
|
-
"eslint-plugin-prettier": "5.5.
|
|
47
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
46
48
|
"eslint-plugin-react": "7.37.5",
|
|
47
|
-
"eslint-plugin-react-hooks": "
|
|
48
|
-
"eslint-plugin-simple-import-sort": "
|
|
49
|
-
"eslint-plugin-testing-library": "7.
|
|
49
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
50
|
+
"eslint-plugin-simple-import-sort": "13.0.0",
|
|
51
|
+
"eslint-plugin-testing-library": "7.16.2",
|
|
50
52
|
"fuse.js": "7.1.0",
|
|
53
|
+
"globals": "17.5.0",
|
|
51
54
|
"i18next": "25.5.2",
|
|
52
55
|
"i18next-browser-languagedetector": "8.2.0",
|
|
53
|
-
"i18next-http-backend": "3.0.
|
|
56
|
+
"i18next-http-backend": "3.0.6",
|
|
54
57
|
"identity-obj-proxy": "3.0.0",
|
|
55
58
|
"jest-environment-jsdom": "30.2.0",
|
|
56
59
|
"lodash": "4.18.1",
|
|
57
60
|
"prettier": "3.6.2",
|
|
58
61
|
"react": "18.3.1",
|
|
59
62
|
"react-dom": "18.3.1",
|
|
60
|
-
"react-hook-form": "7.
|
|
63
|
+
"react-hook-form": "7.74.0",
|
|
61
64
|
"react-i18next": "15.7.3",
|
|
62
|
-
"react-router
|
|
65
|
+
"react-router": "7.14.2",
|
|
63
66
|
"react-transition-group": "4.4.5",
|
|
64
67
|
"sass": "1.93.2",
|
|
65
68
|
"stylelint": "16.25.0",
|
|
@@ -74,14 +77,15 @@
|
|
|
74
77
|
"vite-plugin-svgr": "4.5.0"
|
|
75
78
|
},
|
|
76
79
|
"peerDependencies": {
|
|
77
|
-
"@mistertemp/design-system": ">=
|
|
80
|
+
"@mistertemp/design-system": ">=14.0.0",
|
|
78
81
|
"@mistertemp/libs-work-environments": "^0.8.1",
|
|
79
82
|
"i18next": "^25.4.2",
|
|
80
83
|
"i18next-browser-languagedetector": ">=8.2.0",
|
|
81
84
|
"i18next-http-backend": ">=3.0.2",
|
|
82
85
|
"react": "^18.3.1",
|
|
83
86
|
"react-dom": "^18.3.1",
|
|
84
|
-
"react-i18next": "^15.0.0"
|
|
87
|
+
"react-i18next": "^15.0.0",
|
|
88
|
+
"react-hook-form": "^7.74.0"
|
|
85
89
|
},
|
|
86
90
|
"browserslist": {
|
|
87
91
|
"production": [
|
|
@@ -66,7 +66,6 @@ describe('Components => ControlledInputDate', () => {
|
|
|
66
66
|
|
|
67
67
|
expect(input).toBeInTheDocument();
|
|
68
68
|
|
|
69
|
-
// eslint-disable-next-line testing-library/no-unnecessary-act
|
|
70
69
|
await act(async () => {
|
|
71
70
|
await userEvent.type(input, '2/2/22');
|
|
72
71
|
fireEvent.focusOut(input);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { useForm } from 'react-hook-form';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { render, screen } from '../../../../.jest/reactTestingLibrary.config';
|
|
8
8
|
import { ControlledInputTime } from '../ControlledInputTime';
|
|
9
9
|
|
|
10
10
|
describe('Components => ControlledInputTime', () => {
|
|
@@ -72,10 +72,7 @@ describe('Components => ControlledInputTime', () => {
|
|
|
72
72
|
|
|
73
73
|
expect(input).toBeInTheDocument();
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
await act(async () => {
|
|
77
|
-
await userEvent.type(input, '2020');
|
|
78
|
-
});
|
|
75
|
+
await userEvent.type(input, '2020');
|
|
79
76
|
|
|
80
77
|
expect(input).toHaveValue('20:20');
|
|
81
78
|
expect(onChange).toHaveBeenCalledWith('20:20');
|
|
@@ -97,10 +94,7 @@ describe('Components => ControlledInputTime', () => {
|
|
|
97
94
|
|
|
98
95
|
expect(input).toBeInTheDocument();
|
|
99
96
|
|
|
100
|
-
|
|
101
|
-
await act(async () => {
|
|
102
|
-
await userEvent.type(input, '2020');
|
|
103
|
-
});
|
|
97
|
+
await userEvent.type(input, '2020');
|
|
104
98
|
|
|
105
99
|
expect(input).toHaveValue('20-20');
|
|
106
100
|
expect(onChange).toHaveBeenCalledWith('20LL20');
|
|
@@ -41,10 +41,7 @@ describe('ProfessionFilter', () => {
|
|
|
41
41
|
expect(screen.getByTestId('filters+profession-bottom-action-button')).toHaveTextContent(
|
|
42
42
|
'scc-common-filters:actions.removeFilter',
|
|
43
43
|
);
|
|
44
|
-
expect(
|
|
45
|
-
//eslint-disable-next-line testing-library/no-node-access
|
|
46
|
-
screen.getByTestId('filters+profession-options').children.length,
|
|
47
|
-
).toBe(1);
|
|
44
|
+
expect(screen.getByTestId('filters+profession-options').children.length).toBe(1);
|
|
48
45
|
});
|
|
49
46
|
|
|
50
47
|
it('should render custom cta title and placeholder', () => {
|