Skip to content

file-exists ​

Check that files referenced in exports exist on disk

PropertyValue
Rule IDexports/file-exists
Categoryexports
Severity🟡 warning
FixableNo

What it Checks ​

Detects exports pointing to files that don't exist yet. Usually means you need to run tspub build first.

Examples ​

❌ Incorrect ​

json
// exports points to ./dist/index.js but dist/ is empty

✅ Correct ​

json
// Run tspub build first, then check

Configuration ​

Disable this rule:

bash
tspub check --ignore-rules "exports/file-exists"

Or in tspub.config.ts:

typescript
export default {
  check: {
    severityOverrides: {
      "exports/file-exists": "off",  // or "warning", "error", "info"
    },
  },
};

Released under the MIT License.