Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore : update Github workflows and dependencies #74

Merged
merged 4 commits into from
Sep 18, 2024
Merged
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = false

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ESLint CodeX

on: [pull_request]

jobs:
lint:
name: ESlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install
- run: yarn lint
33 changes: 5 additions & 28 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,8 @@ on:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 19
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn build
- run: yarn publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get package info
id: package
uses: codex-team/action-nodejs-package-info@v1
- name: Send a message
uses: codex-team/action-codexbot-notify@v1
with:
webhook: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
parse_mode: 'markdown'
disable_web_page_preview: true
publish-and-notify:
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
62 changes: 0 additions & 62 deletions .jshintrc

This file was deleted.

46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import Codex from "eslint-config-codex";
import { plugin as TsPlugin, parser as TsParser } from 'typescript-eslint';

export default [
...Codex,
{
files: ['src/**/*.ts'],
languageOptions: {
parser: TsParser,
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: './',
sourceType: 'module',
},
},
rules: {
'n/no-missing-import': ['off'],
'n/no-unsupported-features/node-builtins': ['off'],
'jsdoc/require-returns-description': ['off'],
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'variable',
'format': ['camelCase'],
'leadingUnderscore': 'allow'
},
],
'@typescript-eslint/no-unsafe-member-access': ['off'],
'@typescript-eslint/no-restricted-types': ['error',
{
'types': {
'String': "Use 'string' instead.",
'Boolean': "Use 'boolean' instead.",
'Number': "Use 'number' instead.",
'Symbol': "Use 'symbol' instead.",
'Object': "Use 'object' instead, or define a more specific type.",
'Function': "Use a specific function type instead, like '(arg: type) => returnType'."
}
}
]
}
},
{
ignores: ['dev/**', 'eslint.config.mjs', 'vite.config.js', 'postcss.config.js']
}
];
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/code",
"version": "2.9.1",
"version": "2.9.2",
"keywords": [
"codex editor",
"code",
Expand All @@ -26,21 +26,23 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint src/**.ts --ext .ts",
"lint:errors": "eslint src/**.ts --quiet",
"lint:fix": "eslint src/**.ts --fix"
"lint": "eslint",
"lint:errors": "eslint --quiet",
"lint:fix": "eslint --fix"
},
"author": {
"name": "CodeX Team",
"email": "team@codex.so"
},
"devDependencies": {
"@editorjs/editorjs": "^2.30.2",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^9.9.1",
"eslint-config-codex": "^2.0.2",
"typescript": "^5.5.3",
"vite": "^4.5.0",
"typescript-eslint": "^8.4.0",
"vite": "^5.4.3",
"vite-plugin-css-injected-by-js": "^3.3.0",
"vite-plugin-dts": "^3.9.1"
},
Expand Down
Loading
Loading