Skip to content

Commit

Permalink
Create rule docs for toggle based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit88 committed Mar 28, 2024
1 parent 8e7f26f commit 7e593e2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
35 changes: 0 additions & 35 deletions packages/eslint-plugin/docs/rules/opticks.md

This file was deleted.

31 changes: 31 additions & 0 deletions packages/eslint-plugin/docs/rules/toggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Toggle (`opticks/toggle`)

Detects stale code from expired Opticks experiments, and other common mistakes related to toggles.

## Rule Details

This rule aims to to guide users of Opticks to correct use of the library, as well as indicate which experiments in the code should be considered for clean up.

### Options

This rule expects a configuration to be present in order to detect experiments to be cleaned up.

```json
{
"settings": {
"opticks": {
"experiments": {
"foo": "a",
"bar": null,
"baz": "b"
}
}
}
}
```

By convention, the value of an experiment of `null` means the experiment is still running, and a string value such as `a` or `b` means it's concluded to the side specified and the other sides can be cleaned up.

## When Not To Use It

If you don't use Opticks.

0 comments on commit 7e593e2

Please sign in to comment.