Skip to content

Commit 2af8b72

Browse files
committed
feat(package): init
0 parents  commit 2af8b72

31 files changed

+5382
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
[*.{md}]
12+
trim_trailing_whitespace = false
13+
14+
[makefile]
15+
indent_style = tab

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3+
extends: [
4+
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
5+
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
6+
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
7+
],
8+
parserOptions: {
9+
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
10+
sourceType: 'module', // Allows for the use of imports
11+
},
12+
rules: {
13+
"@typescript-eslint/explicit-function-return-type": "off",
14+
"@typescript-eslint/no-explicit-any": "off",
15+
"@typescript-eslint/no-non-null-assertion": "off",
16+
}
17+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Before reporting: search existing issues -->
11+
<!-- Note: please submit necessary information otherwise it maybe closed -->
12+
13+
**Describe the bug**
14+
A clear and concise description of what the bug is.
15+
16+
**To Reproduce**
17+
Steps to reproduce the behavior:
18+
1. Go to '...'
19+
2. Click on '....'
20+
3. Scroll down to '....'
21+
4. See error
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
If applicable, add screenshots to help explain your problem.
28+
29+
**Desktop (please complete the following information):**
30+
- OS:
31+
- Vim or Neovim:
32+
- (Neo)vim version:
33+
34+
**Output channel:**
35+
36+
1. Set `"flutter.trace.server": "verbose"`
37+
2. Reproduce the issue
38+
3. `:CocList output` open output list and select `flutter`
39+
40+
Log:
41+
42+
```
43+
```

.github/workflows/blank.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Setup Node
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: '10.x'
22+
- name: Lint codes
23+
run: |
24+
npm install
25+
npm run lint

.gitignore

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# create by https://github.com/iamcco/coc-gitignore (Sun Oct 06 2019 19:53:02 GMT+0800 (GMT+08:00))
2+
# Dart.gitignore:
3+
# See https://www.dartlang.org/guides/libraries/private-files
4+
5+
# Files and directories created by pub
6+
.dart_tool/
7+
.packages
8+
build/
9+
# If you're building an application, you may want to check-in your pubspec.lock
10+
pubspec.lock
11+
12+
# Directory created by dartdoc
13+
# If you don't generate documentation locally you can remove this line.
14+
doc/api/
15+
16+
# Avoid committing generated Javascript files:
17+
*.dart.js
18+
*.info.json # Produced by the --dump-info flag.
19+
*.js # When generated by dart2js. Don't specify *.js if your
20+
# project includes source files written in JavaScript.
21+
*.js_
22+
*.js.deps
23+
*.js.map
24+
25+
# create by https://github.com/iamcco/coc-gitignore (Sun Oct 06 2019 19:54:11 GMT+0800 (GMT+08:00))
26+
# Node.gitignore:
27+
# Logs
28+
logs
29+
*.log
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
lerna-debug.log*
34+
35+
# Diagnostic reports (https://nodejs.org/api/report.html)
36+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
37+
38+
# Runtime data
39+
pids
40+
*.pid
41+
*.seed
42+
*.pid.lock
43+
44+
# Directory for instrumented libs generated by jscoverage/JSCover
45+
lib-cov
46+
47+
# Coverage directory used by tools like istanbul
48+
coverage
49+
*.lcov
50+
51+
# nyc test coverage
52+
.nyc_output
53+
54+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
55+
.grunt
56+
57+
# Bower dependency directory (https://bower.io/)
58+
bower_components
59+
60+
# node-waf configuration
61+
.lock-wscript
62+
63+
# Compiled binary addons (https://nodejs.org/api/addons.html)
64+
build/Release
65+
66+
# Dependency directories
67+
node_modules/
68+
jspm_packages/
69+
70+
# TypeScript v1 declaration files
71+
typings/
72+
73+
# TypeScript cache
74+
*.tsbuildinfo
75+
76+
# Optional npm cache directory
77+
.npm
78+
79+
# Optional eslint cache
80+
.eslintcache
81+
82+
# Optional REPL history
83+
.node_repl_history
84+
85+
# Output of 'npm pack'
86+
*.tgz
87+
88+
# Yarn Integrity file
89+
.yarn-integrity
90+
91+
# dotenv environment variables file
92+
.env
93+
.env.test
94+
95+
# parcel-bundler cache (https://parceljs.org/)
96+
.cache
97+
98+
# next.js build output
99+
.next
100+
101+
# nuxt.js build output
102+
.nuxt
103+
104+
# vuepress build output
105+
.vuepress/dist
106+
107+
# Serverless directories
108+
.serverless/
109+
110+
# FuseBox cache
111+
.fusebox/
112+
113+
# DynamoDB Local files
114+
.dynamodb/
115+
116+
# Node-patch:
117+
out/

.npmignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
src
2+
node_modules
3+
tsconfig.json
4+
*.map
5+
.tags
6+
.DS_Store
7+
webpack.config.js
8+
yarn.lock
9+
yarn-error.log
10+
.editorconfig

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: true,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
printWidth: 120,
6+
tabWidth: 2,
7+
};

.vim/coc-settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"cSpell.words": [
3+
"Autocmd",
4+
"Leetcode",
5+
"Unimported",
6+
"camelcase",
7+
"csrftoken",
8+
"getlog",
9+
"hellod",
10+
"outchannel",
11+
"pubspec",
12+
"regist"
13+
]
14+
}

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Leetcode-cn 的 CoC 扩展
2+
3+
## 安装
4+
5+
```vim
6+
:CocInstall coc-leetcode
7+
```
8+
9+
## 配置
10+
11+
### Buy Me A Coffee ☕️
12+
13+
![btc](https://img.shields.io/keybase/btc/iamcco.svg?style=popout-square)
14+
15+
![image](https://user-images.githubusercontent.com/5492542/42771079-962216b0-8958-11e8-81c0-520363ce1059.png)

package.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "coc-leetcode",
3+
"version": "1.0.0",
4+
"description": "leetcode support for (Neo)vim",
5+
"author": "iamcco <ooiss@qq.com>",
6+
"license": "MIT",
7+
"main": "out/index.js",
8+
"keywords": [
9+
"coc.nvim",
10+
"leetcode"
11+
],
12+
"engines": {
13+
"coc": "^0.0.74"
14+
},
15+
"scripts": {
16+
"clean": "rm -rf ./out",
17+
"watch": "webpack --watch",
18+
"build": "webpack",
19+
"lint": "eslint --fix ./src/**/*.ts",
20+
"prepare": "npm run clean && npm run build"
21+
},
22+
"husky": {
23+
"hooks": {
24+
"pre-commit": "npm run lint",
25+
"pre-push": "npm run lint"
26+
}
27+
},
28+
"activationEvents": [
29+
"*"
30+
],
31+
"contributes": {
32+
"configuration": {
33+
"type": "object",
34+
"title": "leetcode configuration",
35+
"properties": {
36+
"leetcode.trace.server": {
37+
"type": "string",
38+
"default": "off",
39+
"enum": [
40+
"off",
41+
"messages",
42+
"verbose"
43+
],
44+
"description": "Trace level of log"
45+
},
46+
"leetcode.enabled": {
47+
"type": "boolean",
48+
"default": true,
49+
"description": "Enable/disable this extension"
50+
}
51+
},
52+
"commands": [
53+
{
54+
"command": "leetcode.login",
55+
"title": "Login by account and password"
56+
}
57+
]
58+
}
59+
},
60+
"devDependencies": {
61+
"@types/node": "^13.11.0",
62+
"@typescript-eslint/eslint-plugin": "^2.5.0",
63+
"@typescript-eslint/parser": "^2.5.0",
64+
"coc.nvim": "^0.0.74",
65+
"colors": "^1.4.0",
66+
"eslint": "^6.6.0",
67+
"eslint-config-prettier": "^6.5.0",
68+
"eslint-plugin-prettier": "^3.1.1",
69+
"husky": "^3.0.9",
70+
"prettier": "^1.18.2",
71+
"ts-loader": "^6.0.4",
72+
"typescript": "^3.5.3",
73+
"vscode-languageserver-protocol": "3.15.0-next.6",
74+
"webpack": "^4.39.2",
75+
"webpack-cli": "^3.3.6"
76+
},
77+
"dependencies": {
78+
"axios": "^0.19.2"
79+
}
80+
}

0 commit comments

Comments
 (0)