mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
parent
57459dbc66
commit
9079b260fe
2 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ export function pickFilesToLint(log, files) {
|
|||
const cli = new CLIEngine();
|
||||
|
||||
return files.filter(file => {
|
||||
if (!file.isJs()) {
|
||||
if (!file.isJs() && !file.isTypescript()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,14 +119,14 @@ async function checkForSnakeCase(log, files) {
|
|||
|
||||
const ignored = matchesAnyGlob(path, IGNORE_FILE_GLOBS);
|
||||
if (ignored) {
|
||||
log.debug('%j ignored', file);
|
||||
log.debug('[casing] %j ignored', file);
|
||||
return;
|
||||
}
|
||||
|
||||
const pathToValidate = getPathWithoutIgnoredParents(file);
|
||||
const invalid = NON_SNAKE_CASE_RE.test(pathToValidate);
|
||||
if (!invalid) {
|
||||
log.debug('%j uses valid casing', file);
|
||||
log.debug('[casing] %j uses valid casing', file);
|
||||
} else {
|
||||
const ignoredParent = file.getRelativePath().slice(0, -pathToValidate.length);
|
||||
errorPaths.push(`${dim(ignoredParent)}${pathToValidate}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue