Completed
Push — master ( 862cae...854c71 )
by Raimund
13s
created

src/directives/linkify.js (6 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
/**
2
 * Nextcloud - Tasks
3
 *
4
 * @author Raimund Schlüßler
5
 * @copyright 2019 Raimund Schlüßler <[email protected]>
6
 *
7
 * This library is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
9
 * License as published by the Free Software Foundation; either
10
 * version 3 of the License, or any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public
18
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 */
21
'use strict'
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
22
23
import linkifyStr from 'linkifyjs/string'
0 ignored issues
show
'import' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
24
25
function linkify(el, binding) {
26
	el.innerHTML = linkifyStr(binding.value, {
27
		defaultProtocol: 'https'
28
	})
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
29
}
30
31
export {
0 ignored issues
show
'export' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
32
	linkify
33
}
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
34