Write down your own decisions
Sometimes a project has a good reason to depart from a rule or a guideline. An internal cleanup tool may make Delete the default after a typed confirmation, or a team may use the same Submit button everywhere. Justified lets you write that down in a file called justified.json. A departure that is written down, with a reason, is a decision your team can see, question and look at again. Switching a check off and saying nothing is not.
An override is your project’s decision, not ours. Justified shows it and does not judge it, and it does not change the rule.
Where the file goes
Section titled “Where the file goes”Put justified.json at the root of your project, committed beside package.json. The ESLint plugin looks for the nearest one from your config’s folder upwards, so in a monorepo it can sit at the root. The agent skill and the review skill read it from the project’s root.
An example
Section titled “An example”{ "$schema": "https://blackwoodblake.com/design-system/schema/justified.schema.json", "justified": "0.5.0", "overrides": [ { "id": "DLG-004", "action": "off", "reason": "In the cleanup tool, Delete is the default because the dialog opens only after a typed confirmation.", "files": ["src/cleanup/**"], "rule_version": "1.0.2", "review_by": "2027-03-01" } ]}The $schema line gives your editor hints and checks the file as you type. The schema is served at blackwoodblake.com/design-system/schema/justified.schema.json.
The fields
Section titled “The fields”| Field | What it is |
|---|---|
overrides |
The list of decisions. Required. |
justified |
The Justified version you wrote the file for, such as 0.5.0. Informational. |
id |
One exact id, such as DLG-004. Required. No wildcards or families: FRM-004 does not cover FRM-004a. |
action |
What you decided. Required. See below. |
reason |
Your own words for the decision. Required, at least 20 characters. |
files |
Globs, relative to the file, for where the decision applies. Without it, it applies to the whole project. |
rule_version |
The version of the rule you wrote the override against, such as 1.0.2. |
review_by |
A date to look at the decision again. A reminder, not an end date: the override still applies after it. ESLint ignores it, so its results never depend on the date. |
owner |
Who made the decision. |
lint_rules |
Limits off and guideline to some of the id’s ESLint rules, for example justified/no-destructive-autofocus. |
action is one of three:
- off: your project does not follow the text, in the files you list, or everywhere if you list none.
- guideline: treat a rule as a guideline. It is followed where your project has no convention of its own, and your project’s way stands where it has one.
- note: the text applies in full. Your reason is context for the people who read the file.
Rules that WCAG requires
Section titled “Rules that WCAG requires”guideline cannot be used on a rule that WCAG requires. Use off or note. An entry that does it is invalid and covers nothing. You can still turn off a rule that WCAG requires, but that involves the WCAG 2.2 criterion behind it. The ESLint plugin says so once when it loads the config, and the agent and the review name the criterion by number and name.
How each part uses it
Section titled “How each part uses it”ESLint
Section titled “ESLint”Use fromProject instead of recommended. It gives you the same checks, with your overrides applied:
import justified from "@blackwoodblake/justified-eslint";
export default [ // ...your parser config ...justified.fromProject(import.meta.dirname, { files: ["**/*.{jsx,tsx}"] }),];Without a justified.json you get plain recommended. With strict: true, an id that Justified does not have throws an error. Otherwise it is reported as a warning and ignored.
The agent skill
Section titled “The agent skill”The agent reads the file before it builds or changes interface code. It does not apply an override silently: once per task, it says which override shaped the work, by id, with your reason. It adds, widens or removes an override only when you ask. If a rule gets in its way, it fixes the code or asks you. It does not write an override to make a check pass. How to set up the agent
The review
Section titled “The review”/justified-review reports the overrides that applied to the files it reviewed under their own heading, Overridden by the project, before the rules. Each one shows the id, where it applies, the action, your reason as you wrote it and how many files were not checked. For a rule that WCAG requires, it also names the criterion. A second heading, Overrides to look at, lists the ones that need attention, as described next.
When a rule changes
Section titled “When a rule changes”A rule has a version. A patch or minor change leaves what the rule asks as it was. A major change means that what the rule asks, or its level or verdict, changed.
When the rule’s current major version is above your rule_version, the agent and the review tell you the rule has changed since you wrote the override. The override stays in force until you decide again, and the linter flags it too. Read the rule, then either update rule_version or change the decision. The review also lists an override whose review_by date has passed.
An id that Justified does not have covers nothing. The linter warns and ignores it, and the agent and the review tell you.
Justified is an independent project. It is not affiliated with, sponsored or endorsed by the organisations whose guidance it cites. Read the full statement.
Apple is a trademark of Apple Inc., registered in the U.S. and other countries and regions.