Skip to content

files rules

Ensure published files are correct — no sensitive files, proper shebang, valid dependencies.

Rules (10)

RuleDescriptionSeverityFixable
files-fieldCheck that files field exists and is configured correctly🟡 warning🔧
sensitiveCheck for sensitive files in published package and dist🔴 error
bin-shebangCheck that bin files have a shebang line🟡 warning
bin-executableCheck that bin files have executable permissions🟡 warning
all-files-formatCheck that all JS files match their expected module format (when no exports field)🟡 warning
format-validationCheck that .mjs/.cjs files contain the expected module format🟡 warning
implicit-index-formatCheck that implicit index.js matches the declared package type🟡 warning
prepublishCheck that prepublishOnly script exists🟡 warning🔧
duplicate-depCheck for packages in both dependencies and devDependencies🔴 error
local-dependencyError on file:/link: protocol deps, warn on workspace: protocol🔴 error

Released under the MIT License.