Skip to content

ESLint Plugin

@airframeui/eslint-plugin helps keep markup on Airframe: warn on leftover Tailwind/Bootstrap utilities, prefer layout recipes, and require proper field-error ARIA.

npm install -D @airframeui/eslint-plugin
// eslint.config.js
import airframe from '@airframeui/eslint-plugin';

export default [
airframe.configs['flat/recommended'],
];
// .eslintrc.cjs
module.exports = {
plugins: ['@airframeui'],
extends: ['plugin:@airframeui/recommended'],
};
RuleRecommendedWhat it does
@airframeui/no-tailwind-classeswarnFlags Tailwind utility tokens in class / className
@airframeui/no-bootstrap-classeswarnFlags Bootstrap class tokens in class / className
@airframeui/prefer-airframe-layout-recipeswarnRewrites flex flex-col, grid grid-cols-*, row, etc. to Airframe recipes
@airframeui/require-field-error-ariaerroraf-field__error needs id; error inputs need aria-describedby
BeforeAfter
flex flex-col gap-4af-stack af-gap-lg
flex flex-wrap gap-2af-inline af-gap-sm
grid grid-cols-3 gap-6af-grid af-grid-3 af-gap-xl
d-flex flex-columnaf-stack
containeraf-container

Gap numbers map to the Airframe named scale (0 · xs · sm · md · lg · xl · 2xl · 3xl · 4xl), same as the migrate toolkit.

  • Checks string literals on class / className only (React JSX). Not yet: template literals, class:list, Vue/Svelte bindings, or Astro expression attributes.
  • Does not load classes.json — it does not validate unknown af-* class names. Prefer Airframe IntelliSense for autocomplete.
  • Tailwind/Bootstrap detectors ignore existing af-* tokens so legitimate Airframe markup is not flagged.