Skip to content

Commit

Permalink
chore(lint) various LGTM fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Nov 15, 2020
1 parent c776c4b commit 432ff2c
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/languages/1c.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,5 +515,5 @@ export default function(hljs) {
STRINGS,
DATE
]
}
};
}
2 changes: 1 addition & 1 deletion src/languages/hy.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ export default function(hljs) {
aliases: ['hylang'],
illegal: /\S/,
contains: [hljs.SHEBANG(), LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
}
};
}
2 changes: 0 additions & 2 deletions src/languages/java.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Category: common, enterprise
Website: https://www.java.com/
*/

import * as regex from '../lib/regex.js';

export default function(hljs) {
var JAVA_IDENT_RE = '[\u00C0-\u02B8a-zA-Z_$][\u00C0-\u02B8a-zA-Z_$0-9]*';
var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\s*,\\s*' + JAVA_IDENT_RE + ')*>)?';
Expand Down
2 changes: 1 addition & 1 deletion src/languages/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function(hljs) {
* @param {{after:number}} param1
*/
const hasClosingTag = (match, { after }) => {
const tag = match[0].replace("<", "</");
const tag = "</" + match[0].slice(1);
const pos = match.input.indexOf(tag, after);
return pos !== -1;
};
Expand Down
2 changes: 1 addition & 1 deletion src/languages/kotlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function(hljs) {
}
]
};
SUBST.contains.push(STRING)
SUBST.contains.push(STRING);

var ANNOTATION_USE_SITE = {
className: 'meta', begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'
Expand Down
2 changes: 1 addition & 1 deletion src/languages/mercury.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function(hljs) {
begin: '\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]',
relevance: 0
};
STRING.contains = STRING.contains.slice() // we need our own copy of contains
STRING.contains = STRING.contains.slice(); // we need our own copy of contains
STRING.contains.push(STRING_FMT);

var IMPLICATION = {
Expand Down
2 changes: 1 addition & 1 deletion src/languages/parser3.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function(hljs) {
contains: [
hljs.COMMENT('^#', '$'),
hljs.COMMENT(
/\\^rem\{/,
/\^rem\{/,
/\}/,
{
relevance: 10,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/powershell.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default function(hljs) {
)
};

PS_METHODS.contains.unshift(PS_TYPE)
PS_METHODS.contains.unshift(PS_TYPE);

return {
name: 'PowerShell',
Expand Down
32 changes: 16 additions & 16 deletions src/languages/r.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ export default function(hljs) {
// Primitive functions
// These are all the functions in `base` that are implemented as a
// `.Primitive`, minus those functions that are also keywords.
'abs acos acosh all any anyNA Arg as.call as.character' +
'as.complex as.double as.environment as.integer as.logical' +
'as.null.default as.numeric as.raw asin asinh atan atanh attr' +
'attributes baseenv browser c call ceiling class Conj cos cosh' +
'cospi cummax cummin cumprod cumsum digamma dim dimnames' +
'emptyenv exp expression floor forceAndCall gamma gc.time' +
'globalenv Im interactive invisible is.array is.atomic is.call' +
'is.character is.complex is.double is.environment is.expression' +
'is.finite is.function is.infinite is.integer is.language' +
'is.list is.logical is.matrix is.na is.name is.nan is.null' +
'is.numeric is.object is.pairlist is.raw is.recursive is.single' +
'is.symbol lazyLoadDBfetch length lgamma list log max min' +
'missing Mod names nargs nzchar oldClass on.exit pos.to.env' +
'proc.time prod quote range Re rep retracemem return round' +
'seq_along seq_len seq.int sign signif sin sinh sinpi sqrt' +
'standardGeneric substitute sum switch tan tanh tanpi tracemem' +
'abs acos acosh all any anyNA Arg as.call as.character ' +
'as.complex as.double as.environment as.integer as.logical ' +
'as.null.default as.numeric as.raw asin asinh atan atanh attr ' +
'attributes baseenv browser c call ceiling class Conj cos cosh ' +
'cospi cummax cummin cumprod cumsum digamma dim dimnames ' +
'emptyenv exp expression floor forceAndCall gamma gc.time ' +
'globalenv Im interactive invisible is.array is.atomic is.call ' +
'is.character is.complex is.double is.environment is.expression ' +
'is.finite is.function is.infinite is.integer is.language ' +
'is.list is.logical is.matrix is.na is.name is.nan is.null ' +
'is.numeric is.object is.pairlist is.raw is.recursive is.single ' +
'is.symbol lazyLoadDBfetch length lgamma list log max min ' +
'missing Mod names nargs nzchar oldClass on.exit pos.to.env ' +
'proc.time prod quote range Re rep retracemem return round ' +
'seq_along seq_len seq.int sign signif sin sinh sinpi sqrt ' +
'standardGeneric substitute sum switch tan tanh tanpi tracemem ' +
'trigamma trunc unclass untracemem UseMethod xtfrm',
},

Expand Down
2 changes: 1 addition & 1 deletion src/languages/swift.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function(hljs) {
var OPTIONAL_USING_TYPE = {
className: 'type',
begin: '\\b[A-Z][\\w\u00C0-\u02B8\']*[!?]'
}
};
var BLOCK_COMMENT = hljs.COMMENT(
'/\\*',
'\\*/',
Expand Down
4 changes: 2 additions & 2 deletions tools/developer.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}
</style>
</head>
<body id>
<body>
<div class="editor" id="app">
<h3>Code</h3>
<div>
Expand Down Expand Up @@ -295,7 +295,7 @@ <h3>Markup</h3>
this.refreshKlass();
}
}
})
});
</script>
</body>
</html>

0 comments on commit 432ff2c

Please sign in to comment.