Skip to content

Enchance maintainability #98

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

Merged
merged 9 commits into from
Apr 1, 2025
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
26 changes: 26 additions & 0 deletions .github/workflows/checkFormat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Prettier Format

on:
workflow_dispatch:
push:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install and Lint
run: |
npm install
npx prettier --check ./**/*.html
npx prettier --check ./**/*.css
npx prettier --check ./**/*.ts
npx prettier --check ./**/*.tsx
npx prettier --check ./**/*.json
npx prettier --check ./**/*.md
21 changes: 21 additions & 0 deletions .github/workflows/checkLint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check ESLint

on:
workflow_dispatch:
push:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install and Lint
run: |
npm install
npm run lint
37 changes: 37 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import eslintConfigPrettier from 'eslint-config-prettier'

export default [
js.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
ignores: ['node_modules/**', 'dist/**']
},
{
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
rules: {
'no-console': 'error',
'no-restricted-exports': ['error', { restrictDefaultExports: { direct: true } }],
// used multiple times to stay consistent with sprotty
'@typescript-eslint/no-namespace': 'off',
}
},
{
files: ['**/*.config.ts', '**/*.config.js', '**/*.d.ts'],
rules: {
'no-restricted-exports': 'off'
}
},
]
Loading