{"id":13800977,"url":"https://github.com/ota-meshi/eslint-plugin-astro","last_synced_at":"2025-05-14T15:09:41.986Z","repository":{"id":37443693,"uuid":"494418179","full_name":"ota-meshi/eslint-plugin-astro","owner":"ota-meshi","description":"ESLint plugin for Astro component","archived":false,"fork":false,"pushed_at":"2025-03-31T05:20:10.000Z","size":1769,"stargazers_count":356,"open_issues_count":22,"forks_count":26,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T22:17:41.778Z","etag":null,"topics":["astro","astrojs","eslint","eslint-plugin","eslintplugin"],"latest_commit_sha":null,"homepage":"https://ota-meshi.github.io/eslint-plugin-astro/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ota-meshi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"ota-meshi"}},"created_at":"2022-05-20T10:20:30.000Z","updated_at":"2025-04-11T06:53:03.000Z","dependencies_parsed_at":"2023-02-17T09:31:12.732Z","dependency_job_id":"46535031-7f57-46eb-92a7-e097368967a3","html_url":"https://github.com/ota-meshi/eslint-plugin-astro","commit_stats":{"total_commits":465,"total_committers":14,"mean_commits":"33.214285714285715","dds":0.5419354838709678,"last_synced_commit":"11116dcc0db17acc482851380dc79ad1c1549558"},"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ota-meshi%2Feslint-plugin-astro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ota-meshi%2Feslint-plugin-astro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ota-meshi%2Feslint-plugin-astro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ota-meshi%2Feslint-plugin-astro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ota-meshi","download_url":"https://codeload.github.com/ota-meshi/eslint-plugin-astro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254170046,"owners_count":22026219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astro","astrojs","eslint","eslint-plugin","eslintplugin"],"created_at":"2024-08-04T00:01:18.164Z","updated_at":"2025-05-14T15:09:41.962Z","avatar_url":"https://github.com/ota-meshi.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ota-meshi"],"categories":["Plugins","TypeScript","Community Integrations"],"sub_categories":["Frameworks","Developer Experience"],"readme":"# Introduction\n\n`eslint-plugin-astro` is [ESLint] plugin for [Astro components].  \nYou can check on the [Online DEMO](https://ota-meshi.github.io/eslint-plugin-astro/playground/).\n\n[![sponsors](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/ota-meshi)\n\n[![NPM license](https://img.shields.io/npm/l/eslint-plugin-astro.svg)](https://www.npmjs.com/package/eslint-plugin-astro)\n[![NPM version](https://img.shields.io/npm/v/eslint-plugin-astro.svg)](https://www.npmjs.com/package/eslint-plugin-astro)\n[![NPM downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads\u0026colorB=green\u0026suffix=/day\u0026query=$.downloads\u0026uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-astro\u0026maxAge=3600)](http://www.npmtrends.com/eslint-plugin-astro)\n[![NPM downloads](https://img.shields.io/npm/dw/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)\n[![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)\n[![NPM downloads](https://img.shields.io/npm/dy/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)\n[![NPM downloads](https://img.shields.io/npm/dt/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)\n[![Build Status](https://github.com/ota-meshi/eslint-plugin-astro/workflows/CI/badge.svg?branch=main)](https://github.com/ota-meshi/eslint-plugin-astro/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/ota-meshi/eslint-plugin-astro/badge.svg?branch=main)](https://coveralls.io/github/ota-meshi/eslint-plugin-astro?branch=main)\n\nThis plugin is in the **_experimental stages_** of development.\n\nAt least it works fine with a [withastro/docs](https://github.com/withastro/docs) repository.\n\n## 📛 What is this plugin?\n\n[ESLint] plugin for [Astro components].\n\n- Linting Astro components using ESLint.\n- Find problems with Astro components.\n- Apply a consistent code style to Astro components.\n- Linting targets include [Frontmatter], [HTML Template], [JSX-like Expressions], [Client-Side Scripts], [Directives], and more.\n- Check code in real time with the ESLint editor integrations.\n\n[frontmatter]: https://docs.astro.build/en/core-concepts/astro-components/#the-component-script\n[html template]: https://docs.astro.build/en/core-concepts/astro-components/#the-component-template\n[JSX-like Expressions]: https://docs.astro.build/en/core-concepts/astro-syntax/#jsx-like-expressions\n[client-side scripts]: https://docs.astro.build/en/guides/client-side-scripts/\n[directives]: https://docs.astro.build/en/reference/directives-reference/\n\n\u003c!--DOCS_IGNORE_START--\u003e\n\n## 📖 Documentation\n\nSee [documents](https://ota-meshi.github.io/eslint-plugin-astro/).\n\n\u003c!--INSTALL_GUIDE_START--\u003e\n\n## 💿 Installation\n\n```bash\nnpm install --save-dev eslint eslint-plugin-astro\n```\n\nIf you write TypeScript in Astro components, you also need to install the `@typescript-eslint/parser`:\n\n```bash\nnpm install --save-dev @typescript-eslint/parser\n```\n\nIf you want to use the rules for checking accessibility (A11Y), you also need to install [eslint-plugin-jsx-a11y] additionally:  \n(It is used internally in the rules for A11Y.)\n\n```bash\nnpm install --save-dev eslint-plugin-jsx-a11y\n```\n\n[eslint-plugin-jsx-a11y]: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y\n\n\u003e **Requirements**\n\u003e\n\u003e - ESLint v7.0.0 and above\n\u003e - Node.js v18.18, v20.9, v21.1 and above\n\n\u003c!--INSTALL_GUIDE_END--\u003e\n\n\u003c!--DOCS_IGNORE_END--\u003e\n\n## 📖 Usage\n\n\u003c!--USAGE_SECTION_START--\u003e\n\u003c!--USAGE_GUIDE_START--\u003e\n\n### Configuration\n\n#### New Config \\(`eslint.config.js`\\)\n\nUse `eslint.config.js` file to configure rules. See also: [https://eslint.org/docs/latest/use/configure/configuration-files-new](https://eslint.org/docs/latest/use/configure/configuration-files-new).\n\nExample **eslint.config.js**:\n\n```js\nimport eslintPluginAstro from 'eslint-plugin-astro';\nexport default [\n  // add more generic rule sets here, such as:\n  // js.configs.recommended,\n  ...eslintPluginAstro.configs.recommended,\n  {\n    rules: {\n      // override/add rules settings here, such as:\n      // \"astro/no-set-html-directive\": \"error\"\n    }\n  }\n];\n```\n\nExample **eslint.config.cjs**:\n\n```js\nconst eslintPluginAstro = require('eslint-plugin-astro');\nmodule.exports = [\n  // add more generic rule sets here, such as:\n  // js.configs.recommended,\n  ...eslintPluginAstro.configs['flat/recommended'], // In CommonJS, the `flat/` prefix is required.\n  {\n    rules: {\n      // override/add rules settings here, such as:\n      // \"astro/no-set-html-directive\": \"error\"\n    }\n  }\n];\n```\n\nThis plugin provides configs:\n\n- `*.configs['base']` ... Minimal configuration to enable correct Astro component linting.\n- `*.configs['recommended']` ... Above, plus rules to prevent errors or unintended behavior.\n- `*.configs['all']` ... Configuration enables all astro rules. It's meant for testing, not for production use because it changes with every minor and major version of the plugin. Use it at your own risk.\n- Extension of sharable configuration provided by [eslint-plugin-jsx-a11y]. You need to install [eslint-plugin-jsx-a11y] to use it.\n  - `*.configs['jsx-a11y-recommended']` ... Similar to the [`\"plugin:jsx-a11y/recommended\"` configuration](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#rule-strictness-in-different-modes), but with the rules extended for Astro components enabled.\n  - `*.configs['jsx-a11y-strict']` ... Similar to the [`\"plugin:jsx-a11y/strict\"` configuration](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#rule-strictness-in-different-modes), but with the rules extended for Astro components enabled.\n\nSee [the rule list](https://ota-meshi.github.io/eslint-plugin-astro/rules/) to get the `rules` that this plugin provides.\n\n#### Legacy Config \\(`.eslintrc`\\)\n\nUse `.eslintrc.*` file to configure rules. See also: [https://eslint.org/docs/latest/use/configure](https://eslint.org/docs/latest/use/configure).\n\nExample **.eslintrc.js**. When using the shareable configuration provided by the plugin:\n\n```js\nmodule.exports = {\n  // ...\n  extends: [\n    // ...\n    \"plugin:astro/recommended\",\n  ],\n  // ...\n  overrides: [\n    {\n      // Define the configuration for `.astro` file.\n      files: [\"*.astro\"],\n      // Allows Astro components to be parsed.\n      parser: \"astro-eslint-parser\",\n      // Parse the script in `.astro` as TypeScript by adding the following configuration.\n      // It's the setting you need when using TypeScript.\n      parserOptions: {\n        parser: \"@typescript-eslint/parser\",\n        extraFileExtensions: [\".astro\"],\n      },\n      rules: {\n        // override/add rules settings here, such as:\n        // \"astro/no-set-html-directive\": \"error\"\n      },\n    },\n    // ...\n  ],\n}\n```\n\nIf you do not use a shareable configuration, it is the same as the following configuration:\n\n```js\nmodule.exports = {\n  // ...\n  overrides: [\n    {\n      // Define the configuration for `.astro` file.\n      files: [\"*.astro\"],\n      // Enable this plugin\n      plugins: [\"astro\"],\n      env: {\n        // Enables global variables available in Astro components.\n        node: true,\n        \"astro/astro\": true,\n        es2020: true,\n      },\n      // Allows Astro components to be parsed.\n      parser: \"astro-eslint-parser\",\n      // Parse the script in `.astro` as TypeScript by adding the following configuration.\n      // It's the setting you need when using TypeScript.\n      parserOptions: {\n        parser: \"@typescript-eslint/parser\",\n        extraFileExtensions: [\".astro\"],\n        // The script of Astro components uses ESM.\n        sourceType: \"module\",\n      },\n      rules: {\n        // Enable recommended rules\n        \"astro/no-conflict-set-directives\": \"error\",\n        \"astro/no-unused-define-vars-in-style\": \"error\",\n\n        // override/add rules settings here, such as:\n        // \"astro/no-set-html-directive\": \"error\"\n      },\n    },\n    {\n      // Define the configuration for `\u003cscript\u003e` tag.\n      // Script in `\u003cscript\u003e` is assigned a virtual file name with the `.js` extension.\n      files: [\"**/*.astro/*.js\", \"*.astro/*.js\"],\n      env: {\n        browser: true,\n        es2020: true,\n      },\n      parserOptions: {\n        sourceType: \"module\",\n      },\n      rules: {\n        // override/add rules settings here, such as:\n        // \"no-unused-vars\": \"error\"\n\n        // If you are using \"prettier/prettier\" rule,\n        // you don't need to format inside \u003cscript\u003e as it will be formatted as a `.astro` file.\n        \"prettier/prettier\": \"off\",\n      },\n    },\n    {\n      // Define the configuration for `\u003cscript\u003e` tag when using `client-side-ts` processor.\n      // Script in `\u003cscript\u003e` is assigned a virtual file name with the `.ts` extension.\n      files: [\"**/*.astro/*.ts\", \"*.astro/*.ts\"],\n      env: {\n        browser: true,\n        es2020: true,\n      },\n      parser: \"@typescript-eslint/parser\",\n      parserOptions: {\n        sourceType: \"module\",\n        project: null,\n      },\n      rules: {\n        // override/add rules settings here, such as:\n        // \"no-unused-vars\": \"error\"\n\n        // If you are using \"prettier/prettier\" rule,\n        // you don't need to format inside \u003cscript\u003e as it will be formatted as a `.astro` file.\n        \"prettier/prettier\": \"off\",\n      },\n    },\n    // ...\n  ],\n}\n```\n\nIf you are writing client-side scripts in TypeScript and want to use `@typescript-eslint/parser` as the TypeScript parser, you will need to use `client-side-ts` processor and configure it as follows.\n\n```js\nmodule.exports = {\n  // ...\n  extends: [\n    // ...\n    \"plugin:astro/recommended\",\n  ],\n  // ...\n  overrides: [\n    {\n      files: [\"*.astro\"],\n      // ...\n      processor: \"astro/client-side-ts\", // \u003c- Uses the \"client-side-ts\" processor.\n      rules: {\n        // ...\n      },\n    },\n    // ...\n  ],\n}\n```\n\nThe pull request diff [here](https://github.com/withastro/docs/pull/710/files) is an example of introducing `eslint-plugin-astro` to the [withastro/docs](https://github.com/withastro/docs) repository.\n\nThis plugin provides configs:\n\n- `plugin:astro/base` ... Minimal configuration to enable correct Astro component linting.\n- `plugin:astro/recommended` ... Above, plus rules to prevent errors or unintended behavior.\n- `plugin:astro/all` ... Configuration enables all astro rules. It's meant for testing, not for production use because it changes with every minor and major version of the plugin. Use it at your own risk.\n- Extension of sharable configuration provided by [eslint-plugin-jsx-a11y]. You need to install [eslint-plugin-jsx-a11y] to use it.\n  - `plugin:astro/jsx-a11y-recommended` ... Similar to the [`\"plugin:jsx-a11y/recommended\"` configuration](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#rule-strictness-in-different-modes), but with the rules extended for Astro components enabled.\n  - `plugin:astro/jsx-a11y-strict` ... Similar to the [`\"plugin:jsx-a11y/strict\"` configuration](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#rule-strictness-in-different-modes), but with the rules extended for Astro components enabled.\n\nSee [the rule list](https://ota-meshi.github.io/eslint-plugin-astro/rules/) to get the `rules` that this plugin provides.\n\n#### Parser Configuration\n\nSee [https://github.com/ota-meshi/astro-eslint-parser#readme](https://github.com/ota-meshi/astro-eslint-parser#readme).\n\n### Resolving Error in JSX: Unsafe return of an `any` typed value\n\nAstro supports JSX from multiple frameworks such as **React**, **Preact**, and **Solid.js** by defining JSX Elements as `HTMLElement | any;`. When a framework with a JSX type definition is not present in your project this **any** can cause the ESLint error `@typescript-eslint/no-unsafe-return`.\n\nThis can be resolved by overriding the astroHTML.JSX.Element definition with a `*.d.ts` file such as `jsx.d.ts` in your project root directory:\n\n```typescript\nimport \"astro/astro-jsx\";\n\ndeclare global {\n  namespace JSX {\n    // type Element = astroHTML.JSX.Element // We want to use this, but it is defined as any.\n    type Element = HTMLElement;\n  }\n}\n```\n\nAdd this `*.d.ts` to your `tsconfig.eslint.json`:\n\n```json\n{\n  \"extends\": \"./tsconfig.json\",\n  \"include\": [\n    // ...\n    \"jsx.d.ts\"\n  ]\n}\n\n```\n\nEnsure that any necessary parserOptions in your `.eslintrc.**` have a project key also pointing to this config:\n\n```json\n{\n  // ...\n  \"overrides\": [\n    {\n      \"files\": [\"*.astro\"],\n      \"parser\": \"astro-eslint-parser\",\n      \"parserOptions\": {\n        \"parser\": \"@typescript-eslint/parser\",\n        \"extraFileExtensions\": [\".astro\"],\n        // add this line\n        \"project\": \"./tsconfig.eslint.json\"\n      },\n      // ...\n    }\n    // ...\n  ]}\n\n```\n\n### Running ESLint from the command line\n\nIf you want to run `eslint` from the command line, make sure you include the `.astro` extension using a glob pattern, because ESLint targets only `.js` files by default.\n\nExamples:\n\n```bash\neslint \"src/**/*.{js,astro}\"\n```\n\n## 💻 Editor Integrations\n\n### Visual Studio Code\n\nUse the [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension that Microsoft provides officially.\n\nYou have to configure the `eslint.validate` option of the extension to check `.astro` files, because the extension targets only `*.js` or `*.jsx` files by default.\n\nExample **.vscode/settings.json**:\n\n```json\n{\n  \"eslint.validate\": [\n    \"javascript\",\n    \"javascriptreact\",\n    \"astro\", // Enable .astro\n    \"typescript\", // Enable .ts\n    \"typescriptreact\" // Enable .tsx\n  ]\n}\n```\n\n### Zed\n\nZed has built-in support for ESLint. However, you need to configure ESLint to work with Astro files.\n\nExample **.zed/settings.json**:\n\n```json\n{\n  \"languages\": {\n    \"Astro\": {\n      \"language_servers\": [\"eslint\", \"...\"]\n    }\n  }\n}\n```\n\n\u003c!--USAGE_GUIDE_END--\u003e\n\u003c!--USAGE_SECTION_END--\u003e\n\n## ✅ Rules\n\n\u003c!--RULES_SECTION_START--\u003e\n\nThe `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench 🔧 below.  \nThe rules with the following star ⭐ are included in the `plugin:astro/recommended` configs.\n\n\u003e Doesn't the rule you want exist? [Share your idea of that rule with us](https://github.com/ota-meshi/eslint-plugin-astro/issues/new?template=new_rule_request.yml).\n\n\u003c!--RULES_TABLE_START--\u003e\n\n## Possible Errors\n\nThese rules relate to possible syntax or logic errors in Astro component code:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/missing-client-only-directive-value](https://ota-meshi.github.io/eslint-plugin-astro/rules/missing-client-only-directive-value/) | the client:only directive is missing the correct component's framework value | ⭐ |\n| [astro/no-conflict-set-directives](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/) | disallow conflicting set directives and child contents | ⭐ |\n| [astro/no-deprecated-astro-canonicalurl](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/) | disallow using deprecated `Astro.canonicalURL` | ⭐ |\n| [astro/no-deprecated-astro-fetchcontent](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/) | disallow using deprecated `Astro.fetchContent()` | ⭐🔧 |\n| [astro/no-deprecated-astro-resolve](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/) | disallow using deprecated `Astro.resolve()` | ⭐ |\n| [astro/no-deprecated-getentrybyslug](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/) | disallow using deprecated `getEntryBySlug()` | ⭐ |\n| [astro/no-exports-from-components](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/) | disallow value export |  |\n| [astro/no-unused-define-vars-in-style](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/) | disallow unused `define:vars={...}` in `style` tag | ⭐ |\n| [astro/valid-compile](https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/) | disallow warnings when compiling. | ⭐ |\n\n## Security Vulnerability\n\nThese rules relate to security vulnerabilities in Astro component code:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/no-set-html-directive](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/) | disallow use of `set:html` to prevent XSS attack |  |\n\n## Best Practices\n\nThese rules relate to better ways of doing things to help you avoid problems:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/no-set-text-directive](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/) | disallow use of `set:text` | 🔧 |\n| [astro/no-unused-css-selector](https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/) | disallow selectors defined in `style` tag that don't use in HTML |  |\n\n## Stylistic Issues\n\nThese rules relate to style guidelines, and are therefore quite subjective:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/prefer-class-list-directive](https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-class-list-directive/) | require `class:list` directives instead of `class` with expressions | 🔧 |\n| [astro/prefer-object-class-list](https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-object-class-list/) | require use object instead of ternary expression in `class:list` | 🔧 |\n| [astro/prefer-split-class-list](https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-split-class-list/) | require use split array elements in `class:list` | 🔧 |\n| [astro/sort-attributes](https://ota-meshi.github.io/eslint-plugin-astro/rules/sort-attributes/) | enforce sorting of attributes | 🔧 |\n\n## A11Y Extension Rules\n\nThese rules extend the rules provided by [eslint-plugin-jsx-a11y] to work well in Astro component:  \n(You need to install [eslint-plugin-jsx-a11y] to use the rules.)\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/jsx-a11y/alt-text](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/) | apply `jsx-a11y/alt-text` rule to Astro components |  |\n| [astro/jsx-a11y/anchor-ambiguous-text](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-ambiguous-text/) | apply `jsx-a11y/anchor-ambiguous-text` rule to Astro components |  |\n| [astro/jsx-a11y/anchor-has-content](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-has-content/) | apply `jsx-a11y/anchor-has-content` rule to Astro components |  |\n| [astro/jsx-a11y/anchor-is-valid](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-is-valid/) | apply `jsx-a11y/anchor-is-valid` rule to Astro components |  |\n| [astro/jsx-a11y/aria-activedescendant-has-tabindex](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-activedescendant-has-tabindex/) | apply `jsx-a11y/aria-activedescendant-has-tabindex` rule to Astro components |  |\n| [astro/jsx-a11y/aria-props](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-props/) | apply `jsx-a11y/aria-props` rule to Astro components |  |\n| [astro/jsx-a11y/aria-proptypes](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-proptypes/) | apply `jsx-a11y/aria-proptypes` rule to Astro components |  |\n| [astro/jsx-a11y/aria-role](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-role/) | apply `jsx-a11y/aria-role` rule to Astro components |  |\n| [astro/jsx-a11y/aria-unsupported-elements](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-unsupported-elements/) | apply `jsx-a11y/aria-unsupported-elements` rule to Astro components |  |\n| [astro/jsx-a11y/autocomplete-valid](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/autocomplete-valid/) | apply `jsx-a11y/autocomplete-valid` rule to Astro components |  |\n| [astro/jsx-a11y/click-events-have-key-events](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/click-events-have-key-events/) | apply `jsx-a11y/click-events-have-key-events` rule to Astro components |  |\n| [astro/jsx-a11y/control-has-associated-label](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/control-has-associated-label/) | apply `jsx-a11y/control-has-associated-label` rule to Astro components |  |\n| [astro/jsx-a11y/heading-has-content](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/heading-has-content/) | apply `jsx-a11y/heading-has-content` rule to Astro components |  |\n| [astro/jsx-a11y/html-has-lang](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/html-has-lang/) | apply `jsx-a11y/html-has-lang` rule to Astro components |  |\n| [astro/jsx-a11y/iframe-has-title](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/iframe-has-title/) | apply `jsx-a11y/iframe-has-title` rule to Astro components |  |\n| [astro/jsx-a11y/img-redundant-alt](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/img-redundant-alt/) | apply `jsx-a11y/img-redundant-alt` rule to Astro components |  |\n| [astro/jsx-a11y/interactive-supports-focus](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/interactive-supports-focus/) | apply `jsx-a11y/interactive-supports-focus` rule to Astro components |  |\n| [astro/jsx-a11y/label-has-associated-control](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/label-has-associated-control/) | apply `jsx-a11y/label-has-associated-control` rule to Astro components |  |\n| [astro/jsx-a11y/lang](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/lang/) | apply `jsx-a11y/lang` rule to Astro components |  |\n| [astro/jsx-a11y/media-has-caption](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/media-has-caption/) | apply `jsx-a11y/media-has-caption` rule to Astro components |  |\n| [astro/jsx-a11y/mouse-events-have-key-events](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/mouse-events-have-key-events/) | apply `jsx-a11y/mouse-events-have-key-events` rule to Astro components |  |\n| [astro/jsx-a11y/no-access-key](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-access-key/) | apply `jsx-a11y/no-access-key` rule to Astro components |  |\n| [astro/jsx-a11y/no-aria-hidden-on-focusable](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-aria-hidden-on-focusable/) | apply `jsx-a11y/no-aria-hidden-on-focusable` rule to Astro components |  |\n| [astro/jsx-a11y/no-autofocus](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-autofocus/) | apply `jsx-a11y/no-autofocus` rule to Astro components |  |\n| [astro/jsx-a11y/no-distracting-elements](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-distracting-elements/) | apply `jsx-a11y/no-distracting-elements` rule to Astro components |  |\n| [astro/jsx-a11y/no-interactive-element-to-noninteractive-role](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-interactive-element-to-noninteractive-role/) | apply `jsx-a11y/no-interactive-element-to-noninteractive-role` rule to Astro components |  |\n| [astro/jsx-a11y/no-noninteractive-element-interactions](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-interactions/) | apply `jsx-a11y/no-noninteractive-element-interactions` rule to Astro components |  |\n| [astro/jsx-a11y/no-noninteractive-element-to-interactive-role](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-to-interactive-role/) | apply `jsx-a11y/no-noninteractive-element-to-interactive-role` rule to Astro components |  |\n| [astro/jsx-a11y/no-noninteractive-tabindex](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-tabindex/) | apply `jsx-a11y/no-noninteractive-tabindex` rule to Astro components |  |\n| [astro/jsx-a11y/no-redundant-roles](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-redundant-roles/) | apply `jsx-a11y/no-redundant-roles` rule to Astro components |  |\n| [astro/jsx-a11y/no-static-element-interactions](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-static-element-interactions/) | apply `jsx-a11y/no-static-element-interactions` rule to Astro components |  |\n| [astro/jsx-a11y/prefer-tag-over-role](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/prefer-tag-over-role/) | apply `jsx-a11y/prefer-tag-over-role` rule to Astro components |  |\n| [astro/jsx-a11y/role-has-required-aria-props](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-has-required-aria-props/) | apply `jsx-a11y/role-has-required-aria-props` rule to Astro components |  |\n| [astro/jsx-a11y/role-supports-aria-props](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-supports-aria-props/) | apply `jsx-a11y/role-supports-aria-props` rule to Astro components |  |\n| [astro/jsx-a11y/scope](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/scope/) | apply `jsx-a11y/scope` rule to Astro components |  |\n| [astro/jsx-a11y/tabindex-no-positive](https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/tabindex-no-positive/) | apply `jsx-a11y/tabindex-no-positive` rule to Astro components |  |\n\n## Extension Rules\n\nThese rules extend the rules provided by ESLint itself to work well in Astro component:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [astro/semi](https://ota-meshi.github.io/eslint-plugin-astro/rules/semi/) | Require or disallow semicolons instead of ASI | 🔧 |\n\n\u003c!--RULES_TABLE_END--\u003e\n\u003c!--RULES_SECTION_END--\u003e\n\n\u003c!--DOCS_IGNORE_START--\u003e\n\n## 🍻 Contributing\n\nWelcome contributing!\n\nPlease use GitHub's Issues/PRs.\n\n### Development Tools\n\n- `npm test` runs tests and measures coverage.\n- `npm run update` runs in order to update readme and recommended configuration.\n\n### Working With Rules\n\nThis plugin uses [astro-eslint-parser](https://github.com/ota-meshi/astro-eslint-parser) for the parser. Check [here](https://ota-meshi.github.io/astro-eslint-parser/) to find out about AST.\n\n\u003c!--DOCS_IGNORE_END--\u003e\n\n## ❤️ Supporting\n\nIf you are willing to see that this package continues to be maintained, please consider sponsoring me.\n\n[![sponsors](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/ota-meshi)\n\n## 🔒 License\n\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\n\n[eslint]: https://eslint.org/\n[astro components]: https://docs.astro.build/en/core-concepts/astro-components/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fota-meshi%2Feslint-plugin-astro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fota-meshi%2Feslint-plugin-astro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fota-meshi%2Feslint-plugin-astro/lists"}