Skip to content

Commit e34a438

Browse files
authored
Merge pull request #74 from idebenone/chore/update-workflow-deps
chore : update Github workflows and dependencies
2 parents 46fd5a9 + 595f9a2 commit e34a438

12 files changed

+1821
-618
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = false
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
quote_type = single

.eslintrc

-8
This file was deleted.

.github/workflows/eslint.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: ESLint CodeX
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
lint:
7+
name: ESlint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: yarn install
12+
- run: yarn lint

.github/workflows/npm-publish.yml

+5-28
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,8 @@ on:
66
- master
77

88
jobs:
9-
publish:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 19
16-
registry-url: https://registry.npmjs.org/
17-
- run: yarn
18-
- run: yarn build
19-
- run: yarn publish --access=public
20-
env:
21-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22-
notify:
23-
needs: publish
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v2
27-
- name: Get package info
28-
id: package
29-
uses: codex-team/action-nodejs-package-info@v1
30-
- name: Send a message
31-
uses: codex-team/action-codexbot-notify@v1
32-
with:
33-
webhook: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
34-
message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
35-
parse_mode: 'markdown'
36-
disable_web_page_preview: true
9+
publish-and-notify:
10+
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main
11+
secrets:
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}

.jshintrc

-62
This file was deleted.

eslint.config.mjs

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import Codex from "eslint-config-codex";
2+
import { plugin as TsPlugin, parser as TsParser } from 'typescript-eslint';
3+
4+
export default [
5+
...Codex,
6+
{
7+
files: ['src/**/*.ts'],
8+
languageOptions: {
9+
parser: TsParser,
10+
parserOptions: {
11+
project: './tsconfig.json',
12+
tsconfigRootDir: './',
13+
sourceType: 'module',
14+
},
15+
},
16+
rules: {
17+
'n/no-missing-import': ['off'],
18+
'n/no-unsupported-features/node-builtins': ['off'],
19+
'jsdoc/require-returns-description': ['off'],
20+
'@typescript-eslint/naming-convention': [
21+
'error',
22+
{
23+
'selector': 'variable',
24+
'format': ['camelCase'],
25+
'leadingUnderscore': 'allow'
26+
},
27+
],
28+
'@typescript-eslint/no-unsafe-member-access': ['off'],
29+
'@typescript-eslint/no-restricted-types': ['error',
30+
{
31+
'types': {
32+
'String': "Use 'string' instead.",
33+
'Boolean': "Use 'boolean' instead.",
34+
'Number': "Use 'number' instead.",
35+
'Symbol': "Use 'symbol' instead.",
36+
'Object': "Use 'object' instead, or define a more specific type.",
37+
'Function': "Use a specific function type instead, like '(arg: type) => returnType'."
38+
}
39+
}
40+
]
41+
}
42+
},
43+
{
44+
ignores: ['dev/**', 'eslint.config.mjs', 'vite.config.js', 'postcss.config.js']
45+
}
46+
];

package.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/code",
3-
"version": "2.9.1",
3+
"version": "2.9.2",
44
"keywords": [
55
"codex editor",
66
"code",
@@ -26,21 +26,23 @@
2626
"scripts": {
2727
"dev": "vite",
2828
"build": "vite build",
29-
"lint": "eslint src/**.ts --ext .ts",
30-
"lint:errors": "eslint src/**.ts --quiet",
31-
"lint:fix": "eslint src/**.ts --fix"
29+
"lint": "eslint",
30+
"lint:errors": "eslint --quiet",
31+
"lint:fix": "eslint --fix"
3232
},
3333
"author": {
3434
"name": "CodeX Team",
3535
"email": "[email protected]"
3636
},
3737
"devDependencies": {
3838
"@editorjs/editorjs": "^2.30.2",
39-
"@typescript-eslint/eslint-plugin": "^7.16.1",
40-
"@typescript-eslint/parser": "^7.16.1",
41-
"eslint": "^8.57.0",
39+
"@typescript-eslint/eslint-plugin": "^8.4.0",
40+
"@typescript-eslint/parser": "^8.4.0",
41+
"eslint": "^9.9.1",
42+
"eslint-config-codex": "^2.0.2",
4243
"typescript": "^5.5.3",
43-
"vite": "^4.5.0",
44+
"typescript-eslint": "^8.4.0",
45+
"vite": "^5.4.3",
4446
"vite-plugin-css-injected-by-js": "^3.3.0",
4547
"vite-plugin-dts": "^3.9.1"
4648
},

0 commit comments

Comments
 (0)