+
Skip to content

Grit checks linting filenames doesn't work for empty files #638

@TheKnarf

Description

@TheKnarf

I built this lint rule:

---
level: error
---

# Disallow "Kitchen sink"-filenames

Use specific filenames (avoid "Kitchen sink"-filenames)

`` `grit
language js

file($name, $body) where {
  $name <: includes r"(util|component|hook|help|helper)[s]?\..*$"($n),
}
`` `

Which for some reason only works if the file its checking have some content...

I'm only matching on filename so it feels like a bug that it skips empty files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载