Skip to content

Commit a52fb50

Browse files
committed
Improve & update plugin
1 parent 0d67332 commit a52fb50

31 files changed

+6186
-2774
lines changed

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
webpack.config.js
2-
/dist/
1+
/node_modules/
2+
/dist/

.eslintrc.js

Lines changed: 80 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,49 @@
1+
const utils = require('./build/utils');
2+
13
module.exports = {
24
root: true,
5+
6+
env: {
7+
browser: true,
8+
es6: true,
9+
node: true,
10+
},
11+
12+
parser: 'vue-eslint-parser',
13+
314
parserOptions: {
415
parser: '@babel/eslint-parser',
16+
ecmaVersion: 2020,
17+
extraFileExtensions: ['.vue'],
518
sourceType: 'module',
619
},
20+
21+
plugins: ['@kiwiirc', 'jsdoc'],
22+
723
extends: [
824
'plugin:vue/recommended',
25+
'eslint:recommended',
926
'@vue/airbnb',
1027
'standard',
1128
],
12-
env: {
13-
browser: true,
29+
30+
settings: {
31+
'import/resolver': {
32+
alias: {
33+
map: [
34+
['@', utils.pathResolve('src')],
35+
],
36+
extensions: ['.js', '.vue', '.json'],
37+
},
38+
},
1439
},
15-
plugins: [
16-
'vue',
17-
],
18-
// add your custom rules here
40+
1941
rules: {
42+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
43+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
44+
45+
'@kiwiirc/class-name-prefix': 'warn',
46+
2047
'class-methods-use-this': 0,
2148
'comma-dangle': ['error', {
2249
arrays: 'always-multiline',
@@ -26,32 +53,51 @@ module.exports = {
2653
functions: 'ignore',
2754
}],
2855
'import/extensions': 0,
29-
'import/no-extraneous-dependencies': 0,
30-
'import/no-unresolved': 0,
56+
'import/no-cycle': 0,
3157
'import/prefer-default-export': 0,
3258
'indent': ['error', 4],
59+
// 'max-len': ['error', { code: 120 }],
60+
'max-classes-per-file': 0,
3361
'no-continue': 0,
34-
'no-control-regex': 0,
62+
'no-else-return': 0,
3563
'no-multi-assign': 0,
3664
'no-param-reassign': ['error', { props: false }],
3765
'no-plusplus': 0,
3866
'no-prototype-builtins': 0,
39-
'prefer-promise-reject-errors': 0,
40-
'quote-props': ['error', 'consistent-as-needed'],
67+
'no-control-regex': 0,
4168
'object-shorthand': 0,
4269
'operator-linebreak': 0,
43-
'prefer-const': 0,
4470
'prefer-destructuring': 0,
4571
'prefer-object-spread': 0,
72+
'prefer-promise-reject-errors': 0,
4673
'prefer-template': 0,
74+
'quote-props': ['error', 'consistent-as-needed'],
4775
'semi': ['error', 'always'],
48-
'space-before-function-paren': ['error', 'never'],
49-
'vue/html-closing-bracket-spacing': 0,
76+
'space-before-function-paren': ['error', {
77+
anonymous: 'always',
78+
named: 'never',
79+
asyncArrow: 'always',
80+
}],
5081
'vue/html-indent': ['error', 4],
82+
'vue/max-len': [
83+
'error',
84+
{
85+
code: 120,
86+
template: 120,
87+
tabWidth: 4,
88+
comments: 120,
89+
ignoreComments: true,
90+
},
91+
],
5192
'vue/max-attributes-per-line': 0,
93+
'vue/multi-word-component-names': 0,
5294
'vue/multiline-html-element-content-newline': 0,
53-
'vue/no-mutating-props': 0,
95+
'vue/no-mutating-props': ['error', {
96+
shallowOnly: true,
97+
}],
5498
'vue/no-v-html': 0,
99+
'vue/prefer-template': 0,
100+
'vue/require-default-prop': 0,
55101
'vue/require-prop-types': 0,
56102
'vue/singleline-html-element-content-newline': 0,
57103
'vuejs-accessibility/anchor-has-content': 0,
@@ -61,5 +107,24 @@ module.exports = {
61107
'vuejs-accessibility/interactive-supports-focus': 0,
62108
'vuejs-accessibility/label-has-for': 0,
63109
'vuejs-accessibility/mouse-events-have-key-events': 0,
110+
'vuejs-accessibility/media-has-caption': 0,
64111
},
112+
overrides: [
113+
{
114+
files: [
115+
'**/__tests__/*.{j,t}s?(x)',
116+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
117+
],
118+
env: {
119+
jest: true,
120+
},
121+
},
122+
{
123+
files: ['webpack.config.js', 'build/**/*.js'],
124+
rules: {
125+
'import/no-extraneous-dependencies': 0,
126+
'no-console': 0,
127+
},
128+
},
129+
],
65130
};

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.yarn/
23
dist/
34
node_modules/
45

@@ -13,7 +14,6 @@ yarn-error.log*
1314

1415
# Editor directories and files
1516
.idea
16-
.vscode
1717
*.suo
1818
*.ntvs*
1919
*.njsproj

.prettierrc.js

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

.stylelintrc.js

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,62 @@
11
module.exports = {
2-
extends: 'stylelint-config-standard',
2+
plugins: ['@stylistic/stylelint-plugin'],
3+
extends: [
4+
'stylelint-config-standard',
5+
'stylelint-config-recommended',
6+
'stylelint-config-recommended-vue',
7+
'stylelint-config-standard-scss',
8+
'stylelint-config-recommended-scss',
9+
'stylelint-config-recess-order',
10+
],
311
overrides: [
412
{
5-
files: ['*.vue', '**/*.vue'],
13+
files: ['**/*.vue', '**/*.html'],
614
customSyntax: 'postcss-html',
715
},
816
],
917
rules: {
1018
'alpha-value-notation': null,
1119
'color-function-notation': null,
20+
'declaration-block-no-redundant-longhand-properties': null,
1221
'declaration-no-important': true,
13-
'indentation': 4,
22+
'media-feature-range-notation': null,
1423
'no-descending-specificity': null,
15-
'no-empty-first-line': null,
24+
'number-max-precision': null,
25+
'order/properties-order': null,
1626
'property-no-vendor-prefix': null,
27+
'scss/at-rule-no-unknown': [
28+
true,
29+
{
30+
ignoreAtRules: [
31+
'each',
32+
'else',
33+
'extends',
34+
'for',
35+
'function',
36+
'if',
37+
'ignores',
38+
'include',
39+
'media',
40+
'mixin',
41+
'return',
42+
'use',
43+
44+
// Font Awesome 4
45+
'fa-font-path',
46+
],
47+
},
48+
],
49+
'scss/double-slash-comment-empty-line-before': null,
50+
'scss/double-slash-comment-whitespace-inside': null,
1751
'selector-class-pattern': null,
1852
'shorthand-property-no-redundant-values': null,
19-
'string-quotes': 'single',
53+
54+
'@stylistic/color-hex-case': 'lower',
55+
'@stylistic/indentation': 4,
56+
// '@stylistic/no-empty-first-line': true,
57+
'@stylistic/number-leading-zero': 'always',
58+
'@stylistic/property-case': 'lower',
59+
'@stylistic/string-quotes': 'single',
60+
'@stylistic/unit-case': 'lower',
2061
},
2162
};

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"vue.volar",
4+
"dbaeumer.vscode-eslint",
5+
"stylelint.vscode-stylelint",
6+
"rvest.vs-code-prettier-eslint"
7+
]
8+
}

.vscode/settings.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"files.eol": "\n",
3+
"files.insertFinalNewline": true,
4+
"files.trimFinalNewlines": true,
5+
"files.trimTrailingWhitespace": true,
6+
"stylelint.validate": [
7+
"vue",
8+
"css",
9+
"less",
10+
"sass",
11+
"scss",
12+
"postcss"
13+
],
14+
"[javascript]": {
15+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
16+
},
17+
"[vue]": {
18+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
19+
},
20+
"[css]": {
21+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
22+
},
23+
}

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,23 @@ Note that the "secure" option enables JWT authentication, but will not work on J
4242
Jitsi Meet supports extra configuration to customise its interface and functions. You can configure these via the optional `interfaceConfigOverwrite` and `configOverwrite` config options.
4343

