astro/semi
Require or disallow semicolons instead of ASI
- π§ The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
π Rule Details
This rule enforces consistent use of semicolons.
This rule extends the base ESLintβs semi rule. The semi rule does not understand frontmatter fence tokens (---
), so using the never
option in the semi rule will result in a false negative.
This rule supports astro-eslint-parserβs AST and tokens.
Default:
---
/* eslint astro/semi: ["error"] */
/* β GOOD */
fn();
/* β BAD */
fn()
---
{() => {
/* β GOOD */
fn();
/* β BAD */
fn()
}}
with "never"
option:
---
/* eslint astro/semi: ["error", "never"] */
/* β GOOD */
fn()
/* β BAD */
fn();
---
{() => {
/* β GOOD */
fn()
/* β BAD */
fn();
}}
π§ Options
{
"semi": "off", // Don't need ESLint's semi, so turn it off.
"astro/semi": [
"error",
"always", // or "never"
{ "omitLastInOneLineBlock": true }
// or { "beforeStatementContinuationChars": "any" | "always" | "never" }
]
}
Same as semi rule option. See here for details.
π« Related rules
π Version
This rule was introduced in eslint-plugin-astro v0.19.0
π Implementation
Taken with β€οΈ from ESLint coreEdit this page
Back
β astro/jsx-a11y/tabindex-no-positive
β astro/jsx-a11y/tabindex-no-positive