Skip to content

Commit

Permalink
format&lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Apr 14, 2024
1 parent 64dbc18 commit 25ffcf6
Show file tree
Hide file tree
Showing 27 changed files with 1,220 additions and 514 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
custom: ["https://wtto00.github.io/sponsor/"]
custom: ['https://wtto00.github.io/sponsor/']
38 changes: 19 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Lint

on:
pull_request:
branches:
- main

jobs:
Lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.1.0
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: npm run lint
name: Lint

on:
pull_request:
branches:
- main

jobs:
Lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.1.0
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
68 changes: 34 additions & 34 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: "Publish"
on:
push:
tags:
- "v*"

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
generate_release_notes: true

Publish:
needs: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.1.0
with:
node-version: 20
cache: "npm"
- run: npm ci

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
name: 'Publish'
on:
push:
tags:
- 'v*'

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
generate_release_notes: true

Publish:
needs: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.1.0
with:
node-version: 20
cache: 'npm'
- run: npm ci

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# husky
.husky
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"singleQuote": true,
"semi": false,
"trailingComma": "all",
"arrowParens": "always"
}
8 changes: 3 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint"]
}
50 changes: 22 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,26 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
18 changes: 9 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
32 changes: 16 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ labels:
- bug
- abcd
assignees:
- "@wtto00"
- '@wtto00'
- wtto00
issue_number: 24
---
Expand Down
48 changes: 28 additions & 20 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
import globals from "globals";
import tseslint from "typescript-eslint";
import globals from 'globals'
import tseslint from 'typescript-eslint'

import path from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import pluginJs from "@eslint/js";
import path from 'path'
import { fileURLToPath } from 'url'
import { FlatCompat } from '@eslint/eslintrc'
import pluginJs from '@eslint/js'

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended });
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: pluginJs.configs.recommended,
})

const tslintConfig = tseslint.config({
files: ["src/**/*.ts"],
extends: [tseslint.configs.eslintRecommended, ...tseslint.configs.stylisticTypeChecked],
languageOptions: {
parserOptions: {
project: "tsconfig.json",
export default [
{
languageOptions: {
globals: globals.node,
parserOptions: {
project: 'tsconfig.json',
},
},
},
rules: {
"no-void": "off",
...compat.extends('standard'),
tseslint.configs.eslintRecommended,
...tseslint.configs.stylisticTypeChecked,
{
rules: {
'no-void': 'off',
'space-before-function-paren': 'off',
},
},
});

export default [{ languageOptions: { globals: globals.node } }, ...compat.extends("standard"), ...tslintConfig];
]
56 changes: 28 additions & 28 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"getPostContent": "Get content of the blog article",
"requestAuth": "Request Github authorization",
"unauthorized": "Unauthorized access",
"getRepository": "Get blog repository",
"createIssue": "Creating issue",
"createSuccess": "Issue creation successful",
"viewInBrowser": "View in browser",
"updateIssue": "Updating issue",
"updateSuccess": "Updated Issue successfully",
"syncIssue": "Syncing issue",
"syncSuccess": "Synchronized issue successfully",

"noFileOpened": "No open files",
"currentNotMD": "The current file is not of the Markdown type",
"fileNotFound": "File not found: ",

"titleEmpty": "The title cannot be empty",
"unkonwnIssue": "Unknown issue, please set the issue_number.",
"createFail": "Failed to create issue",
"updateFail": "Failed to update issue",
"syncFail": "Failed to get issue",

"getRepositoryFail": "Failed to retrieve the list of repositories",
"noRepository": "You have not created a GitHub repository yet",
"blogRepository": "Repository of blog",
"slectRepository": "Please select the repository for the blog."
}
{
"getPostContent": "Get content of the blog article",
"requestAuth": "Request Github authorization",
"unauthorized": "Unauthorized access",
"getRepository": "Get blog repository",
"createIssue": "Creating issue",
"createSuccess": "Issue creation successful",
"viewInBrowser": "View in browser",
"updateIssue": "Updating issue",
"updateSuccess": "Updated Issue successfully",
"syncIssue": "Syncing issue",
"syncSuccess": "Synchronized issue successfully",

"noFileOpened": "No open files",
"currentNotMD": "The current file is not of the Markdown type",
"fileNotFound": "File not found: ",

"titleEmpty": "The title cannot be empty",
"unkonwnIssue": "Unknown issue, please set the issue_number.",
"createFail": "Failed to create issue",
"updateFail": "Failed to update issue",
"syncFail": "Failed to get issue",

"getRepositoryFail": "Failed to retrieve the list of repositories",
"noRepository": "You have not created a GitHub repository yet",
"blogRepository": "Repository of blog",
"slectRepository": "Please select the repository for the blog."
}
Loading

0 comments on commit 25ffcf6

Please sign in to comment.