Skip to content
Test .attheme files for potentional issues.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
tests
.eslintrc.yaml
.gitignore
.npmignore
color.js
debug.js
eslint-config.yaml
index.js
package-lock.json
package.json
readme.md
rules.js

readme.md

attheme-rules

A module for testing .attheme's for potentional issues.

Installing

npm i attheme-rules

Using

import Attheme from "attheme-js";
import { testTheme } from "attheme-rules";

const theme = new Attheme(`divider=#ff00ff`);
const testResults = testTheme(theme);

console.log(...testResults);

The output is:

{ type: 'warning',
  name: 'purple-variables',
  variables: [ 'divider' ] }

Documentation

atthemeRules.testTheme(theme: Attheme): RuleResult[]

type Type = "warning" | "error";

interface RuleResult {
  type: Type;
  name: string;
  variables: string[];
}

Accepts a theme and runs the rules, returns an array of failed rules' results.

You can’t perform that action at this time.