chore(cloudcmd) lint

This commit is contained in:
coderaiser 2022-05-11 14:21:25 +03:00
parent 95ede62e81
commit 6af8f19bb6
7 changed files with 13 additions and 13 deletions

View file

@ -32,7 +32,7 @@ function EventsProto() {
switch(type) {
default:
if (!/element$/.test(type))
if (!type.endsWith('element'))
throw Error('unknown eventName: ' + type);
parseArgs(

View file

@ -36,8 +36,8 @@ function check(name) {
}
function getModule(name) {
const regExpHTML = new RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);
const regExpJSON = new RegExp(FILES_JSON);
const regExpHTML = RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);
const regExpJSON = RegExp(FILES_JSON);
const isHTML = regExpHTML.test(name);
const isJSON = regExpJSON.test(name);
@ -54,7 +54,7 @@ function getModule(name) {
function getPath(name, isHTML, isJSON) {
let path;
const regExp = new RegExp(FILES_HTML_ROOT);
const regExp = RegExp(FILES_HTML_ROOT);
const isRoot = regExp.test(name);
if (isHTML) {