mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
95ede62e81
commit
6af8f19bb6
7 changed files with 13 additions and 13 deletions
|
|
@ -32,7 +32,7 @@ function EventsProto() {
|
|||
|
||||
switch(type) {
|
||||
default:
|
||||
if (!/element$/.test(type))
|
||||
if (!type.endsWith('element'))
|
||||
throw Error('unknown eventName: ' + type);
|
||||
|
||||
parseArgs(
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue