Skip to content
Open
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
45 changes: 1 addition & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ module.exports = {
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"@typescript-eslint/tslint"
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/ban-ts-ignore": [
Expand Down Expand Up @@ -284,48 +283,6 @@ module.exports = {
"yoda": [
"error"
],
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"comment-type": true,
"completed-docs": true,
"encoding": true,
"import-spacing": true,
"invalid-void": true,
"jsdoc-format": true,
"match-default-export-name": true,
"no-boolean-literal-compare": true,
"no-default-import": true,
"no-dynamic-delete": true,
"no-inferred-empty-object-type": true,
"no-mergeable-namespace": true,
"no-null-undefined-union": true,
"no-promise-as-boolean": true,
"no-reference-import": true,
"no-restricted-globals": true,
"no-tautology-expression": true,
"no-unnecessary-callback-wrapper": true,
"no-unsafe-any": true,
"number-literal-format": true,
"object-literal-sort-keys": true,
"one-line": true,
"prefer-conditional-expression": true,
"prefer-method-signature": true,
"prefer-switch": true,
"prefer-while": true,
"return-undefined": true,
"static-this": true,
"strict-comparisons": true,
"strict-string-expressions": true,
"strict-type-predicates": true,
"switch-final-break": true,
"typedef": true,
"unnecessary-else": true,
"whitespace": true
}
}
],
"@typescript-eslint/adjacent-overload-signatures": [
"error"
],
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ captcha.jpg
/tmp_test
collection.json
qrcode.png
image.png
image.png
release_notes/images
*.vsix
dist
Expand All @@ -17,3 +17,4 @@ cache.json
**/images
.vscode-test
*.log
.idea/
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tmp_test
collection.json
.vscode
qrcode.png
image.png
image.png
*.vsix
package.cmd
out/test/**
Expand All @@ -19,3 +19,6 @@ tsconfig.json
tslint.json
release_notes/images
**/*.pdf
.idea
.idea/**
**/.idea/**
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[![](https://vsmarketplacebadge.apphb.com/version-short/niudai.vscode-zhihu.svg)](https://marketplace.visualstudio.com/items?itemName=niudai.vscode-zhihu)
[![](https://vsmarketplacebadge.apphb.com/downloads-short/niudai.vscode-zhihu.svg)](https://marketplace.visualstudio.com/items?itemName=niudai.vscode-zhihu)
[![](https://vsmarketplacebadge.apphb.com/rating-short/niudai.vscode-zhihu.svg)](https://marketplace.visualstudio.com/items?itemName=niudai.vscode-zhihu)
[VS Marketplace](https://marketplace.visualstudio.com/items?itemName=niudai.vscode-zhihu)


<p align="center">
Expand Down Expand Up @@ -348,3 +346,13 @@ $$
|Zhihu: Is Title Image Full Screen | 打勾开让文章背景图片变成全屏 |
| zhihu.enableMermaidToPng | 启动mermaid图片上传至知乎 |
| zhihu.mermaidTheme | 设置mermaid的主题,`dark`和`default` |


## 鸣谢

感谢以下项目,帮助我完成这个项目升级:

- [niudai/VSCode-Zhihu](https://github.com/niudai/VSCode-Zhihu)
- [crispyChicken999/zhihu-fisher-vscode](https://github.com/crispyChicken999/zhihu-fisher-vscode)
- [zly2006/zhihu-plus-plus](https://github.com/zly2006/zhihu-plus-plus)
- [BAIGUANGMEI/zhihu-cli](https://github.com/BAIGUANGMEI/zhihu-cli)
5 changes: 3 additions & 2 deletions build/mermaid.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const config = {
externals: 'fs', // in order to make mermaid work
output: {
path: path.join(__dirname, '..'),
filename: '[name].bundle.js'
filename: '[name].bundle.js',
hashFunction: 'sha256'
},
module: {
rules: [
Expand Down Expand Up @@ -53,4 +54,4 @@ const config = {
},
}

module.exports = [config]
module.exports = [config]
19 changes: 19 additions & 0 deletions build/shims/uglify-js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';

module.exports = {
minify(input) {
if (typeof input === 'string') {
return { code: input };
}

if (Array.isArray(input)) {
return { code: input.join('\n') };
}

if (input && typeof input === 'object') {
return { code: Object.values(input).join('\n') };
}

return { code: '' };
},
};
2 changes: 0 additions & 2 deletions mermaid_init.bundle.js

This file was deleted.

Loading