# san/one-component-per-file
enforce that each component should be in its own file
- ⚙️ This rule is included in all of
"plugin:san/strongly-recommended"
and"plugin:san/recommended"
.
# 📖 Rule Details
This rule checks if there is only one component per file.
/* ✗ BAD */
export class UIAlert extends san.Component {
// ...
}
export class UIAlert extends san.Component {
// ...
}
<script>
/* ✓ GOOD */
export default {
name: 'ui-alert'
}
</script>
# 🔧 Options
Nothing.