Skip to content

Commit 9d70d36

Browse files
committed
Initial commit
0 parents  commit 9d70d36

File tree

8 files changed

+3911
-0
lines changed

8 files changed

+3911
-0
lines changed

.eslintrc.js

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true
5+
},
6+
extends: [
7+
'standard', 'standard-jsx'
8+
],
9+
globals: {
10+
Atomics: 'readonly',
11+
SharedArrayBuffer: 'readonly'
12+
},
13+
parser: '@typescript-eslint/parser',
14+
parserOptions: {
15+
ecmaFeatures: {
16+
jsx: true
17+
},
18+
ecmaVersion: 2018,
19+
sourceType: 'module',
20+
project: './tsconfig.json'
21+
},
22+
plugins: [
23+
'react',
24+
'@typescript-eslint',
25+
'react-hooks',
26+
'unused-imports'
27+
],
28+
rules: {
29+
'@typescript-eslint/member-delimiter-style': [
30+
'error',
31+
{
32+
multiline: {
33+
delimiter: 'none'
34+
},
35+
singleline: {
36+
delimiter: 'comma'
37+
}
38+
}
39+
],
40+
'@typescript-eslint/no-misused-promises': [
41+
'error',
42+
{ checksVoidReturn: false }
43+
],
44+
'no-unused-vars': 'off',
45+
'@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true }],
46+
'no-use-before-define': 'off',
47+
'@typescript-eslint/no-use-before-define': [
48+
'error',
49+
{
50+
functions: false,
51+
classes: false,
52+
variables: false
53+
}
54+
],
55+
'@typescript-eslint/no-useless-constructor': 'error',
56+
'@typescript-eslint/type-annotation-spacing': 'error',
57+
'import/named': 'off',
58+
'import/namespace': 'off',
59+
'import/no-unresolved': 'off',
60+
'import/order': [
61+
'warn',
62+
{
63+
groups: ['unknown', 'external', 'internal', 'builtin', 'index', 'sibling', 'parent'],
64+
'newlines-between': 'never'
65+
}
66+
],
67+
'no-console': ['warn', { allow: ['warn', 'error', 'debug', 'info'] }],
68+
'no-useless-constructor': 'off',
69+
'unused-imports/no-unused-imports': 'warn',
70+
'no-redeclare': 'off',
71+
'@typescript-eslint/no-redeclare': ['error'],
72+
'@typescript-eslint/no-unnecessary-condition': 'warn',
73+
'@typescript-eslint/explicit-module-boundary-types': [
74+
'warn',
75+
{
76+
allowArgumentsExplicitlyTypedAsAny: true
77+
}
78+
],
79+
semi: 'off',
80+
'@typescript-eslint/semi': [
81+
'error', 'never'
82+
],
83+
'eslint/no-extra-semi': 'off',
84+
'@typescript-eslint/no-extra-semi': [
85+
'warn'
86+
],
87+
'@typescript-eslint/strict-boolean-expressions': [
88+
'warn',
89+
{
90+
allowString: false,
91+
allowNumber: false,
92+
allowNullableObject: false
93+
}
94+
],
95+
'@typescript-eslint/no-explicit-any': [
96+
'error',
97+
{
98+
ignoreRestArgs: true
99+
}
100+
],
101+
'@typescript-eslint/no-unnecessary-type-assertion': ['error'],
102+
'@typescript-eslint/no-floating-promises': [
103+
'error'
104+
],
105+
'no-void': [
106+
'error',
107+
{
108+
allowAsStatement: true
109+
}
110+
],
111+
'react-hooks/exhaustive-deps': [
112+
'error',
113+
{
114+
additionalHooks: '(useDebouncedCallback)'
115+
}
116+
],
117+
'react-hooks/rules-of-hooks': 'error'
118+
}
119+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/*
2+
stats.html
3+
.vscode
4+
node_modules

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# @codingame/monaco-languageclient-react · [![monthly downloads](https://img.shields.io/npm/dm/@codingame/monaco-languageclient-react)](https://www.npmjs.com/package/@codingame/monaco-languageclient-react) [![npm version](https://img.shields.io/npm/v/@codingame/monaco-languageclient-react.svg?style=flat)](https://www.npmjs.com/package/@codingame/monaco-languageclient-react) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/codingame/monaco-languageclient-react/pulls)
2+
3+
### Installation
4+
5+
```bash
6+
npm install @codingame/monaco-languageclient-react
7+
```
8+
9+
### Usage
10+
11+
#### Simple usage
12+
13+
You just need to import and render the `LanguageClient` component:
14+
15+
```typescript
16+
import React from "react";
17+
18+
import LanguageClient from "@codingame/monaco-languageclient-react";
19+
20+
function LanguageClientContainer() {
21+
return (
22+
<LanguageClient
23+
languageServerConfig={...}
24+
getSecurityToken={...}
25+
languageServerUrl={...}
26+
/>
27+
);
28+
}
29+
```

0 commit comments

Comments
 (0)