Skip to content

Commit 3d01be4

Browse files
authored
fix(types): tools export types added (#2802)
* fix types export * lint * changelog * tests fixed * fix tests imports * lint tests * upd submodule * Update yarn.lock * rename wrapper to factory * Update package.json * rename to adapters * Update tools.d.ts * BlockTool -> BlockToolAdapter etc * Update nested-list * Update collection.ts
1 parent 057bf17 commit 3d01be4

File tree

131 files changed

+776
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+776
-471
lines changed

.eslintrc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@
3636
"navigator": true
3737
},
3838
"rules": {
39-
"jsdoc/require-returns-type": "off"
40-
}
39+
"jsdoc/require-returns-type": "off",
40+
"@typescript-eslint/strict-boolean-expressions": "warn",
41+
"@typescript-eslint/consistent-type-imports": "error",
42+
"@typescript-eslint/consistent-type-exports": "error"
43+
},
44+
"overrides": [
45+
{
46+
"files": [
47+
"tsconfig.json",
48+
"package.json",
49+
"tsconfig.*.json",
50+
"tslint.json"
51+
],
52+
"rules": {
53+
"quotes": [1, "double"],
54+
"semi": [1, "never"],
55+
}
56+
}
57+
]
4158
}

cypress.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { defineConfig } from 'cypress';
2+
import path from 'node:path';
3+
import vitePreprocessor from 'cypress-vite';
24

35
export default defineConfig({
46
env: {
@@ -12,7 +14,9 @@ export default defineConfig({
1214
// We've imported your old cypress plugins here.
1315
// You may want to clean this up later by importing these.
1416
setupNodeEvents(on, config) {
15-
on('file:preprocessor', require('cypress-vite')(config));
17+
on('file:preprocessor', vitePreprocessor({
18+
configFile: path.resolve(__dirname, './vite.config.test.js'),
19+
}));
1620

1721
/**
1822
* Plugin for cypress that adds better terminal output for easier debugging.
@@ -21,7 +25,7 @@ export default defineConfig({
2125
*/
2226
require('cypress-terminal-report/src/installLogsPrinter')(on);
2327

24-
require('./test/cypress/plugins/index.ts')(on, config);
28+
require('@cypress/code-coverage/task')(on, config);
2529
},
2630
specPattern: 'test/cypress/tests/**/*.cy.{js,jsx,ts,tsx}',
2731
supportFile: 'test/cypress/support/index.ts',

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 2.30.4
4+
5+
- `Fix` - Tool's exporting types added
6+
37
### 2.30.3
48

59
- `Fix` – I18n in nested popover

example/tools/nested-list

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
},
4141
"devDependencies": {
4242
"@babel/register": "^7.21.0",
43-
"@codexteam/icons": "^0.3.0",
43+
"@codexteam/icons": "0.3.2",
4444
"@codexteam/shortcuts": "^1.1.1",
4545
"@cypress/code-coverage": "^3.10.3",
4646
"@editorjs/code": "^2.7.0",
4747
"@editorjs/delimiter": "^1.2.0",
48-
"@editorjs/header": "^2.7.0",
48+
"@editorjs/header": "^2.8.7",
4949
"@editorjs/paragraph": "^2.11.6",
5050
"@editorjs/simple-image": "^1.4.1",
5151
"@types/node": "^18.15.11",

src/codex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import { EditorConfig } from '../types';
3+
import type { EditorConfig } from '../types';
44

55
/**
66
* Apply polyfills

src/components/__module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { EditorModules } from '../types-internal/editor-modules';
2-
import { EditorConfig } from '../../types';
3-
import { ModuleConfig } from '../types-internal/module-config';
1+
import type { EditorModules } from '../types-internal/editor-modules';
2+
import type { EditorConfig } from '../../types';
3+
import type { ModuleConfig } from '../types-internal/module-config';
44
import Listeners from './utils/listeners';
5-
import EventsDispatcher from './utils/events';
6-
import { EditorEventMap } from './events';
5+
import type EventsDispatcher from './utils/events';
6+
import type { EditorEventMap } from './events';
77

88
/**
99
* The type <T> of the Module generic.

src/components/block-tunes/block-tune-delete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* @classdesc Editor's default tune that moves up selected block
44
* @copyright <CodeX Team> 2018
55
*/
6-
import { API, BlockTune } from '../../../types';
6+
import type { API, BlockTune } from '../../../types';
77
import { IconCross } from '@codexteam/icons';
8-
import { MenuConfig } from '../../../types/tools/menu-config';
8+
import type { MenuConfig } from '../../../types/tools/menu-config';
99

1010
/**
1111
*

src/components/block-tunes/block-tune-move-down.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* @copyright <CodeX Team> 2018
55
*/
66

7-
import { API, BlockTune } from '../../../types';
7+
import type { API, BlockTune } from '../../../types';
88
import { IconChevronDown } from '@codexteam/icons';
9-
import { TunesMenuConfig } from '../../../types/tools';
9+
import type { TunesMenuConfig } from '../../../types/tools';
1010

1111

1212
/**

0 commit comments

Comments
 (0)