4444
The defaults are:
45-
~~~json
46-
"conference": {
45+
~~~json5
46+
"plugin-conference": {
4747
"secure": false,
4848
"server": "meet.jit.si",
4949
"queries": true,
5050
"channels": true,
51+
"closeOnLeave": true,
5152
"buttonIcon": "fa-phone",
5253
"viewHeight": "40%",
53-
"enabledInChannels": ["*"],
54+
"enabledInChannels": [],
55+
"disabledInChannels": [],
5456
"groupInvitesTTL": 30000,
5557
"maxParticipantsLength": 60,
56-
"participantsMore": "more...",
58+
// These messages are sent to irc for users not using the plugin
59+
// Users with the plugin will see the translations
5760
"inviteText": "{{ nick }} is inviting you to a private call.",
5861
"joinText": "{{ nick }} has joined the conference.",
59-
"joinButtonText": "Join now!",
6062
"showLink": false,
6163
"useLinkShortener": false,
6264
"linkShortenerURL": "https://x0.no/api/?{{ link }}",
@@ -65,9 +67,10 @@ The defaults are:
6567
"SHOW_JITSI_WATERMARK": false,
6668
"SHOW_WATERMARK_FOR_GUESTS": false,
6769
"TOOLBAR_BUTTONS": [
68-
"microphone", "camera", "fullscreen", "hangup",
69-
"settings", "videoquality", "filmstrip", "fodeviceselection",
70-
"stats", "shortcuts",
70+
"camera", "closedcaptions", "desktop", "etherpad", "filmstrip",
71+
"fullscreen", "hangup", "help", "highlight", "livestreaming",
72+
"microphone", "noisesuppression", "raisehand", "select-background",
73+
"settings", "shortcuts", "stats", "tileview", "toggle-camera",
7174
],
7275
},
7376
"configOverwrite": {
@@ -96,7 +99,7 @@ More info about Jitsi's options can be found in these files:
9699
* https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js
97100
* https://github.com/jitsi/jitsi-meet/blob/master/config.js
98101

99-
You may also choose to hide the conference call icon in either channels or private messages:
102+
You may also choose to hide the conference call icon in either channels or direct messages:
100103
```json
101104
{
102105
"channels": false,
@@ -108,4 +111,4 @@ Running your own conference server allows you to secure your conference rooms. W
108111

109112
## License
110113

111-
[ Licensed under the Apache License, Version 2.0](LICENSE).
114+
[Licensed under the Apache License, Version 2.0](LICENSE).

0 commit comments

Comments
 (0)