🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

eslint-plugin-astro-explicit-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-astro-explicit-wrapper

ESLint plugin for use in Astro, requires explicit wrapping adjacent JSX elements in `&&` or ternary expressions with an HTML element or Fragment.

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
45
-31.82%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-astro-explicit-wrapper

NPM version Software License GitHub Tests Action Status Total Downloads

ESLint plugin for use in Astro, requires explicit wrapping adjacent JSX elements in && or ternary expressions with an HTML element or Fragment.

Why

Astro allows returning multiple elements, but when using ESLint Stylistic's indent rule, the inner elements are not properly indented. Wrapping them in a single element or Fragment ensures correct indentation and code style.

Installation

To use this plugin, you need to have install ESLint and eslint-plugin-astro in your Astro project.

npm install eslint eslint-plugin-astro-explicit-wrapper -D
# or
yarn add eslint eslint-plugin-astro-explicit-wrapper -D

Add the plugin to your ESLint configuration:

// eslint.config.js
import astroExplicitWrapper from 'eslint-plugin-astro-explicit-wrapper'

export default {
  ...astroExplicitWrapper.config,
}

Rules

Rule IDDescription
explicit-wrapperRequires explicit wrapping adjacent JSX elements in && or ternary expressions with an HTML element or Fragment.

Sponsor

If this package has helped you, please consider becoming a sponsor to support my work. Your avatar will be displayed on my major projects.

Become a Patron

Credits

License

Under the MIT LICENSE

Keywords

eslint-plugin

FAQs

Package last updated on 13 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts