Skip to content

value-invalid

Check that every string value in exports starts with ./

PropertyValue
Rule IDexports/value-invalid
Categoryexports
Severity🔴 error
FixableNo

What it Checks

All export values must be relative paths starting with ./. Bare specifiers or absolute paths are invalid.

Examples

❌ Incorrect

json
{ "exports": { ".": { "import": "dist/index.js" } } }

✅ Correct

json
{ "exports": { ".": { "import": "./dist/index.js" } } }

Configuration

Disable this rule:

bash
tspub check --ignore-rules "exports/value-invalid"

Or in tspub.config.ts:

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

Released under the MIT License.