Configure rules
Add an.eslintrc.json file at the root of your repository. Without one, only
the base rules run.
.eslintrc.json
error when the code it
reports breaks at runtime, and at warn when it marks a convention.
Set a rule’s severity
List a rule underrules with the severity you want: "off", "warn" or
"error" — or the matching number 0, 1 or 2.
@qawolf/eslint-plugin-pom in extends
or plugins, the rule stays off and the editor says so.
Turn on any other ESLint rule
You are not limited to the rules QA Wolf enables by default. Name any core ESLint or typescript-eslint rule and it runs.@typescript-eslint/no-deprecated is a useful one to know about: it flags calls
to any API whose documentation marks it @deprecated, which includes the
Playwright methods that have been superseded — page.type(), for example.
Rules that need type information —
no-deprecated among them — report where
the types they need are loaded. In the editor that includes the types of the
packages your code imports. While an AI job runs, imports from npm packages
are not resolved, so a rule of this kind reports less there.Page object model rules
These come from@qawolf/eslint-plugin-pom,
which is bundled into QA Wolf — you do not install anything.
Each rule id is prefixed with @qawolf/pom-lint/ when you name it under
rules, which is also the prefix you see in the editor.
How a rule finds its subject
A rule checks either a directory or a kind of file, and the Where column below says which:src/pages/— the rule reads.tsfiles under your page-object directory and ignores everything else.- flow — the rule recognizes a flow from its code: a module that imports
flowfrom@qawolf/flows(any subpath) or default-exports aflow(...)call. The.flow.tsfilename is not the signal, so a flow kept elsewhere is still checked. - page object — the rule recognizes a class extending
BasePageObject,SubPageObjectorEntryPointPageObject, wherever the file lives. - anywhere — the rule checks every file.
Rules
The plugin’s README
explains each rule with examples of what it reports and what it expects
instead.
warn marks a convention rather than a defect. If your workspace is not ready
for one, set that rule to "off" in .eslintrc.json rather than disabling it
at each site.What QA Wolf reads
QA Wolf reads three keys from.eslintrc.json: extends, plugins and
rules. Anything else — settings, parserOptions, overrides, env — has
no effect, and the editor flags it so the file does not quietly lie about what
is running.
Two more limits worth knowing:
- Options are not supported. In
"no-redeclare": ["error", { … }]the severity applies and the options after it are dropped. @qawolf/eslint-plugin-pomis the only plugin supported at this time. Naming any other plugin inextendsorpluginshas no effect, and the editor tells you it was skipped. QA Wolf can support additional plugins — ask, and we will look at adding the one you need.
@qawolf/eslint-plugin-pom, @qawolf/pom, @qawolf/pom-lint, or
plugin:@qawolf/pom/recommended. They work in extends and in plugins
alike.
When the file cannot be read
If.eslintrc.json is not valid JSON, is not a JSON object, or is longer than
131,072 characters, QA Wolf ignores the whole file and enables none of the page
object model rules. The base rules still run, and the editor explains why the
file was skipped.