@consent-kit/eslint-plugin 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +20 -2
- package/dist/index.d.ts +59 -0
- package/dist/index.js +273 -0
- package/package.json +57 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 consent-kit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @consent-kit/eslint-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One ESLint rule, `@consent-kit/no-raw-storage`, which reports raw browser storage and beacon APIs (`localStorage`, `document.cookie`, `navigator.sendBeacon` and others) in first-party code and points at the storage facade that `consent-kit build` generates.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install --save-dev @consent-kit/eslint-plugin
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
// eslint.config.js
|
|
11
|
+
import consentKit from '@consent-kit/eslint-plugin';
|
|
12
|
+
|
|
13
|
+
export default [consentKit.configs.recommended];
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The `recommended` config registers the plugin under the `@consent-kit` namespace and sets `@consent-kit/no-raw-storage` to `error`. Needs ESLint 9 or later, flat config.
|
|
17
|
+
|
|
18
|
+
- [ESLint plugin reference](https://consent-kit.com/docs/manual/reference/eslint-plugin/)
|
|
19
|
+
- [Migrate raw storage calls to the facade](https://consent-kit.com/docs/manual/guides/migrate-to-the-storage-facade/)
|
|
20
|
+
|
|
21
|
+
MIT licensed.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ESLint, Linter } from 'eslint';
|
|
2
|
+
|
|
3
|
+
declare const RAW_APIS: readonly ["document.cookie", "localStorage", "sessionStorage", "cookieStore", "indexedDB.open", "navigator.sendBeacon"];
|
|
4
|
+
type RawApi = (typeof RAW_APIS)[number];
|
|
5
|
+
interface NoRawStorageOptions {
|
|
6
|
+
/** Raw APIs to permit. */
|
|
7
|
+
allow?: RawApi[];
|
|
8
|
+
/** Import path of the project's facade module, shown in messages. */
|
|
9
|
+
facadeModule?: string;
|
|
10
|
+
/** Name of the facade object, used in messages and suggestions. */
|
|
11
|
+
facadeName?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface DisableComment {
|
|
15
|
+
/** `eslint-disable` (block, until re-enabled), `eslint-disable-line` or `eslint-disable-next-line`. */
|
|
16
|
+
directive: 'eslint-disable' | 'eslint-disable-line' | 'eslint-disable-next-line';
|
|
17
|
+
/** 1-based line on which the comment starts. */
|
|
18
|
+
line: number;
|
|
19
|
+
/** Every rule the comment names, as written. */
|
|
20
|
+
rules: string[];
|
|
21
|
+
/** The text after `--`, trimmed. Absent when there is none. */
|
|
22
|
+
reason?: string;
|
|
23
|
+
missingReason: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const RULE_ID = "@consent-kit/no-raw-storage";
|
|
26
|
+
/**
|
|
27
|
+
* Every `eslint-disable*` comment in `sourceText` that names the rule, for the audit:
|
|
28
|
+
* the spec requires each exception to carry a reason (`-- why`), and reports them all.
|
|
29
|
+
*
|
|
30
|
+
* Follows ESLint's own directive grammar: `eslint-disable` only counts in a block
|
|
31
|
+
* comment, the `-line` forms in either kind, rules are comma-separated, and the
|
|
32
|
+
* reason is whatever follows the first ` -- `.
|
|
33
|
+
*
|
|
34
|
+
* Not covered: a bare `eslint-disable` that names no rules (it silences this rule
|
|
35
|
+
* too, but is not specific to it), and config-level `rules: { ...: 'off' }`.
|
|
36
|
+
*
|
|
37
|
+
* Comments are found with a small scanner that skips string and template literals,
|
|
38
|
+
* not a full parser, so it works on any JS/TS/JSX dialect without a parser dependency.
|
|
39
|
+
* It does not recognise regex literals: one containing a quote or `//` can hide or
|
|
40
|
+
* fake a comment on the same line.
|
|
41
|
+
*/
|
|
42
|
+
declare function findDisableComments(sourceText: string, ruleId?: string): DisableComment[];
|
|
43
|
+
|
|
44
|
+
declare const rules: NonNullable<ESLint.Plugin['rules']>;
|
|
45
|
+
declare const plugin: ESLint.Plugin & {
|
|
46
|
+
configs: {
|
|
47
|
+
recommended: Linter.Config;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Flat config enabling the plugin under the `@consent-kit` namespace:
|
|
52
|
+
*
|
|
53
|
+
* import consentKit from '@consent-kit/eslint-plugin';
|
|
54
|
+
* export default [consentKit.configs.recommended];
|
|
55
|
+
*/
|
|
56
|
+
declare const recommended: Linter.Config;
|
|
57
|
+
|
|
58
|
+
export { RAW_APIS, RULE_ID, plugin as default, findDisableComments, recommended, rules };
|
|
59
|
+
export type { DisableComment, NoRawStorageOptions, RawApi };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
// src/no-raw-storage.ts
|
|
2
|
+
var RAW_APIS = ["document.cookie", "localStorage", "sessionStorage", "cookieStore", "indexedDB.open", "navigator.sendBeacon"];
|
|
3
|
+
var GLOBAL_OBJECTS = /* @__PURE__ */ new Set(["window", "globalThis", "self"]);
|
|
4
|
+
var STORES = /* @__PURE__ */ new Set(["localStorage", "sessionStorage", "cookieStore"]);
|
|
5
|
+
var MEMBERS = { document: "cookie", indexedDB: "open", navigator: "sendBeacon" };
|
|
6
|
+
var TRACKED = /* @__PURE__ */ new Set([...GLOBAL_OBJECTS, ...STORES, ...Object.keys(MEMBERS)]);
|
|
7
|
+
var TRANSPARENT = /* @__PURE__ */ new Set(["TSAsExpression", "TSNonNullExpression", "TSTypeAssertion", "TSSatisfiesExpression", "ChainExpression"]);
|
|
8
|
+
var WEB_STORAGE_METHODS = {
|
|
9
|
+
getItem: { method: "get", args: 1, params: "key" },
|
|
10
|
+
setItem: { method: "set", args: 2, params: "key, value" },
|
|
11
|
+
removeItem: { method: "remove", args: 1, params: "key" }
|
|
12
|
+
};
|
|
13
|
+
var COOKIE_STORE_METHODS = { get: "get(name)", getAll: "get(name)", set: "set(name, value)", delete: "remove(name)" };
|
|
14
|
+
var noRawStorage = {
|
|
15
|
+
meta: {
|
|
16
|
+
type: "problem",
|
|
17
|
+
hasSuggestions: true,
|
|
18
|
+
docs: {
|
|
19
|
+
description: "Forbid raw browser storage and beacon APIs in first-party code; use the generated consent-kit storage facade."
|
|
20
|
+
},
|
|
21
|
+
schema: [
|
|
22
|
+
{
|
|
23
|
+
type: "object",
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
properties: {
|
|
26
|
+
allow: { type: "array", uniqueItems: true, items: { enum: [...RAW_APIS] } },
|
|
27
|
+
facadeModule: { type: "string" },
|
|
28
|
+
facadeName: { type: "string" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
messages: {
|
|
33
|
+
useFacade: "Raw `{{api}}` bypasses the consent registry. Use `{{replacement}}` from '{{module}}' instead.",
|
|
34
|
+
noFacade: "Raw `{{api}}` bypasses the consent registry and has no facade equivalent yet. Check consent for the declared endpoint first, then disable this rule for the line with a reason: `// eslint-disable-next-line {{ruleId}} -- <reason>`.",
|
|
35
|
+
suggestFacade: "Replace with `{{replacement}}` (values are JSON-serialised and writes return a result instead of throwing)."
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
create(context) {
|
|
39
|
+
const options = context.options[0] ?? {};
|
|
40
|
+
const allowed = new Set(options.allow ?? []);
|
|
41
|
+
const facadeModule = options.facadeModule ?? "./storage.gen";
|
|
42
|
+
const facade = options.facadeName ?? "storage";
|
|
43
|
+
const sourceCode = context.sourceCode;
|
|
44
|
+
function report(api, node, replacement, fixTo) {
|
|
45
|
+
if (allowed.has(api)) return;
|
|
46
|
+
const target = node;
|
|
47
|
+
if (replacement === void 0) {
|
|
48
|
+
context.report({ node: target, messageId: "noFacade", data: { api, ruleId: context.id } });
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
context.report({
|
|
52
|
+
node: target,
|
|
53
|
+
messageId: "useFacade",
|
|
54
|
+
data: { api, replacement, module: facadeModule },
|
|
55
|
+
suggest: fixTo === void 0 ? [] : [{ messageId: "suggestFacade", data: { replacement: fixTo }, fix: (fixer) => fixer.replaceText(target, fixTo) }]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function reportStore(name, node) {
|
|
59
|
+
const access = memberOf(node);
|
|
60
|
+
const call = access && callOf(access.member);
|
|
61
|
+
if (name === "cookieStore") {
|
|
62
|
+
const method = access && COOKIE_STORE_METHODS[access.property];
|
|
63
|
+
report("cookieStore", call && method ? call : access?.member ?? node, `${facade}.cookies${method ? `.${method}` : ""}`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const area = name === "localStorage" ? "local" : "session";
|
|
67
|
+
const known = access && Object.hasOwn(WEB_STORAGE_METHODS, access.property) ? WEB_STORAGE_METHODS[access.property] : void 0;
|
|
68
|
+
if (!known) {
|
|
69
|
+
report(name, access?.member ?? node, `${facade}.${area}`);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const replacement = `${facade}.${area}.${known.method}(${known.params})`;
|
|
73
|
+
const args = call?.arguments ?? [];
|
|
74
|
+
if (!call || args.length !== known.args || args.some((a) => a.type === "SpreadElement")) {
|
|
75
|
+
report(name, call ?? access.member, replacement);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const argText = args.map((a) => sourceCode.getText(a)).join(", ");
|
|
79
|
+
report(name, call, replacement, `${facade}.${area}.${known.method}(${argText})`);
|
|
80
|
+
}
|
|
81
|
+
function reportMember(host, member) {
|
|
82
|
+
if (host === "document") {
|
|
83
|
+
const outer = unwrap(member);
|
|
84
|
+
const parent = outer.parent;
|
|
85
|
+
const written = parent?.type === "AssignmentExpression" && parent.left === outer || parent?.type === "UpdateExpression" && parent.argument === outer;
|
|
86
|
+
report("document.cookie", member, written ? `${facade}.cookies.set(name, value)` : `${facade}.cookies.get(name)`);
|
|
87
|
+
} else if (host === "indexedDB") {
|
|
88
|
+
report("indexedDB.open", callOf(member) ?? member, `${facade}.openDatabase(name)`);
|
|
89
|
+
} else {
|
|
90
|
+
report("navigator.sendBeacon", callOf(member) ?? member, void 0);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function visit(name, node) {
|
|
94
|
+
if (STORES.has(name)) {
|
|
95
|
+
reportStore(name, node);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const isGlobalObject = GLOBAL_OBJECTS.has(name);
|
|
99
|
+
if (!isGlobalObject && !Object.hasOwn(MEMBERS, name)) return;
|
|
100
|
+
const access = memberOf(node);
|
|
101
|
+
if (access) {
|
|
102
|
+
if (isGlobalObject) visit(access.property, access.member);
|
|
103
|
+
else if (access.property === MEMBERS[name]) reportMember(name, access.member);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
for (const property of destructuredFrom(node)) {
|
|
107
|
+
const key = staticKey(property);
|
|
108
|
+
if (key === void 0) continue;
|
|
109
|
+
if (isGlobalObject) {
|
|
110
|
+
if (STORES.has(key)) report(key, property, `${facade}.${key === "cookieStore" ? "cookies" : key === "localStorage" ? "local" : "session"}`);
|
|
111
|
+
} else if (key === MEMBERS[name]) {
|
|
112
|
+
reportMember(name, property);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
Program(program) {
|
|
118
|
+
const globalScope = sourceCode.getScope(program);
|
|
119
|
+
const references = /* @__PURE__ */ new Set();
|
|
120
|
+
for (const name of TRACKED) {
|
|
121
|
+
const variable = globalScope.set.get(name);
|
|
122
|
+
if (variable && variable.defs.length === 0) for (const reference of variable.references) references.add(reference);
|
|
123
|
+
}
|
|
124
|
+
for (const reference of globalScope.through) {
|
|
125
|
+
if (TRACKED.has(reference.identifier.name)) references.add(reference);
|
|
126
|
+
}
|
|
127
|
+
for (const reference of references) {
|
|
128
|
+
const identifier = reference.identifier;
|
|
129
|
+
if (identifier.parent?.type === "TSTypeQuery") continue;
|
|
130
|
+
visit(identifier.name, identifier);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
function unwrap(node) {
|
|
137
|
+
let current = node;
|
|
138
|
+
while (current.parent && TRANSPARENT.has(current.parent.type) && current.parent.expression === current) current = current.parent;
|
|
139
|
+
return current;
|
|
140
|
+
}
|
|
141
|
+
function memberOf(node) {
|
|
142
|
+
const object = unwrap(node);
|
|
143
|
+
const parent = object.parent;
|
|
144
|
+
if (parent?.type !== "MemberExpression" || parent.object !== object) return void 0;
|
|
145
|
+
const property = parent.computed ? literalString(parent.property) : parent.property.type === "Identifier" ? parent.property.name : void 0;
|
|
146
|
+
return property === void 0 ? void 0 : { member: parent, property };
|
|
147
|
+
}
|
|
148
|
+
function callOf(member) {
|
|
149
|
+
const callee = unwrap(member);
|
|
150
|
+
const parent = callee.parent;
|
|
151
|
+
return parent?.type === "CallExpression" && parent.callee === callee ? parent : void 0;
|
|
152
|
+
}
|
|
153
|
+
function destructuredFrom(node) {
|
|
154
|
+
const value = unwrap(node);
|
|
155
|
+
const parent = value.parent;
|
|
156
|
+
const pattern = parent?.type === "VariableDeclarator" && parent.init === value ? parent.id : parent?.type === "AssignmentExpression" && parent.right === value ? parent.left : void 0;
|
|
157
|
+
return pattern?.type === "ObjectPattern" ? pattern.properties.filter((p) => p.type === "Property") : [];
|
|
158
|
+
}
|
|
159
|
+
function staticKey(property) {
|
|
160
|
+
return property.computed ? literalString(property.key) : property.key.type === "Identifier" ? property.key.name : literalString(property.key);
|
|
161
|
+
}
|
|
162
|
+
function literalString(node) {
|
|
163
|
+
if (node.type === "Literal" && typeof node.value === "string") return node.value;
|
|
164
|
+
if (node.type === "TemplateLiteral" && node.expressions.length === 0) return node.quasis[0].value.cooked;
|
|
165
|
+
return void 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// package.json
|
|
169
|
+
var package_default = {
|
|
170
|
+
name: "@consent-kit/eslint-plugin",
|
|
171
|
+
version: "0.1.0"};
|
|
172
|
+
|
|
173
|
+
// src/disable-comments.ts
|
|
174
|
+
var RULE_ID = "@consent-kit/no-raw-storage";
|
|
175
|
+
var DIRECTIVE = /^\s*(eslint-disable(?:-next-line|-line)?)(?=\s|$)([\s\S]*)$/;
|
|
176
|
+
var REASON_SEPARATOR = /\s-{2,}\s/;
|
|
177
|
+
function findDisableComments(sourceText, ruleId = RULE_ID) {
|
|
178
|
+
const found = [];
|
|
179
|
+
for (const comment of comments(sourceText)) {
|
|
180
|
+
const match = DIRECTIVE.exec(comment.text);
|
|
181
|
+
if (!match) continue;
|
|
182
|
+
const directive = match[1];
|
|
183
|
+
if (directive === "eslint-disable" && !comment.block) continue;
|
|
184
|
+
const rest = match[2];
|
|
185
|
+
const separator = REASON_SEPARATOR.exec(` ${rest} `);
|
|
186
|
+
const ruleList = separator ? ` ${rest} `.slice(0, separator.index) : rest;
|
|
187
|
+
const rules2 = ruleList.split(",").map((rule) => rule.trim()).filter((rule) => rule !== "");
|
|
188
|
+
if (!rules2.includes(ruleId)) continue;
|
|
189
|
+
const reason = separator ? ` ${rest} `.slice(separator.index + separator[0].length).trim() : "";
|
|
190
|
+
found.push({ directive, line: comment.line, rules: rules2, ...reason !== "" ? { reason } : {}, missingReason: reason === "" });
|
|
191
|
+
}
|
|
192
|
+
return found;
|
|
193
|
+
}
|
|
194
|
+
function* comments(text) {
|
|
195
|
+
let line = 1;
|
|
196
|
+
let i = 0;
|
|
197
|
+
const templates = [];
|
|
198
|
+
const skipTemplateText = () => {
|
|
199
|
+
while (i < text.length) {
|
|
200
|
+
const c = text[i];
|
|
201
|
+
if (c === "\\") i += 2;
|
|
202
|
+
else if (c === "`") {
|
|
203
|
+
i++;
|
|
204
|
+
return;
|
|
205
|
+
} else if (c === "$" && text[i + 1] === "{") {
|
|
206
|
+
i += 2;
|
|
207
|
+
templates.push(0);
|
|
208
|
+
return;
|
|
209
|
+
} else {
|
|
210
|
+
if (c === "\n") line++;
|
|
211
|
+
i++;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
while (i < text.length) {
|
|
216
|
+
const c = text[i];
|
|
217
|
+
const next = text[i + 1];
|
|
218
|
+
if (c === "\n") {
|
|
219
|
+
line++;
|
|
220
|
+
i++;
|
|
221
|
+
} else if (c === "/" && next === "/") {
|
|
222
|
+
const end = text.indexOf("\n", i);
|
|
223
|
+
const stop = end === -1 ? text.length : end;
|
|
224
|
+
yield { text: text.slice(i + 2, stop), line, block: false };
|
|
225
|
+
i = stop;
|
|
226
|
+
} else if (c === "/" && next === "*") {
|
|
227
|
+
const end = text.indexOf("*/", i + 2);
|
|
228
|
+
const stop = end === -1 ? text.length : end;
|
|
229
|
+
const body = text.slice(i + 2, stop);
|
|
230
|
+
yield { text: body, line, block: true };
|
|
231
|
+
line += body.split("\n").length - 1;
|
|
232
|
+
i = stop + 2;
|
|
233
|
+
} else if (c === '"' || c === "'") {
|
|
234
|
+
i++;
|
|
235
|
+
while (i < text.length && text[i] !== c && text[i] !== "\n") i += text[i] === "\\" ? 2 : 1;
|
|
236
|
+
if (text[i] === c) i++;
|
|
237
|
+
} else if (c === "`") {
|
|
238
|
+
i++;
|
|
239
|
+
skipTemplateText();
|
|
240
|
+
} else if (templates.length > 0 && c === "{") {
|
|
241
|
+
templates[templates.length - 1]++;
|
|
242
|
+
i++;
|
|
243
|
+
} else if (templates.length > 0 && c === "}") {
|
|
244
|
+
if (templates[templates.length - 1] === 0) {
|
|
245
|
+
templates.pop();
|
|
246
|
+
i++;
|
|
247
|
+
skipTemplateText();
|
|
248
|
+
} else {
|
|
249
|
+
templates[templates.length - 1]--;
|
|
250
|
+
i++;
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
i++;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// src/index.ts
|
|
259
|
+
var rules = { "no-raw-storage": noRawStorage };
|
|
260
|
+
var plugin = {
|
|
261
|
+
meta: { name: package_default.name, version: package_default.version },
|
|
262
|
+
rules,
|
|
263
|
+
configs: { recommended: {} }
|
|
264
|
+
};
|
|
265
|
+
var recommended = {
|
|
266
|
+
name: "@consent-kit/recommended",
|
|
267
|
+
plugins: { "@consent-kit": plugin },
|
|
268
|
+
rules: { "@consent-kit/no-raw-storage": "error" }
|
|
269
|
+
};
|
|
270
|
+
plugin.configs.recommended = recommended;
|
|
271
|
+
var index_default = plugin;
|
|
272
|
+
|
|
273
|
+
export { RAW_APIS, RULE_ID, index_default as default, findDisableComments, recommended, rules };
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consent-kit/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ESLint rule that forbids raw browser storage APIs in favour of the consent-kit storage facade.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"consent-kit",
|
|
7
|
+
"consent",
|
|
8
|
+
"privacy",
|
|
9
|
+
"gdpr",
|
|
10
|
+
"eprivacy",
|
|
11
|
+
"cookie-consent",
|
|
12
|
+
"eslint",
|
|
13
|
+
"eslintplugin",
|
|
14
|
+
"eslint-plugin",
|
|
15
|
+
"localstorage",
|
|
16
|
+
"cookies"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://consent-kit.com",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/pavelpascari/consent-kit/issues"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/pavelpascari/consent-kit.git",
|
|
25
|
+
"directory": "packages/eslint-plugin"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"import": "./dist/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./package.json": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"eslint": ">=9"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"eslint": "^9.0.0",
|
|
53
|
+
"@typescript-eslint/parser": "^8.0.0"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsup"
|
|
57
|
+
},
|
|
58
|
+
"main": "./dist/index.js",
|
|
59
|
+
"types": "./dist/index.d.ts"
|
|
6
60
|
}
|