@cobalt-ui/lint-a11y
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@cobalt-ui/lint-a11y

Lint your token schema for a11y errors. Can check your color + typography tokens for contrast, and more.

Install the plugin:

npm i -D @cobalt-ui/lint-a11y

Then add to your tokens.config.js file:

// tokens.config.js
import a11y from "@cobalt-ui/lint-a11y";

/** @type {import("@cobalt-ui/core").Config} */
export default {
  tokens: "./tokens.json",
  outDir: "./tokens/",
  plugins: [a11y()],
  lint: {
    // checks
  },
};

Refer to the documentation for a list of all rules and options.

Package Sidebar

Install

npm i @cobalt-ui/lint-a11y

Weekly Downloads

7

Version

0.0.3

License

MIT

Unpacked Size

76.8 kB

Total Files

19

Last publish

Collaborators

  • drewpowers