Skip to content

Commit

Permalink
fix: lint rule fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTowles committed Sep 29, 2022
1 parent 6f5d2e1 commit d166ed9
Show file tree
Hide file tree
Showing 24 changed files with 1,045 additions and 1,200 deletions.
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
// "extends": "@antfu"
"extends": "@antfu",
"rules": {
"@typescript-eslint/semi": ["error", "always"]
}
}
15 changes: 1 addition & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: dev"
},
// {
// "name": "Extension Tests",
// "type": "extensionHost",
// "request": "launch",
// "args": [
// "--extensionDevelopmentPath=${workspaceFolder}",
// "--extensionTestsPath=${workspaceFolder}/dist/test/suite/index"
// ],
// "outFiles": [
// "${workspaceFolder}/dist/test/**/*.js"
// ],
// "preLaunchTask": "npm: dev"
// }
}
]
}
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cSpell.words": [
"luxon",
"upath"
]
}
"cSpell.words": [
"luxon",
"upath"
]
}
18 changes: 9 additions & 9 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. Fork and clone the repo.
2. Open the `Extensions` tab of VS Code.
3. Search for `@recommended`.
4. Make sure to install the `TypeScript + Webpack Problem Matchers` extension.
4. Make sure to install the `TypeScript + Webpack Problem Matchers` [extension](https://marketplace.visualstudio.com/items?itemName=amodio.tsl-problem-matcher).
5. Run `ni` (or `pnpm i`) in terminal.
6. Press <kbd>F5</kbd> to start debugging.

Expand All @@ -17,15 +17,15 @@

- In `OUTPUT` panel of VS Code 👇.

```jsonc
// Error: the description can't be converted into a problem matcher:
```json5
// Error: the description can't be converted into a problem matcher
{
"base": "$ts-webpack-watch",
"background": {
"activeOnStart": true,
"beginsPattern": "Build start",
"endsPattern": "Build success"
}
"base": "$ts-webpack-watch",
"background": {
"activeOnStart": true,
"beginsPattern": "Build start",
"endsPattern": "Build success"
}
}
```

Expand Down
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "markdown-paste-image",
"displayName": "Markdown Paste Image",
"version": "0.0.1",
"packageManager": "pnpm@7.5.0",
"packageManager": "pnpm@7.12.2",
"description": "Paste Image in markdown from clipboard",
"author": "Chris Towles",
"license": "MIT",
Expand All @@ -15,6 +15,14 @@
"bugs": {
"url": "https://github.com/ChrisTowles/vscode-markdown-paste-image/issues"
},
"keywords": [
"paste",
"image",
"markdown",
"paste image",
"keybindings",
"markdown paste image"
],
"categories": [
"Other"
],
Expand All @@ -28,44 +36,44 @@
"vscode": "^1.71.0"
},
"activationEvents": [
"onCommand:extension.pasteImage"
"onCommand:extension.markdownPasteImage"
],
"contributes": {
"configuration": {
"type": "object",
"title": "Paste Image Configuration",
"properties": {
"pasteImage.imageFolderPath": {
"markdownPasteImage.imageFolderPath": {
"type": "string",
"default": "${currentFileDir}",
"description": "The destination to save image file. You can use variable ${currentFileDir} and ${projectRoot}. ${currentFileDir} will be replace by the path of directory that contain current editing file. ${projectRoot} will be replace by path of the project opened in vscode."
},
"pasteImage.defaultImageName": {
"markdownPasteImage.defaultImageName": {
"type": "string",
"default": "yyyy-LL-mm-HH-mm-ss",
"description": "The default image file name. The value of this config will be pass to the 'format' function of moment library(a js time manipulation library), you can read document https://moment.github.io/luxon/#/formatting?id=table-of-tokens for advanced usage."
"description": "The default image file name. The value of this config will be pass to the 'format' function of Luxon library, you can read document https://moment.github.io/luxon/#/formatting?id=table-of-tokens for usage."
},
"pasteImage.imageNamePrefix": {
"markdownPasteImage.imageNamePrefix": {
"type": "string",
"default": "",
"description": "The string prepend to the image file name."
},
"pasteImage.imageNameSuffix": {
"markdownPasteImage.imageNameSuffix": {
"type": "string",
"default": "",
"description": "The string append to the image file name."
},
"pasteImage.imageUriPathPrefix": {
"markdownPasteImage.imageUriPathPrefix": {
"type": "string",
"default": "",
"description": "The string prepend to the resolved image upath. Can be used if you want to supply a custom domain to image url."
"description": "The string prepend to the resolved image path. Can be used if you want to supply a custom domain to image url."
},
"pasteImage.imageUriPathSuffix": {
"markdownPasteImage.imageUriPathSuffix": {
"type": "string",
"default": "",
"description": "The string append to the resolved image upath. Can be used if you want to supply a custom params to image url."
"description": "The string append to the resolved image path. Can be used if you want to supply a custom params to image url."
},
"pasteImage.encodePath": {
"markdownPasteImage.encodePath": {
"type": "string",
"enum": [
"none",
Expand All @@ -75,17 +83,17 @@
"default": "urlEncodeSpace",
"description": "The string append to the image file name. How to encode image path before insert to editor. Support options: none, urlEncode, urlEncodeSpace"
},
"pasteImage.insertPattern": {
"markdownPasteImage.insertPattern": {
"type": "string",
"default": "${imageSyntaxPrefix}${imageFilePath}${imageSyntaxSuffix}",
"description": "The pattern of string that would be pasted to text."
},
"pasteImage.showFilePathConfirmInputBox": {
"markdownPasteImage.showFilePathConfirmInputBox": {
"type": "boolean",
"default": true,
"description": "Set to true if you want to be able to change the file path or name prior to saving the file to disk"
},
"pasteImage.filePathConfirmInputBoxMode": {
"markdownPasteImage.filePathConfirmInputBoxMode": {
"type": "string",
"enum": [
"fullPath",
Expand All @@ -98,26 +106,19 @@
},
"commands": [
{
"command": "extension.pasteImage",
"title": "Paste Image"
"command": "extension.markdownPasteImage",
"title": "Markdown Paste Image"
}
],
"keybindings": [
{
"command": "extension.pasteImage",
"command": "extension.markdownPasteImage",
"key": "ctrl+alt+v",
"mac": "cmd+alt+v",
"when": "editorTextFocus"
}
]
},
"keywords": [
"paste",
"image",
"markdown",
"paste image",
"keybindings"
],
"scripts": {
"build": "cross-env NODE_ENV=production tsup",
"dev": "cross-env NODE_ENV=development tsup --watch",
Expand All @@ -127,8 +128,10 @@
"pack": "vsce package --no-dependencies",
"test": "vitest --reporter verbose",
"typecheck": "tsc --noEmit",
"release": "bumpp --commit --push --tag && nr publish",
"readme": "esno ./scripts/docs.ts"
"release": "bumpp --commit --push --tag && nr publish"
},
"dependencies": {
"cross-env": "^7.0.3"
},
"devDependencies": {
"@antfu/eslint-config": "^0.25.2",
Expand Down Expand Up @@ -158,8 +161,5 @@
"vite": "^2.9.14",
"vitest": "^0.18.0",
"vsce": "^2.9.2"
},
"dependencies": {
"cross-env": "^7.0.3"
}
}
}

0 comments on commit d166ed9

Please sign in to comment.