Skip to content

Commit 0909d36

Browse files
committed
Add flow
1 parent 8d50a78 commit 0909d36

File tree

6 files changed

+149
-9
lines changed

6 files changed

+149
-9
lines changed

.eslintrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
extends: airbnb-base
2+
parser: babel-eslint
23

34
rules:
45
import/no-extraneous-dependencies: "off"
6+
object-curly-newline: "off"
7+
max-len: ["error", 120]
58

.flowconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[ignore]
2+
3+
[include]
4+
5+
[libs]
6+
7+
[lints]
8+
9+
[options]
10+
11+
[strict]
12+
13+
[version]
14+
0.102.0
15+

.vim/coc-settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"javascript.validate.enable": false
3+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
"license": "MIT",
1212
"dependencies": {},
1313
"devDependencies": {
14+
"babel-eslint": "^10.0.2",
1415
"coc.nvim": "^0.0.71",
1516
"eslint": "^5.3.0",
1617
"eslint-config-airbnb-base": "^13.1.0",
17-
"eslint-plugin-import": "^2.18.0"
18+
"eslint-plugin-import": "^2.18.0",
19+
"flow-bin": "^0.102.0"
1820
}
1921
}

src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { LanguageClient, workspace, services } from 'coc.nvim';
1+
// @flow
22

3-
exports.activate = (context) => {
4-
const config = workspace.getConfiguration().get('elixir', {});
3+
import { LanguageClient, workspace, services, ExtensionContext } from 'coc.nvim';
4+
5+
exports.activate = (context: ExtensionContext) => {
6+
const config: Object = workspace.getConfiguration().get('elixir', {});
57

68
const serverOptions = {
79
command: config.pathToEls,
@@ -13,7 +15,5 @@ exports.activate = (context) => {
1315

1416
const languageClient = new LanguageClient('elixir', 'elixir', serverOptions, clientOptions);
1517

16-
context.subscriptions.push(
17-
services.registLanguageClient(languageClient),
18-
);
18+
context.subscriptions.push(services.registLanguageClient(languageClient));
1919
};

yarn.lock

Lines changed: 119 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,40 @@
99
dependencies:
1010
"@babel/highlight" "^7.0.0"
1111

12+
"@babel/generator@^7.4.4":
13+
version "7.4.4"
14+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.4.tgz#174a215eb843fc392c7edcaabeaa873de6e8f041"
15+
integrity sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==
16+
dependencies:
17+
"@babel/types" "^7.4.4"
18+
jsesc "^2.5.1"
19+
lodash "^4.17.11"
20+
source-map "^0.5.0"
21+
trim-right "^1.0.1"
22+
23+
"@babel/helper-function-name@^7.1.0":
24+
version "7.1.0"
25+
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53"
26+
integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==
27+
dependencies:
28+
"@babel/helper-get-function-arity" "^7.0.0"
29+
"@babel/template" "^7.1.0"
30+
"@babel/types" "^7.0.0"
31+
32+
"@babel/helper-get-function-arity@^7.0.0":
33+
version "7.0.0"
34+
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3"
35+
integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==
36+
dependencies:
37+
"@babel/types" "^7.0.0"
38+
39+
"@babel/helper-split-export-declaration@^7.4.4":
40+
version "7.4.4"
41+
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677"
42+
integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==
43+
dependencies:
44+
"@babel/types" "^7.4.4"
45+
1246
"@babel/highlight@^7.0.0":
1347
version "7.0.0"
1448
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
@@ -18,6 +52,44 @@
1852
esutils "^2.0.2"
1953
js-tokens "^4.0.0"
2054

55+
"@babel/parser@^7.0.0", "@babel/parser@^7.4.4", "@babel/parser@^7.4.5":
56+
version "7.4.5"
57+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872"
58+
integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==
59+
60+
"@babel/template@^7.1.0":
61+
version "7.4.4"
62+
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237"
63+
integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==
64+
dependencies:
65+
"@babel/code-frame" "^7.0.0"
66+
"@babel/parser" "^7.4.4"
67+
"@babel/types" "^7.4.4"
68+
69+
"@babel/traverse@^7.0.0":
70+
version "7.4.5"
71+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.5.tgz#4e92d1728fd2f1897dafdd321efbff92156c3216"
72+
integrity sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==
73+
dependencies:
74+
"@babel/code-frame" "^7.0.0"
75+
"@babel/generator" "^7.4.4"
76+
"@babel/helper-function-name" "^7.1.0"
77+
"@babel/helper-split-export-declaration" "^7.4.4"
78+
"@babel/parser" "^7.4.5"
79+
"@babel/types" "^7.4.4"
80+
debug "^4.1.0"
81+
globals "^11.1.0"
82+
lodash "^4.17.11"
83+
84+
"@babel/types@^7.0.0", "@babel/types@^7.4.4":
85+
version "7.4.4"
86+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0"
87+
integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==
88+
dependencies:
89+
esutils "^2.0.2"
90+
lodash "^4.17.11"
91+
to-fast-properties "^2.0.0"
92+
2193
"@chemzqm/[email protected]":
2294
version "5.1.7"
2395
resolved "https://registry.yarnpkg.com/@chemzqm/neovim/-/neovim-5.1.7.tgz#9b97f4eea799cece09ee68fe2b7750b441a3ebf0"
@@ -94,6 +166,18 @@ async@^2.6.2:
94166
dependencies:
95167
lodash "^4.17.11"
96168

169+
babel-eslint@^10.0.2:
170+
version "10.0.2"
171+
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456"
172+
integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==
173+
dependencies:
174+
"@babel/code-frame" "^7.0.0"
175+
"@babel/parser" "^7.0.0"
176+
"@babel/traverse" "^7.0.0"
177+
"@babel/types" "^7.0.0"
178+
eslint-scope "3.7.1"
179+
eslint-visitor-keys "^1.0.0"
180+
97181
balanced-match@^1.0.0:
98182
version "1.0.0"
99183
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
@@ -224,7 +308,7 @@ debug@^3.2.6:
224308
dependencies:
225309
ms "^2.1.1"
226310

227-
debug@^4.0.1, debug@^4.1.1:
311+
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
228312
version "4.1.1"
229313
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
230314
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
@@ -343,6 +427,14 @@ eslint-restricted-globals@^0.1.1:
343427
resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7"
344428
integrity sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=
345429

430+
431+
version "3.7.1"
432+
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
433+
integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=
434+
dependencies:
435+
esrecurse "^4.1.0"
436+
estraverse "^4.1.1"
437+
346438
eslint-scope@^4.0.3:
347439
version "4.0.3"
348440
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
@@ -517,6 +609,11 @@ flatted@^2.0.0:
517609
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
518610
integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
519611

612+
flow-bin@^0.102.0:
613+
version "0.102.0"
614+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.102.0.tgz#3d5de44bcc26d26585e932b3201988b766f9b380"
615+
integrity sha512-mYon6noeLO0Q5SbiWULLQeM1L96iuXnRtYMd47j3bEWXAwUW9EnwNWcn+cZg/jC/Dg4Wj/jnkdTDEuFtbeu1ww==
616+
520617
fs-extra@^7.0.1:
521618
version "7.0.1"
522619
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
@@ -553,7 +650,7 @@ glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
553650
once "^1.3.0"
554651
path-is-absolute "^1.0.0"
555652

556-
globals@^11.7.0:
653+
globals@^11.1.0, globals@^11.7.0:
557654
version "11.12.0"
558655
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
559656
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
@@ -721,6 +818,11 @@ js-yaml@^3.13.0:
721818
argparse "^1.0.7"
722819
esprima "^4.0.0"
723820

821+
jsesc@^2.5.1:
822+
version "2.5.2"
823+
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
824+
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
825+
724826
json-schema-traverse@^0.4.1:
725827
version "0.4.1"
726828
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
@@ -1121,6 +1223,11 @@ slice-ansi@^2.1.0:
11211223
astral-regex "^1.0.0"
11221224
is-fullwidth-code-point "^2.0.0"
11231225

1226+
source-map@^0.5.0:
1227+
version "0.5.7"
1228+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
1229+
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
1230+
11241231
spdx-correct@^3.0.0:
11251232
version "3.1.0"
11261233
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
@@ -1238,6 +1345,16 @@ tmp@^0.0.33:
12381345
dependencies:
12391346
os-tmpdir "~1.0.2"
12401347

1348+
to-fast-properties@^2.0.0:
1349+
version "2.0.0"
1350+
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
1351+
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
1352+
1353+
trim-right@^1.0.1:
1354+
version "1.0.1"
1355+
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
1356+
integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
1357+
12411358
tslib@^1.10.0, tslib@^1.9.0:
12421359
version "1.10.0"
12431360
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"

0 commit comments

Comments
 (0)