@sap-ux/control-property-editor 0.7.3 → 0.7.4

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.
@@ -0,0 +1,24 @@
1
+ const base = require('../../eslint.config.js');
2
+ const tsParser = require('@typescript-eslint/parser');
3
+
4
+ module.exports = [
5
+ ...base,
6
+ {
7
+ languageOptions: {
8
+ parserOptions: {
9
+ parser: tsParser,
10
+ tsconfigRootDir: __dirname,
11
+ project: './tsconfig.eslint.json',
12
+ },
13
+ },
14
+ rules: {
15
+ // switched off temporarily until logger for webapps
16
+ 'no-console': 'off'
17
+ },
18
+ settings: {
19
+ 'react': {
20
+ 'version': 'detect'
21
+ }
22
+ }
23
+ },
24
+ ];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Control Property Editor",
4
4
  "description": "Control Property Editor",
5
5
  "license": "Apache-2.0",
6
- "version": "0.7.3",
6
+ "version": "0.7.4",
7
7
  "main": "dist/app.js",
8
8
  "repository": {
9
9
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@types/source-map-support": "0.5.0",
26
26
  "@types/react": "16.14.55",
27
27
  "body-parser": "1.20.3",
28
- "eslint-plugin-react": "7.33.2",
28
+ "eslint-plugin-react": "7.37.5",
29
29
  "http-proxy-middleware": "2.0.9",
30
30
  "i18next": "25.3.0",
31
31
  "jest-scss-transform": "1.0.4",
@@ -48,8 +48,8 @@
48
48
  "esbuild-plugin-copy": "2.1.1",
49
49
  "@esbuild-plugins/node-modules-polyfill": "0.2.2",
50
50
  "uuid": "11.0.5",
51
- "@sap-ux/ui-components": "1.26.16",
52
- "@sap-ux-private/control-property-editor-common": "0.7.2"
51
+ "@sap-ux/ui-components": "1.26.17",
52
+ "@sap-ux-private/control-property-editor-common": "0.7.3"
53
53
  },
54
54
  "scripts": {
55
55
  "clean": "rimraf --glob dist coverage *.tsbuildinfo",
@@ -60,7 +60,7 @@
60
60
  "watch:webapp": "node esbuild.js --watch --minify=false",
61
61
  "test": "jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
62
62
  "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --colors",
63
- "lint": "eslint . --ext .ts,.tsx",
64
- "lint:fix": "eslint . --ext .ts,.tsx --fix"
63
+ "lint": "eslint",
64
+ "lint:fix": "eslint --fix"
65
65
  }
66
66
  }
@@ -281,7 +281,7 @@ export const Tree = (): ReactElement => {
281
281
  disabled: isNavigationMode ? true : !child.enabled,
282
282
  title: isNavigationMode
283
283
  ? t('CONTEXT_MENU_ACTION_DISABLED_IN_NAVIGATION_MODE')
284
- : child?.tooltip ?? child?.title,
284
+ : (child?.tooltip ?? child?.title),
285
285
  onClick(): void {
286
286
  if (isExtensionPoint) {
287
287
  dispatch(addExtensionPoint(showActionContextualMenu));
@@ -23,7 +23,7 @@ export interface PropertyDocumentationProps {
23
23
  *
24
24
  * @param controlId - The ID of the control.
25
25
  * @param propertyName - The name of the property.
26
- * @param propertyName - The filename of the saved property.
26
+ * @param fileName - The filename of the saved property.
27
27
  */
28
28
  onDelete?(controlId: string, propertyName: string, fileName?: string): void;
29
29
  }
@@ -27,7 +27,7 @@ export function useLocalStorage<T>(key: string, defaultValue: T): [T, React.Disp
27
27
 
28
28
  try {
29
29
  return JSON.parse(savedValue);
30
- } catch (e) {
30
+ } catch {
31
31
  return defaultValue;
32
32
  }
33
33
  });
@@ -7,8 +7,7 @@ import type { RenderOptions, RenderResult } from '@testing-library/react';
7
7
  import { render as rtlRender } from '@testing-library/react';
8
8
  import { Provider } from 'react-redux';
9
9
 
10
- import { initialState } from '../../src/slice';
11
- import reducer from '../../src/slice';
10
+ import reducer, { initialState } from '../../src/slice';
12
11
 
13
12
  export type State = ReturnType<typeof reducer>;
14
13
 
@@ -25,6 +24,7 @@ export function render(
25
24
  ...renderOptions
26
25
  }: Options<ReturnType<typeof createInitialState>> = {}
27
26
  ): RenderResult & { store: Store; dispatch: jest.SpyInstance<Dispatch> } {
27
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
28
28
  function Wrapper({ children }: PropsWithChildren<{}>): ReactElement {
29
29
  return <Provider store={store}>{children}</Provider>;
30
30
  }
@@ -37,16 +37,19 @@ export function render(
37
37
  export interface DOMEventListenerMock {
38
38
  simulateEvent: (name: string, value: object) => void;
39
39
  cleanDomEventListeners: () => void;
40
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
40
41
  domEventListeners: { [k: string]: Array<Function> };
41
42
  }
42
43
 
43
44
  export const mockDomEventListener = (handler: Document | Window | Element = document): DOMEventListenerMock => {
45
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
44
46
  const domEventListeners: { [k: string]: Array<Function> } = {};
45
47
  // Mock for add event listener
46
48
  handler.addEventListener = jest.fn((event, cb) => {
47
49
  if (!domEventListeners[event]) {
48
50
  domEventListeners[event] = [];
49
51
  }
52
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
50
53
  domEventListeners[event].push(cb as Function);
51
54
  });
52
55
  handler.removeEventListener = jest.fn((event, cb) => {
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- dist
package/.eslintrc.js DELETED
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- extends: ['../../.eslintrc', 'plugin:react/recommended'],
3
- parserOptions: {
4
- project: './tsconfig.eslint.json',
5
- tsconfigRootDir: __dirname
6
- },
7
- rules: {
8
- // switched off temporarily until logger for webapps
9
- 'no-console': 'off'
10
- },
11
- settings: {
12
- 'react': {
13
- 'version': 'detect'
14
- }
15
- }
16
- };