Performance warn by default astro-doctor/no-unprocessed-script-surprises

no-unprocessed-script-surprises

Warn when script attributes opt out of Astro script processing.

Why

Astro bundles, deduplicates, TypeScript-processes, and may inline scripts with no attributes other than src. Adding attributes such as type, defer, async, data-*, or is:inline intentionally opts out of that pipeline and can surprise maintainers.

Examples

Incorrect

Accidentally unprocessed script

---
---
<script type="module">
  console.log('This is not processed by Astro')
</script>

Correct

Processed Astro script

---
---
<script>
  console.log('Bundled, deduped, and processed by Astro')
</script>

Configuration

Override the default severity in your ESLint config:

// eslint.config.js
import astroDoctorPlugin from '@santi020k/eslint-plugin-astro-doctor'

export default [
  astroDoctorPlugin.configs.recommended,
  {
    rules: {
      'astro-doctor/no-unprocessed-script-surprises': 'error',   // or 'warn' or 'off'
    },
  },
]
       
  

Or in your doctor.config.ts:

export default {
  rules: {
    'astro-doctor/no-unprocessed-script-surprises': 'error',
  },
}
       
  

All rules