@open-tomato/eslint-plugin 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,10 +63,26 @@ A string, a template literal or any other expression is refused. The `cva`
|
|
|
63
63
|
flavor of the config turns it on outside templates, pages, stories and
|
|
64
64
|
tests.
|
|
65
65
|
|
|
66
|
+
## Turning a rule off for one line
|
|
67
|
+
|
|
68
|
+
A disable comment names the rule with its prefix, and says why after
|
|
69
|
+
`--`:
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
export function LegacyGrid() {
|
|
73
|
+
// eslint-disable-next-line @open-tomato/cva-only-classname -- markup kept from the old site
|
|
74
|
+
return <div className="legacy-grid" />;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The rules used to live under the prefixes `ar/`, `house/`, `ot/` and
|
|
79
|
+
`d2c/`. A comment that still names one refers to a rule that no longer
|
|
80
|
+
exists, and ESLint reports it, so rename each to `@open-tomato/`.
|
|
81
|
+
|
|
66
82
|
## Exports
|
|
67
83
|
|
|
68
84
|
| Path | What it holds |
|
|
69
85
|
| --- | --- |
|
|
70
86
|
| `.` | the plugin, and `PLUGIN_KEY` |
|
|
71
|
-
| `./rules/no-unsafe-unicode` | the rule, and `findUnsafeUnicode(text)` |
|
|
87
|
+
| `./rules/no-unsafe-unicode` | the rule, and `findUnsafeUnicode(text)`, which answers `{ index, code, kind }` for each character |
|
|
72
88
|
| `./rules/cva-only-classname` | the rule |
|
package/package.json
CHANGED