@fedify/lint 2.0.0-dev.85 → 2.0.0-pr.559.5
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 +1 -1
- package/README.md +36 -31
- package/deno.json +7 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +5 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- deno-fmt-ignore-file -->
|
|
2
2
|
|
|
3
3
|
@fedify/lint: ESLint plugin for Fedify
|
|
4
|
-
|
|
4
|
+
======================================
|
|
5
5
|
|
|
6
6
|
[![JSR][JSR badge]][JSR]
|
|
7
7
|
[![npm][npm badge]][npm]
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
*This package is available since Fedify 2.0.0.*
|
|
11
11
|
|
|
12
|
-
This package provides [Deno Lint] and [ESLint] plugin with lint rules
|
|
13
|
-
for [Fedify] applications. It helps you catch common
|
|
14
|
-
best practices when building federated server apps with
|
|
12
|
+
This package provides [Deno Lint] and [ESLint] plugin with lint rules
|
|
13
|
+
specifically designed for [Fedify] applications. It helps you catch common
|
|
14
|
+
mistakes and enforce best practices when building federated server apps with
|
|
15
|
+
Fedify.
|
|
15
16
|
|
|
16
17
|
The plugin includes rules that check for:
|
|
17
18
|
|
|
@@ -21,8 +22,17 @@ The plugin includes rules that check for:
|
|
|
21
22
|
- Public key and assertion method requirements
|
|
22
23
|
- Collection filtering implementation
|
|
23
24
|
|
|
25
|
+
[JSR badge]: https://jsr.io/badges/@fedify/lint
|
|
26
|
+
[JSR]: https://jsr.io/@fedify/lint
|
|
27
|
+
[npm badge]: https://img.shields.io/npm/v/@fedify/lint?logo=npm
|
|
28
|
+
[npm]: https://www.npmjs.com/package/@fedify/lint
|
|
29
|
+
[@fedify@hollo.social badge]: https://fedi-badge.deno.dev/@fedify@hollo.social/followers.svg
|
|
30
|
+
[@fedify@hollo.social]: https://hollo.social/@fedify
|
|
31
|
+
[Deno Lint]: https://docs.deno.com/runtime/reference/lint_plugins/
|
|
32
|
+
[ESLint]: https://eslint.org/
|
|
33
|
+
[Fedify]: https://fedify.dev/
|
|
24
34
|
|
|
25
|
-
### Deno Lint
|
|
35
|
+
### Deno Lint configuration example
|
|
26
36
|
|
|
27
37
|
~~~~ typescript
|
|
28
38
|
// deno.json
|
|
@@ -42,7 +52,7 @@ The plugin includes rules that check for:
|
|
|
42
52
|
}
|
|
43
53
|
~~~~
|
|
44
54
|
|
|
45
|
-
### ESLint
|
|
55
|
+
### ESLint configuration example
|
|
46
56
|
|
|
47
57
|
~~~~ typescript
|
|
48
58
|
// eslint.config.ts
|
|
@@ -52,16 +62,6 @@ import fedifyLint from "@fedify/lint";
|
|
|
52
62
|
export default fedifyLint;
|
|
53
63
|
~~~~
|
|
54
64
|
|
|
55
|
-
[JSR]: https://jsr.io/@fedify/lint
|
|
56
|
-
[JSR badge]: https://jsr.io/badges/@fedify/lint
|
|
57
|
-
[npm]: https://www.npmjs.com/package/@fedify/lint
|
|
58
|
-
[npm badge]: https://img.shields.io/npm/v/@fedify/lint?logo=npm
|
|
59
|
-
[@fedify@hollo.social badge]: https://fedi-badge.deno.dev/@fedify@hollo.social/followers.svg
|
|
60
|
-
[@fedify@hollo.social]: https://hollo.social/@fedify
|
|
61
|
-
[Deno Lint]: https://docs.deno.com/runtime/reference/lint_plugins/
|
|
62
|
-
[ESLint]: https://eslint.org/
|
|
63
|
-
[Fedify]: https://fedify.dev/
|
|
64
|
-
|
|
65
65
|
|
|
66
66
|
Features
|
|
67
67
|
--------
|
|
@@ -69,7 +69,7 @@ Features
|
|
|
69
69
|
The `@fedify/lint` package provides comprehensive linting rules for Fedify
|
|
70
70
|
federation code:
|
|
71
71
|
|
|
72
|
-
### Actor
|
|
72
|
+
### Actor validation rules
|
|
73
73
|
|
|
74
74
|
- **`actor-id-required`**: Ensures all actors have an `id` property
|
|
75
75
|
- **`actor-id-mismatch`**: Validates that actor IDs match the expected URI
|
|
@@ -79,7 +79,7 @@ federation code:
|
|
|
79
79
|
- **`actor-assertion-method-required`**: Validates assertion methods for
|
|
80
80
|
Object Integrity Proofs
|
|
81
81
|
|
|
82
|
-
### Collection
|
|
82
|
+
### Collection property rules
|
|
83
83
|
|
|
84
84
|
- **`actor-inbox-property-required`**: Ensures inbox is defined when
|
|
85
85
|
`setInboxListeners` is set
|
|
@@ -112,7 +112,7 @@ federation code:
|
|
|
112
112
|
- **`actor-shared-inbox-property-mismatch`**: Validates sharedInbox URI from
|
|
113
113
|
`getInboxUri`
|
|
114
114
|
|
|
115
|
-
### Other
|
|
115
|
+
### Other rules
|
|
116
116
|
|
|
117
117
|
- **`collection-filtering-not-implemented`**: Warns about missing collection
|
|
118
118
|
filtering implementation (`setFollowersDispatcher` only for now)
|
|
@@ -147,9 +147,9 @@ bun add -D @fedify/lint
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
Usage (Deno Lint)
|
|
150
|
-
|
|
150
|
+
-----------------
|
|
151
151
|
|
|
152
|
-
### Basic
|
|
152
|
+
### Basic setup
|
|
153
153
|
|
|
154
154
|
Add the plugin to your *deno.json* configuration file:
|
|
155
155
|
|
|
@@ -163,7 +163,7 @@ Add the plugin to your *deno.json* configuration file:
|
|
|
163
163
|
|
|
164
164
|
By default, this enables all recommended rules.
|
|
165
165
|
|
|
166
|
-
### Custom
|
|
166
|
+
### Custom configuration
|
|
167
167
|
|
|
168
168
|
You can customize which rules to enable and their severity levels:
|
|
169
169
|
|
|
@@ -204,7 +204,7 @@ deno lint src/federation/
|
|
|
204
204
|
Usage (ESLint)
|
|
205
205
|
--------------
|
|
206
206
|
|
|
207
|
-
### Basic
|
|
207
|
+
### Basic setup
|
|
208
208
|
|
|
209
209
|
Add the plugin to your ESLint configuration file (e.g., *eslint.config.ts*
|
|
210
210
|
or *eslint.config.js*):
|
|
@@ -230,9 +230,9 @@ export default [
|
|
|
230
230
|
~~~~
|
|
231
231
|
|
|
232
232
|
The default configuration applies recommended rules to files that match
|
|
233
|
-
common federation-related patterns (e.g., *federation.ts*,
|
|
233
|
+
common federation-related patterns (e.g., *federation.ts*, _federation/\*.ts_).
|
|
234
234
|
|
|
235
|
-
### Custom
|
|
235
|
+
### Custom configuration
|
|
236
236
|
|
|
237
237
|
You can customize which files to lint and which rules to enable:
|
|
238
238
|
|
|
@@ -253,7 +253,7 @@ export default [{
|
|
|
253
253
|
}];
|
|
254
254
|
~~~~
|
|
255
255
|
|
|
256
|
-
### Using
|
|
256
|
+
### Using configurations
|
|
257
257
|
|
|
258
258
|
The plugin provides two preset configurations:
|
|
259
259
|
|
|
@@ -327,7 +327,7 @@ federation.setActorDispatcher(
|
|
|
327
327
|
~~~~
|
|
328
328
|
|
|
329
329
|
|
|
330
|
-
Running the
|
|
330
|
+
Running the linter
|
|
331
331
|
------------------
|
|
332
332
|
|
|
333
333
|
### Deno Lint
|
|
@@ -402,9 +402,14 @@ bunx eslint .
|
|
|
402
402
|
|
|
403
403
|
:::
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
|
|
406
|
+
See also
|
|
406
407
|
--------
|
|
407
408
|
|
|
408
|
-
- [Fedify Documentation]
|
|
409
|
-
- [ESLint Documentation]
|
|
410
|
-
- [Example Project]
|
|
409
|
+
- [Fedify Documentation]
|
|
410
|
+
- [ESLint Documentation]
|
|
411
|
+
- [Example Project]
|
|
412
|
+
|
|
413
|
+
[Fedify Documentation]: https://fedify.dev/
|
|
414
|
+
[ESLint Documentation]: https://eslint.org/
|
|
415
|
+
[Example Project]: https://github.com/fedify-dev/fedify/tree/main/examples/lint
|
package/deno.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/lint",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-pr.559.5+39b87b25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/mod.ts"
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"eslint": "npm:eslint@^9.0.0",
|
|
10
10
|
"estree": "npm:@types/estree@^1.0.8"
|
|
11
11
|
},
|
|
12
|
+
"publish": {
|
|
13
|
+
"exclude": [
|
|
14
|
+
"**/*.test.ts",
|
|
15
|
+
"tsdown.config.ts"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
12
18
|
"tasks": {
|
|
13
19
|
"test": "deno test --allow-env"
|
|
14
20
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -27,13 +27,14 @@ const __typescript_eslint_parser = __toESM(require("@typescript-eslint/parser"))
|
|
|
27
27
|
|
|
28
28
|
//#region deno.json
|
|
29
29
|
var name = "@fedify/lint";
|
|
30
|
-
var version = "2.0.0-
|
|
30
|
+
var version = "2.0.0-pr.559.5+39b87b25";
|
|
31
31
|
var license = "MIT";
|
|
32
32
|
var exports$1 = { ".": "./src/mod.ts" };
|
|
33
33
|
var imports = {
|
|
34
34
|
"eslint": "npm:eslint@^9.0.0",
|
|
35
35
|
"estree": "npm:@types/estree@^1.0.8"
|
|
36
36
|
};
|
|
37
|
+
var publish = { "exclude": ["**/*.test.ts", "tsdown.config.ts"] };
|
|
37
38
|
var tasks = { "test": "deno test --allow-env" };
|
|
38
39
|
var deno_default = {
|
|
39
40
|
name,
|
|
@@ -41,6 +42,7 @@ var deno_default = {
|
|
|
41
42
|
license,
|
|
42
43
|
exports: exports$1,
|
|
43
44
|
imports,
|
|
45
|
+
publish,
|
|
44
46
|
tasks
|
|
45
47
|
};
|
|
46
48
|
|
package/dist/index.js
CHANGED
|
@@ -3,13 +3,14 @@ import parser from "@typescript-eslint/parser";
|
|
|
3
3
|
|
|
4
4
|
//#region deno.json
|
|
5
5
|
var name = "@fedify/lint";
|
|
6
|
-
var version = "2.0.0-
|
|
6
|
+
var version = "2.0.0-pr.559.5+39b87b25";
|
|
7
7
|
var license = "MIT";
|
|
8
8
|
var exports = { ".": "./src/mod.ts" };
|
|
9
9
|
var imports = {
|
|
10
10
|
"eslint": "npm:eslint@^9.0.0",
|
|
11
11
|
"estree": "npm:@types/estree@^1.0.8"
|
|
12
12
|
};
|
|
13
|
+
var publish = { "exclude": ["**/*.test.ts", "tsdown.config.ts"] };
|
|
13
14
|
var tasks = { "test": "deno test --allow-env" };
|
|
14
15
|
var deno_default = {
|
|
15
16
|
name,
|
|
@@ -17,6 +18,7 @@ var deno_default = {
|
|
|
17
18
|
license,
|
|
18
19
|
exports,
|
|
19
20
|
imports,
|
|
21
|
+
publish,
|
|
20
22
|
tasks
|
|
21
23
|
};
|
|
22
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/lint",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-pr.559.5+39b87b25",
|
|
4
4
|
"description": "Fedify linting rules and plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Fedify",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"eslint": ">=9.0.0",
|
|
50
|
-
"@fedify/fedify": "^2.0.0-
|
|
50
|
+
"@fedify/fedify": "^2.0.0-pr.559.5+39b87b25"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"eslint": {
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
"typescript": "^5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
|
-
"build": "tsdown",
|
|
71
|
-
"
|
|
70
|
+
"build:self": "tsdown",
|
|
71
|
+
"build": "pnpm --filter @fedify/lint... run build:self",
|
|
72
|
+
"prepublish": "pnpm build",
|
|
72
73
|
"test": "node --experimental-transform-types --test 'src/tests/**/*.test.ts'"
|
|
73
74
|
}
|
|
74
75
|
}
|