@ripple-ts/eslint-parser 0.2.153
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 +121 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dominic Gannaway
|
|
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
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# @ripple-ts/eslint-parser
|
|
2
|
+
|
|
3
|
+
ESLint parser for Ripple (.ripple files). This parser enables ESLint to understand and lint `.ripple` files by leveraging Ripple's built-in compiler.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add --save-dev '@ripple-ts/eslint-parser' ripple
|
|
9
|
+
# or
|
|
10
|
+
npm install --save-dev '@ripple-ts/eslint-parser' ripple
|
|
11
|
+
# or
|
|
12
|
+
yarn add --dev '@ripple-ts/eslint-parser' ripple
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Note:** This parser requires `ripple` as a peer dependency.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Flat Config (ESLint 9+)
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
// eslint.config.js
|
|
23
|
+
import rippleParser from '@ripple-ts/eslint-parser';
|
|
24
|
+
import ripplePlugin from '@ripple-ts/eslint-plugin';
|
|
25
|
+
|
|
26
|
+
export default [
|
|
27
|
+
{
|
|
28
|
+
files: ['**/*.ripple'],
|
|
29
|
+
languageOptions: {
|
|
30
|
+
parser: rippleParser,
|
|
31
|
+
},
|
|
32
|
+
plugins: {
|
|
33
|
+
ripple: ripplePlugin,
|
|
34
|
+
},
|
|
35
|
+
rules: {
|
|
36
|
+
...ripplePlugin.configs.recommended.rules,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Legacy Config (.eslintrc)
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"overrides": [
|
|
47
|
+
{
|
|
48
|
+
"files": ["*.ripple"],
|
|
49
|
+
"parser": "@ripple-ts/eslint-parser",
|
|
50
|
+
"plugins": ["ripple"],
|
|
51
|
+
"extends": ["plugin:ripple/recommended"]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## How It Works
|
|
58
|
+
|
|
59
|
+
This parser uses Ripple's compiler (`ripple/compiler`) to parse `.ripple` files into an ESTree-compatible AST that ESLint can analyze. The Ripple compiler already outputs ESTree-compliant ASTs, making integration straightforward.
|
|
60
|
+
|
|
61
|
+
The parser:
|
|
62
|
+
|
|
63
|
+
1. Loads the Ripple compiler
|
|
64
|
+
2. Parses the `.ripple` source code
|
|
65
|
+
3. Returns the ESTree AST to ESLint
|
|
66
|
+
4. Allows ESLint rules to analyze Ripple-specific patterns
|
|
67
|
+
|
|
68
|
+
## Supported Syntax
|
|
69
|
+
|
|
70
|
+
The parser supports all Ripple syntax including:
|
|
71
|
+
|
|
72
|
+
- `component` declarations
|
|
73
|
+
- `track()` reactive values
|
|
74
|
+
- `@` unboxing operator
|
|
75
|
+
- `#[]` and `#{}` reactive collections
|
|
76
|
+
- JSX-like templating inside components
|
|
77
|
+
- All standard JavaScript/TypeScript syntax
|
|
78
|
+
|
|
79
|
+
## Example
|
|
80
|
+
|
|
81
|
+
Given a `.ripple` file:
|
|
82
|
+
|
|
83
|
+
```ripple
|
|
84
|
+
import { track } from 'ripple';
|
|
85
|
+
|
|
86
|
+
export component Counter() {
|
|
87
|
+
let count = track(0);
|
|
88
|
+
|
|
89
|
+
<div>
|
|
90
|
+
<button onClick={() => @count++}>Increment</button>
|
|
91
|
+
<span>{@count}</span>
|
|
92
|
+
</div>
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The parser will successfully parse this and allow ESLint rules (like those from `@ripple-ts/eslint-plugin`) to check for:
|
|
97
|
+
|
|
98
|
+
- Track calls at module scope
|
|
99
|
+
- Missing @ operators
|
|
100
|
+
- Component export requirements
|
|
101
|
+
- And more
|
|
102
|
+
|
|
103
|
+
## Limitations
|
|
104
|
+
|
|
105
|
+
- The parser requires Node.js runtime as it uses `require()` to load the Ripple compiler
|
|
106
|
+
- Browser-based linting is not currently supported
|
|
107
|
+
|
|
108
|
+
## Related Packages
|
|
109
|
+
|
|
110
|
+
- [@ripple-ts/eslint-plugin](https://www.npmjs.com/package/@ripple-ts/eslint-plugin) - ESLint rules for Ripple
|
|
111
|
+
- [ripple](https://ripple-ts.com) - The Ripple framework
|
|
112
|
+
- [@ripple-ts/vite-plugin](https://www.npmjs.com/package/@ripple-ts/vite-plugin) - Vite plugin for Ripple
|
|
113
|
+
- [@ripple-ts/prettier-plugin](https://www.npmjs.com/package/@ripple-ts/prettier-plugin) - Prettier plugin for Ripple
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT
|
|
118
|
+
|
|
119
|
+
## Contributing
|
|
120
|
+
|
|
121
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Program } from "estree";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
interface ParseResult {
|
|
6
|
+
ast: Program;
|
|
7
|
+
services?: Record<string, any>;
|
|
8
|
+
scopeManager?: any;
|
|
9
|
+
visitorKeys?: Record<string, string[]>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ESLint parser for Ripple (.ripple) files
|
|
13
|
+
*
|
|
14
|
+
* This parser uses Ripple's built-in compiler to parse .ripple files
|
|
15
|
+
* and returns an ESTree-compatible AST for ESLint to analyze.
|
|
16
|
+
*/
|
|
17
|
+
declare function parseForESLint(code: string, options?: Linter.ParserOptions): ParseResult;
|
|
18
|
+
/**
|
|
19
|
+
* Legacy parse function for older ESLint versions
|
|
20
|
+
*/
|
|
21
|
+
declare function parse(code: string, options?: Linter.ParserOptions): Program;
|
|
22
|
+
declare global {
|
|
23
|
+
var __RIPPLE_COMPILER__: {
|
|
24
|
+
parse: (source: string) => Program;
|
|
25
|
+
compile: (source: string, filename: string, options?: any) => any;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
declare const _default: {
|
|
29
|
+
parseForESLint: typeof parseForESLint;
|
|
30
|
+
parse: typeof parse;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { _default as default, parse, parseForESLint };
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;UAIU,WAAA;OACJ;EADI,QAAA,CAAA,EAEE,MAFS,CAAA,MAAA,EAAA,GAAA,CAAA;EAAA,YAAA,CAAA,EAAA,GAAA;aACf,CAAA,EAGS,MAHT,CAAA,MAAA,EAAA,MAAA,EAAA,CAAA;;;;AA4EN;;;;AAAyF,iBAAzE,cAAA,CAAyE,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAlC,MAAA,CAAO,aAA2B,CAAA,EAAX,WAAW;AA2CzF;;;AAAqE,iBAArD,KAAA,CAAqD,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAvB,MAAA,CAAO,aAAgB,CAAA,EAAA,OAAA;QAAO,MAAA,CAAA;EAG3E,IAAA,mBAAA,EAAA;IAAA,KAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,GAmC4B,OAnC5B;IAmC4B,OAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,GAAA,EAAA,GAAA,GAAA;EAAO,CAAA;;AAAA,cAAA,QAAA,EAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { createRequire } from "module";
|
|
2
|
+
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Recursively walks the AST and ensures all nodes have range and loc properties
|
|
6
|
+
* ESLint's scope analyzer requires these properties on ALL nodes
|
|
7
|
+
*/
|
|
8
|
+
function ensureNodeProperties(node, code) {
|
|
9
|
+
if (!node || typeof node !== "object") return;
|
|
10
|
+
if (node.start !== void 0 && node.end !== void 0 && !node.range) node.range = [node.start, node.end];
|
|
11
|
+
if (!node.loc && node.start !== void 0 && node.end !== void 0) {
|
|
12
|
+
const lines = code.split("\n");
|
|
13
|
+
let currentPos = 0;
|
|
14
|
+
let startLine = 1;
|
|
15
|
+
let startColumn = 0;
|
|
16
|
+
let endLine = 1;
|
|
17
|
+
let endColumn = 0;
|
|
18
|
+
for (let i = 0; i < lines.length; i++) {
|
|
19
|
+
const lineLength = lines[i].length + 1;
|
|
20
|
+
if (currentPos + lineLength > node.start) {
|
|
21
|
+
startLine = i + 1;
|
|
22
|
+
startColumn = node.start - currentPos;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
currentPos += lineLength;
|
|
26
|
+
}
|
|
27
|
+
currentPos = 0;
|
|
28
|
+
for (let i = 0; i < lines.length; i++) {
|
|
29
|
+
const lineLength = lines[i].length + 1;
|
|
30
|
+
if (currentPos + lineLength > node.end) {
|
|
31
|
+
endLine = i + 1;
|
|
32
|
+
endColumn = node.end - currentPos;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
currentPos += lineLength;
|
|
36
|
+
}
|
|
37
|
+
node.loc = {
|
|
38
|
+
start: {
|
|
39
|
+
line: startLine,
|
|
40
|
+
column: startColumn
|
|
41
|
+
},
|
|
42
|
+
end: {
|
|
43
|
+
line: endLine,
|
|
44
|
+
column: endColumn
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
for (const key in node) {
|
|
49
|
+
if (key === "parent" || key === "loc" || key === "range") continue;
|
|
50
|
+
const value = node[key];
|
|
51
|
+
if (Array.isArray(value)) value.forEach((child) => ensureNodeProperties(child, code));
|
|
52
|
+
else if (value && typeof value === "object" && value.type) ensureNodeProperties(value, code);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* ESLint parser for Ripple (.ripple) files
|
|
57
|
+
*
|
|
58
|
+
* This parser uses Ripple's built-in compiler to parse .ripple files
|
|
59
|
+
* and returns an ESTree-compatible AST for ESLint to analyze.
|
|
60
|
+
*/
|
|
61
|
+
function parseForESLint(code, options) {
|
|
62
|
+
try {
|
|
63
|
+
const ast = requireRippleCompiler().parse(code);
|
|
64
|
+
if (!ast) throw new Error("Parser returned null or undefined AST");
|
|
65
|
+
ensureNodeProperties(ast, code);
|
|
66
|
+
return {
|
|
67
|
+
ast: {
|
|
68
|
+
type: ast.type || "Program",
|
|
69
|
+
start: ast.start !== void 0 ? ast.start : 0,
|
|
70
|
+
end: ast.end !== void 0 ? ast.end : code.length,
|
|
71
|
+
loc: ast.loc || {
|
|
72
|
+
start: {
|
|
73
|
+
line: 1,
|
|
74
|
+
column: 0
|
|
75
|
+
},
|
|
76
|
+
end: {
|
|
77
|
+
line: code.split("\n").length,
|
|
78
|
+
column: 0
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
range: ast.range || [0, code.length],
|
|
82
|
+
body: ast.body || [],
|
|
83
|
+
sourceType: ast.sourceType || "module",
|
|
84
|
+
comments: ast.comments || [],
|
|
85
|
+
tokens: ast.tokens || []
|
|
86
|
+
},
|
|
87
|
+
services: {},
|
|
88
|
+
visitorKeys: void 0
|
|
89
|
+
};
|
|
90
|
+
} catch (error) {
|
|
91
|
+
throw new SyntaxError(`Failed to parse Ripple file: ${error.message || error}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Legacy parse function for older ESLint versions
|
|
96
|
+
*/
|
|
97
|
+
function parse(code, options) {
|
|
98
|
+
return parseForESLint(code, options).ast;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Helper to require the Ripple compiler
|
|
102
|
+
* This handles both CommonJS and ESM environments
|
|
103
|
+
*/
|
|
104
|
+
function requireRippleCompiler() {
|
|
105
|
+
const globalRipple = globalThis.__RIPPLE_COMPILER__;
|
|
106
|
+
if (globalRipple && globalRipple.parse) return globalRipple;
|
|
107
|
+
try {
|
|
108
|
+
const ripple = createRequire(import.meta.url)("ripple/compiler");
|
|
109
|
+
if (!ripple || !ripple.parse) throw new Error("Ripple compiler loaded but parse function not found.");
|
|
110
|
+
globalThis.__RIPPLE_COMPILER__ = ripple;
|
|
111
|
+
return ripple;
|
|
112
|
+
} catch (error) {
|
|
113
|
+
throw new Error(`Failed to load Ripple compiler: ${error.message}. Make sure the "ripple" package is installed as a peer dependency.`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
var src_default = {
|
|
117
|
+
parseForESLint,
|
|
118
|
+
parse
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
export { src_default as default, parse, parseForESLint };
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["error: any"],"sources":["../src/index.ts"],"sourcesContent":["import type { Program } from 'estree';\nimport type { AST, Linter } from 'eslint';\nimport { createRequire } from 'module';\n\ninterface ParseResult {\n\tast: Program;\n\tservices?: Record<string, any>;\n\tscopeManager?: any;\n\tvisitorKeys?: Record<string, string[]>;\n}\n\n/**\n * Recursively walks the AST and ensures all nodes have range and loc properties\n * ESLint's scope analyzer requires these properties on ALL nodes\n */\nfunction ensureNodeProperties(node: any, code: string): void {\n\tif (!node || typeof node !== 'object') {\n\t\treturn;\n\t}\n\n\t// Ensure range property exists\n\tif (node.start !== undefined && node.end !== undefined && !node.range) {\n\t\tnode.range = [node.start, node.end];\n\t}\n\n\t// Ensure loc property exists\n\tif (!node.loc && node.start !== undefined && node.end !== undefined) {\n\t\tconst lines = code.split('\\n');\n\t\tlet currentPos = 0;\n\t\tlet startLine = 1;\n\t\tlet startColumn = 0;\n\t\tlet endLine = 1;\n\t\tlet endColumn = 0;\n\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst lineLength = lines[i].length + 1;\n\t\t\tif (currentPos + lineLength > node.start) {\n\t\t\t\tstartLine = i + 1;\n\t\t\t\tstartColumn = node.start - currentPos;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrentPos += lineLength;\n\t\t}\n\n\t\tcurrentPos = 0;\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst lineLength = lines[i].length + 1;\n\t\t\tif (currentPos + lineLength > node.end) {\n\t\t\t\tendLine = i + 1;\n\t\t\t\tendColumn = node.end - currentPos;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrentPos += lineLength;\n\t\t}\n\n\t\tnode.loc = {\n\t\t\tstart: { line: startLine, column: startColumn },\n\t\t\tend: { line: endLine, column: endColumn },\n\t\t};\n\t}\n\n\tfor (const key in node) {\n\t\tif (key === 'parent' || key === 'loc' || key === 'range') {\n\t\t\tcontinue; // Skip these to avoid infinite loops\n\t\t}\n\n\t\tconst value = node[key];\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach((child) => ensureNodeProperties(child, code));\n\t\t} else if (value && typeof value === 'object' && value.type) {\n\t\t\tensureNodeProperties(value, code);\n\t\t}\n\t}\n}\n\n/**\n * ESLint parser for Ripple (.ripple) files\n *\n * This parser uses Ripple's built-in compiler to parse .ripple files\n * and returns an ESTree-compatible AST for ESLint to analyze.\n */\nexport function parseForESLint(code: string, options?: Linter.ParserOptions): ParseResult {\n\ttry {\n\t\t// Dynamically import the Ripple compiler\n\t\t// We use dynamic import to avoid bundling the entire compiler\n\t\tconst rippleCompiler = requireRippleCompiler();\n\n\t\t// Parse the Ripple source code using the Ripple compiler\n\t\tconst ast = rippleCompiler.parse(code);\n\t\tif (!ast) throw new Error('Parser returned null or undefined AST');\n\n\t\t// Recursively ensure all nodes have range and loc properties\n\t\tensureNodeProperties(ast, code);\n\n\t\t// Create a properly structured AST object ensuring all required properties exist\n\t\tconst result: any = {\n\t\t\ttype: ast.type || 'Program',\n\t\t\tstart: ast.start !== undefined ? ast.start : 0,\n\t\t\tend: ast.end !== undefined ? ast.end : code.length,\n\t\t\tloc: ast.loc || {\n\t\t\t\tstart: { line: 1, column: 0 },\n\t\t\t\tend: { line: code.split('\\n').length, column: 0 },\n\t\t\t},\n\t\t\trange: ast.range || [0, code.length],\n\t\t\tbody: ast.body || [],\n\t\t\tsourceType: ast.sourceType || 'module',\n\t\t\tcomments: ast.comments || [],\n\t\t\ttokens: ast.tokens || [],\n\t\t};\n\n\t\treturn {\n\t\t\tast: result,\n\t\t\tservices: {},\n\t\t\tvisitorKeys: undefined, // Use ESLint's default visitor keys\n\t\t};\n\t} catch (error: any) {\n\t\t// Transform Ripple parse errors to ESLint-compatible format\n\t\tthrow new SyntaxError(`Failed to parse Ripple file: ${error.message || error}`);\n\t}\n}\n\n/**\n * Legacy parse function for older ESLint versions\n */\nexport function parse(code: string, options?: Linter.ParserOptions): Program {\n\tconst result = parseForESLint(code, options);\n\treturn result.ast;\n}\n\n/**\n * Helper to require the Ripple compiler\n * This handles both CommonJS and ESM environments\n */\nfunction requireRippleCompiler(): any {\n\tconst globalRipple = (globalThis as any).__RIPPLE_COMPILER__;\n\tif (globalRipple && globalRipple.parse) {\n\t\treturn globalRipple;\n\t}\n\n\ttry {\n\t\t// Use createRequire to dynamically require the module\n\t\t// This works in both ESM and CommonJS contexts\n\t\tconst require = createRequire(import.meta.url);\n\t\tconst ripple = require('ripple/compiler');\n\n\t\tif (!ripple || !ripple.parse) {\n\t\t\tthrow new Error('Ripple compiler loaded but parse function not found.');\n\t\t}\n\n\t\t(globalThis as any).__RIPPLE_COMPILER__ = ripple;\n\n\t\treturn ripple;\n\t} catch (error: any) {\n\t\tthrow new Error(\n\t\t\t`Failed to load Ripple compiler: ${error.message}. ` +\n\t\t\t\t'Make sure the \"ripple\" package is installed as a peer dependency.',\n\t\t);\n\t}\n}\n\ndeclare global {\n\tvar __RIPPLE_COMPILER__: {\n\t\tparse: (source: string) => Program;\n\t\tcompile: (source: string, filename: string, options?: any) => any;\n\t};\n}\n\nexport default {\n\tparseForESLint,\n\tparse,\n};\n"],"mappings":";;;;;;;AAeA,SAAS,qBAAqB,MAAW,MAAoB;AAC5D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"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Ripple-TS/ripple.git",
|
|
10
|
+
"directory": "packages/eslint-parser"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Ripple-TS/ripple/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://ripple-ts.com",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"eslint",
|
|
24
|
+
"parser",
|
|
25
|
+
"ripple"
|
|
26
|
+
],
|
|
27
|
+
"author": "Dominic Gannaway",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"eslint": ">=9.0.0",
|
|
31
|
+
"ripple": "*"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"acorn": "^8.15.0",
|
|
35
|
+
"acorn-typescript": "^1.4.13"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/eslint": "^9.6.1",
|
|
39
|
+
"@types/estree": "^1.0.8",
|
|
40
|
+
"@types/node": "^24.3.0",
|
|
41
|
+
"tsdown": "^0.15.4",
|
|
42
|
+
"typescript": "^5.9.2",
|
|
43
|
+
"ripple": "0.2.153"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20.0.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsdown"
|
|
50
|
+
}
|
|
51
|
+
}
|