Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/bold.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Bold check
on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run ESLint check
uses: ./.github/actions/lint
with:
package-name: '@editorjs/bold'

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build the package
uses: ./.github/actions/build
with:
package-name: '@editorjs/bold'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ A model-driven, collaboration-ready Editor.js engine split into focused packages
| Package | Description |
|---|---|
| [`@editorjs/paragraph`](packages/tools/paragraph) | Built-in Paragraph block tool |
| [`@editorjs/bold`](packages/tools/bold) | Built-in Bold inline tool |

## Documentation

Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@codexteam/icons": "^0.3.3",
"@editorjs/bold": "workspace:^",
"@editorjs/collaboration-manager": "workspace:^",
"@editorjs/dom": "^1.1.0",
"@editorjs/dom-adapters": "workspace:^",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import type { CoreConfigValidated, CoreConfig, EditorjsPluginConstructor, BlockT
import { EditorAPI } from './api/index.js';
import { generateId } from './utils/uid.js';
import { Paragraph } from '@editorjs/paragraph';
import { BoldInlineTool, LinkInlineTool, ItalicInlineTool } from './tools/internal';
import { BoldInlineTool } from '@editorjs/bold';
import { LinkInlineTool, ItalicInlineTool } from './tools/internal';
import { ShortcutsPlugin } from './plugins/ShortcutsPlugin.js';
import { DOMAdapters } from '@editorjs/dom-adapters';
import { BlocksManager } from './components/BlockManager.js';
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/tools/internal/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './inline-tools/bold/index.js';
export * from './inline-tools/italic/index.js';
export * from './inline-tools/link/index.js';
3 changes: 3 additions & 0 deletions packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
},
{
"path": "../tools/paragraph/tsconfig.build.json"
},
{
"path": "../tools/bold/tsconfig.build.json"
}
]
}
3 changes: 3 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
},
{
"path": "../tools/paragraph/tsconfig.build.json"
},
{
"path": "../tools/bold/tsconfig.build.json"
}
]
}
24 changes: 24 additions & 0 deletions packages/tools/bold/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
#!.yarn/cache
#.pnp.*

# IDE
.idea/*

node_modules/*
dist/*

# tests
coverage/
reports/

# stryker temp files
.stryker-tmp
3 changes: 3 additions & 0 deletions packages/tools/bold/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Bold

Built-in Editor.js Inline Tool for bold text formatting.
27 changes: 27 additions & 0 deletions packages/tools/bold/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import CodeX from 'eslint-config-codex';

export default [
...CodeX,
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
sourceType: 'module',
},
},
rules: {
'n/no-unpublished-import': ['error', {
allowModules: [
'eslint-config-codex',
],
ignoreTypeImport: true,
}],
'n/no-missing-import': 'off',
'n/no-unsupported-features/node-builtins': ['error', {
version: '>=24.0.0',
ignores: [],
}],
},
},
];
29 changes: 29 additions & 0 deletions packages/tools/bold/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@editorjs/bold",
"version": "0.0.0",
"packageManager": "yarn@4.0.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "yarn clear && tsc --build tsconfig.build.json",
"build:declaration": "yarn build --emitDeclarationOnly",
"lint": "eslint",
"lint:ci": "yarn lint --max-warnings 0",
"lint:fix": "yarn lint --fix",
"clear": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo && rm -f tsconfig.tsbuildinfo"
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@types/node": "^22.10.2",
"eslint": "^9.24.0",
"eslint-config-codex": "^2.0.3",
"eslint-plugin-import": "^2.31.0",
"typescript": "^5.5.4"
},
"dependencies": {
"@codexteam/icons": "^0.3.3",
"@editorjs/dom": "^1.1.0",
"@editorjs/sdk": "workspace:^"
}
}
13 changes: 13 additions & 0 deletions packages/tools/bold/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"exclude": [
"node_modules/**/*",
"dist/**/*",
"**/*.spec.ts"
],
"references": [
{
"path": "../../sdk/tsconfig.build.json"
}
]
}
14 changes: 14 additions & 0 deletions packages/tools/bold/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"types": ["node"],
},
"extends": "./tsconfig.json",
"include": [
"src/**/*",
"eslint.config.mjs",
],
"exclude": [
"dist/**/*",
"node_modules/**/*",
]
}
27 changes: 27 additions & 0 deletions packages/tools/bold/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"composite": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"rootDir": "src",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true
},
"include": ["src/**/*"],
"exclude": [
"node_modules/**/*",
"dist/**/*"
],
"references": [
{
"path": "../../sdk/tsconfig.build.json"
}
]
}
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,22 @@ __metadata:
languageName: node
linkType: hard

"@editorjs/bold@workspace:^, @editorjs/bold@workspace:packages/tools/bold":
version: 0.0.0-use.local
resolution: "@editorjs/bold@workspace:packages/tools/bold"
dependencies:
"@codexteam/icons": "npm:^0.3.3"
"@editorjs/dom": "npm:^1.1.0"
"@editorjs/sdk": "workspace:^"
"@types/eslint": "npm:^9.6.1"
"@types/node": "npm:^22.10.2"
eslint: "npm:^9.24.0"
eslint-config-codex: "npm:^2.0.3"
eslint-plugin-import: "npm:^2.31.0"
typescript: "npm:^5.5.4"
languageName: unknown
linkType: soft

"@editorjs/caret@npm:^1.1.0":
version: 1.1.0
resolution: "@editorjs/caret@npm:1.1.0"
Expand Down Expand Up @@ -2287,6 +2303,7 @@ __metadata:
"@babel/core": "npm:^7.29.0"
"@babel/preset-env": "npm:^7.29.2"
"@codexteam/icons": "npm:^0.3.3"
"@editorjs/bold": "workspace:^"
"@editorjs/collaboration-manager": "workspace:^"
"@editorjs/dom": "npm:^1.1.0"
"@editorjs/dom-adapters": "workspace:^"
Expand Down