larrylint 0.0.1 → 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/LICENSE +21 -0
- package/README.md +219 -0
- package/dist/_chunks/check.mjs +44 -0
- package/dist/_chunks/check2.mjs +50 -0
- package/dist/_chunks/init.mjs +149 -0
- package/dist/_chunks/package.mjs +4 -0
- package/dist/_chunks/preset.mjs +2101 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +23 -0
- package/dist/index.d.mts +93 -0
- package/dist/index.mjs +2 -0
- package/package.json +58 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { description, version } from "../_chunks/package.mjs";
|
|
3
|
+
import { defineCommand, runMain } from "citty";
|
|
4
|
+
const cwdArgs = { cwd: {
|
|
5
|
+
type: "string",
|
|
6
|
+
description: "Folder of the Laioutr app.",
|
|
7
|
+
default: "."
|
|
8
|
+
} };
|
|
9
|
+
const main = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "larrylint",
|
|
12
|
+
version,
|
|
13
|
+
description
|
|
14
|
+
},
|
|
15
|
+
args: cwdArgs,
|
|
16
|
+
subCommands: {
|
|
17
|
+
check: () => import("../_chunks/check2.mjs").then((m) => m.default),
|
|
18
|
+
init: () => import("../_chunks/init.mjs").then((m) => m.default)
|
|
19
|
+
},
|
|
20
|
+
default: "check"
|
|
21
|
+
});
|
|
22
|
+
runMain(main);
|
|
23
|
+
export { cwdArgs };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Linter } from "eslint";
|
|
2
|
+
interface LarrylintConfig {
|
|
3
|
+
/** Domains every other domain may import. */
|
|
4
|
+
sharedDomains?: string[];
|
|
5
|
+
/** Packages too heavy for the chunk every page loads, e.g. `leaflet`. */
|
|
6
|
+
heavyPackages?: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Defines the larrylint configuration of a Laioutr app.
|
|
10
|
+
*
|
|
11
|
+
* @param config The configuration.
|
|
12
|
+
*
|
|
13
|
+
* @returns The configuration, typed.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // larrylint.config.ts
|
|
18
|
+
* import { defineLarrylintConfig } from 'larrylint'
|
|
19
|
+
*
|
|
20
|
+
* export default defineLarrylintConfig({
|
|
21
|
+
* sharedDomains: ['product'],
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function defineLarrylintConfig(config: LarrylintConfig): LarrylintConfig;
|
|
26
|
+
export declare const plugin: {
|
|
27
|
+
meta: {
|
|
28
|
+
name: string;
|
|
29
|
+
version: string;
|
|
30
|
+
};
|
|
31
|
+
rules: {
|
|
32
|
+
layers: import("eslint").Rule.RuleModule;
|
|
33
|
+
'known-folders': import("eslint").Rule.RuleModule;
|
|
34
|
+
'heavy-imports': import("eslint").Rule.RuleModule;
|
|
35
|
+
'config-keys': import("eslint").Rule.RuleModule;
|
|
36
|
+
'public-config': import("eslint").Rule.RuleModule;
|
|
37
|
+
'orchestr-files': import("eslint").Rule.RuleModule;
|
|
38
|
+
'orchestr-cookies': import("eslint").Rule.RuleModule;
|
|
39
|
+
'handler-domains': import("eslint").Rule.RuleModule;
|
|
40
|
+
'handler-exports': import("eslint").Rule.RuleModule;
|
|
41
|
+
'handler-context': import("eslint").Rule.RuleModule;
|
|
42
|
+
'resolver-undefined': import("eslint").Rule.RuleModule;
|
|
43
|
+
'resolver-passthrough': import("eslint").Rule.RuleModule;
|
|
44
|
+
'action-errors': import("eslint").Rule.RuleModule;
|
|
45
|
+
'middleware-files': import("eslint").Rule.RuleModule;
|
|
46
|
+
'initware-throws': import("eslint").Rule.RuleModule;
|
|
47
|
+
'orchestr-meta': import("eslint").Rule.RuleModule;
|
|
48
|
+
'token-namespaces': import("eslint").Rule.RuleModule;
|
|
49
|
+
'token-nullable': import("eslint").Rule.RuleModule;
|
|
50
|
+
'definition-folder': import("eslint").Rule.RuleModule;
|
|
51
|
+
'definition-prefix': import("eslint").Rule.RuleModule;
|
|
52
|
+
'component-name': import("eslint").Rule.RuleModule;
|
|
53
|
+
'definition-description': import("eslint").Rule.RuleModule;
|
|
54
|
+
'root-id': import("eslint").Rule.RuleModule;
|
|
55
|
+
'single-root': import("eslint").Rule.RuleModule;
|
|
56
|
+
'slot-children': import("eslint").Rule.RuleModule;
|
|
57
|
+
'reserved-field-names': import("eslint").Rule.RuleModule;
|
|
58
|
+
'field-name-case': import("eslint").Rule.RuleModule;
|
|
59
|
+
'required-fields': import("eslint").Rule.RuleModule;
|
|
60
|
+
'schema-groups': import("eslint").Rule.RuleModule;
|
|
61
|
+
'unused-fields': import("eslint").Rule.RuleModule;
|
|
62
|
+
'dead-fallbacks': import("eslint").Rule.RuleModule;
|
|
63
|
+
'button-type': import("eslint").Rule.RuleModule;
|
|
64
|
+
'ui-kit-tags': import("eslint").Rule.RuleModule;
|
|
65
|
+
'mutation-errors': import("eslint").Rule.RuleModule;
|
|
66
|
+
'orchestr-store': import("eslint").Rule.RuleModule;
|
|
67
|
+
'resolve-result': import("eslint").Rule.RuleModule;
|
|
68
|
+
'hand-built-links': import("eslint").Rule.RuleModule;
|
|
69
|
+
'internal-anchors': import("eslint").Rule.RuleModule;
|
|
70
|
+
money: import("eslint").Rule.RuleModule;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
interface LarrylintOptions {
|
|
74
|
+
/** Folder of the Laioutr app, defaults to the current working directory. */
|
|
75
|
+
cwd?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates the larrylint rules as flat config, without parsers, to add to the project's own config.
|
|
79
|
+
*
|
|
80
|
+
* @param options Where to load the larrylint configuration from.
|
|
81
|
+
*
|
|
82
|
+
* @returns The flat config items.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```js
|
|
86
|
+
* // eslint.config.mjs
|
|
87
|
+
* import larrylint from 'larrylint'
|
|
88
|
+
*
|
|
89
|
+
* export default createConfigForNuxt().append(larrylint())
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare function larrylint(options?: LarrylintOptions): Promise<Linter.Config[]>;
|
|
93
|
+
export { type LarrylintConfig, type LarrylintOptions, larrylint as default };
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,4 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "larrylint",
|
|
3
|
-
"
|
|
4
|
-
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"description": "Opinionated rules for Laioutr apps, as an ESLint preset and a CLI.",
|
|
6
|
+
"author": "Frederik Bußmann <frederik@bussmann.io>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "bussmann-io/larrylint"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"laioutr",
|
|
14
|
+
"nuxt",
|
|
15
|
+
"eslint",
|
|
16
|
+
"eslint-plugin",
|
|
17
|
+
"architecture",
|
|
18
|
+
"lint"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./dist/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"bin": {
|
|
25
|
+
"larrylint": "dist/cli/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@typescript-eslint/parser": "^8.70.1",
|
|
35
|
+
"c12": "^3.3.4",
|
|
36
|
+
"citty": "^0.2.2",
|
|
37
|
+
"consola": "^3.4.2",
|
|
38
|
+
"eslint": "^10.11.0",
|
|
39
|
+
"magicast": "^0.5.5",
|
|
40
|
+
"nypm": "^0.6.10",
|
|
41
|
+
"pathe": "^2.0.3",
|
|
42
|
+
"pkg-types": "^2.3.3",
|
|
43
|
+
"typescript": "^6.0.3",
|
|
44
|
+
"vue-eslint-parser": "^10.4.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@antfu/eslint-config": "^9.5.1",
|
|
48
|
+
"@types/estree": "^1.0.9",
|
|
49
|
+
"@types/node": "^24.13.6",
|
|
50
|
+
"obuild": "^0.4.40",
|
|
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"
|
|
59
|
+
}
|
|
60
|
+
}
|