Package Exports
- @cobalt-ui/lint-a11y
- @cobalt-ui/lint-a11y/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cobalt-ui/lint-a11y) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@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.