Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
action-hong committed Feb 19, 2024
1 parent a0c5faf commit 78914d4
Show file tree
Hide file tree
Showing 49 changed files with 8,409 additions and 4,433 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/**
client/node_modules/**
client/out/**
server/node_modules/**
server/out/**
server/out/**
**/*.md
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ jobs:
- name: Build
run: npm run compile


- name: Test
run: npm run test
env:
DISPLAY: ":99.0"
DISPLAY: ':99.0'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
14 changes: 7 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
74 changes: 37 additions & 37 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"address": "localhost",
"port": 6009,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/server/out/**/*.js"]
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
}
]
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"address": "localhost",
"port": 6009,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/server/out/**/*.js"]
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
}
]
}
77 changes: 55 additions & 22 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
{
"editor.insertSpaces": false,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"eslint.validate": [
"javascript",
"typescript",
],
"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "kkopite.zhlint"
},
"zhlint.options": {
"rules": {
"preset": "default"
}
},
"zhlint.experimental.ignore": true
}
"editor.insertSpaces": false,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "kkopite.zhlint"
},
"zhlint.options": {
"rules": {
"preset": "default"
}
},
"zhlint.experimental.ignore": true,

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
// "eslint.rules.customizations": [
// { "rule": "style/*", "severity": "off" },
// { "rule": "format/*", "severity": "off" },
// { "rule": "*-indent", "severity": "off" },
// { "rule": "*-spacing", "severity": "off" },
// { "rule": "*-spaces", "severity": "off" },
// { "rule": "*-order", "severity": "off" },
// { "rule": "*-dangle", "severity": "off" },
// { "rule": "*-newline", "severity": "off" },
// { "rule": "*quotes", "severity": "off" },
// { "rule": "*semi", "severity": "off" }
// ],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"json",
"jsonc",
"yaml",
"toml"
]
}
64 changes: 32 additions & 32 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
}
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<a href="https://marketplace.visualstudio.com/items?itemName=kkopite.zhlint" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/kkopite.zhlint.svg?color=ed5d47&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a>


VS Code Extension for [zhlint](https://zhlint-project.github.io/zhlint/#supported-rules)

## Feature
Expand All @@ -28,7 +27,7 @@ Currently,only `.md` files are supported。If you want to support other file t
```json
{
"files.associations": {
"*.txt": "markdown",
"*.txt": "markdown"
}
}
```
Expand All @@ -41,7 +40,6 @@ these feature maybe remove in the future
- rule diff viewer
- ignore files or directories with `.experimental-zhlintignore`,checkout [ignore](https://www.npmjs.com/package/ignore)


## options

|`key`|`description`|`default`|
Expand All @@ -61,4 +59,4 @@ these feature maybe remove in the future
- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D)。
- Select `Launch Client` from the drop down (if it is not already)。
- Press ▷ to run the launch config (F5)。
- Select `Attach to Server` from the drop down,press F5 to attach the debugger to the server
- Select `Attach to Server` from the drop down,press F5 to attach the debugger to the server
26 changes: 13 additions & 13 deletions bump.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { defineConfig } from 'bumpp';
import { defineConfig } from 'bumpp'

export default defineConfig({
files: [
'package.json',
'package-lock.json',
'./client/package.json',
'./client/package-lock.json',
'./server/package.json',
'./server/package-lock.json',
],
files: [
'package.json',
'package-lock.json',
'./client/package.json',
'./client/package-lock.json',
'./server/package.json',
'./server/package-lock.json',
],

commit: true,
tag: true,
push: false,
});
commit: true,
tag: true,
push: false,
})
Loading

0 comments on commit 78914d4

Please sign in to comment.