larrylint 0.1.0 → 0.2.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/README.md +58 -19
- package/dist/_chunks/check.mjs +2 -34
- package/dist/_chunks/check2.mjs +1 -1
- package/dist/_chunks/init.mjs +15 -15
- package/dist/_chunks/package.mjs +2 -2
- package/dist/_chunks/preset.mjs +1619 -364
- package/dist/index.d.mts +26 -8
- package/package.json +14 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Linter } from "eslint";
|
|
2
2
|
interface LarrylintConfig {
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
sharedDomains?: string[];
|
|
3
|
+
/** Packages too heavy for the chunk every page loads, e.g. `leaflet`. */
|
|
4
|
+
heavyPackages?: string[];
|
|
7
5
|
}
|
|
8
6
|
/**
|
|
9
7
|
* Defines the larrylint configuration of a Laioutr app.
|
|
@@ -18,7 +16,7 @@ interface LarrylintConfig {
|
|
|
18
16
|
* import { defineLarrylintConfig } from 'larrylint'
|
|
19
17
|
*
|
|
20
18
|
* export default defineLarrylintConfig({
|
|
21
|
-
*
|
|
19
|
+
* heavyPackages: ['leaflet'],
|
|
22
20
|
* })
|
|
23
21
|
* ```
|
|
24
22
|
*/
|
|
@@ -30,9 +28,30 @@ export declare const plugin: {
|
|
|
30
28
|
};
|
|
31
29
|
rules: {
|
|
32
30
|
layers: import("eslint").Rule.RuleModule;
|
|
31
|
+
'heavy-imports': import("eslint").Rule.RuleModule;
|
|
32
|
+
'config-keys': import("eslint").Rule.RuleModule;
|
|
33
|
+
'public-config': import("eslint").Rule.RuleModule;
|
|
33
34
|
'orchestr-files': import("eslint").Rule.RuleModule;
|
|
34
|
-
|
|
35
|
+
'orchestr-cookies': import("eslint").Rule.RuleModule;
|
|
36
|
+
'handler-exports': import("eslint").Rule.RuleModule;
|
|
37
|
+
'middleware-files': import("eslint").Rule.RuleModule;
|
|
38
|
+
'initware-throws': import("eslint").Rule.RuleModule;
|
|
39
|
+
'token-namespaces': import("eslint").Rule.RuleModule;
|
|
40
|
+
'definition-folder': import("eslint").Rule.RuleModule;
|
|
41
|
+
'component-name': import("eslint").Rule.RuleModule;
|
|
42
|
+
'definition-description': import("eslint").Rule.RuleModule;
|
|
43
|
+
'single-root': import("eslint").Rule.RuleModule;
|
|
44
|
+
'slot-children': import("eslint").Rule.RuleModule;
|
|
45
|
+
'reserved-field-names': import("eslint").Rule.RuleModule;
|
|
46
|
+
'field-name-case': import("eslint").Rule.RuleModule;
|
|
47
|
+
'required-fields': import("eslint").Rule.RuleModule;
|
|
48
|
+
'unused-fields': import("eslint").Rule.RuleModule;
|
|
49
|
+
'dead-fallbacks': import("eslint").Rule.RuleModule;
|
|
35
50
|
'button-type': import("eslint").Rule.RuleModule;
|
|
51
|
+
'mutation-errors': import("eslint").Rule.RuleModule;
|
|
52
|
+
'resolve-result': import("eslint").Rule.RuleModule;
|
|
53
|
+
'hand-built-links': import("eslint").Rule.RuleModule;
|
|
54
|
+
'internal-anchors': import("eslint").Rule.RuleModule;
|
|
36
55
|
};
|
|
37
56
|
};
|
|
38
57
|
interface LarrylintOptions {
|
|
@@ -40,8 +59,7 @@ interface LarrylintOptions {
|
|
|
40
59
|
cwd?: string;
|
|
41
60
|
}
|
|
42
61
|
/**
|
|
43
|
-
* Creates the larrylint rules as
|
|
44
|
-
* so they run on top of the project's own config, e.g. `@nuxt/eslint-config`.
|
|
62
|
+
* Creates the larrylint rules as flat config, without parsers, to add to the project's own config.
|
|
45
63
|
*
|
|
46
64
|
* @param options Where to load the larrylint configuration from.
|
|
47
65
|
*
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "larrylint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"
|
|
6
|
-
"description": "Opinionated structure rules for Laioutr apps, as an ESLint preset and a CLI.",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"description": "Opinionated rules for Laioutr apps, as an ESLint preset and a CLI.",
|
|
7
6
|
"author": "Frederik Bußmann <frederik@bussmann.io>",
|
|
8
7
|
"license": "MIT",
|
|
9
|
-
"repository":
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "bussmann-io/larrylint"
|
|
11
|
+
},
|
|
10
12
|
"keywords": [
|
|
11
13
|
"laioutr",
|
|
12
14
|
"nuxt",
|
|
@@ -28,14 +30,6 @@
|
|
|
28
30
|
"engines": {
|
|
29
31
|
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
30
32
|
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build": "obuild",
|
|
33
|
-
"lint": "eslint .",
|
|
34
|
-
"lint:fix": "eslint . --fix",
|
|
35
|
-
"prepack": "pnpm run build",
|
|
36
|
-
"typecheck": "tsc --noEmit",
|
|
37
|
-
"test": "vitest run"
|
|
38
|
-
},
|
|
39
33
|
"dependencies": {
|
|
40
34
|
"@typescript-eslint/parser": "^8.70.1",
|
|
41
35
|
"c12": "^3.3.4",
|
|
@@ -55,5 +49,12 @@
|
|
|
55
49
|
"@types/node": "^24.13.6",
|
|
56
50
|
"obuild": "^0.4.40",
|
|
57
51
|
"vitest": "^5.0.1"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "obuild",
|
|
55
|
+
"lint": "eslint .",
|
|
56
|
+
"lint:fix": "eslint . --fix",
|
|
57
|
+
"typecheck": "tsc --noEmit",
|
|
58
|
+
"test": "vitest run"
|
|
58
59
|
}
|
|
59
|
-
}
|
|
60
|
+
}
|