@rslint/core 0.6.4 → 0.6.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/bin/rslint.js +23 -0
- package/dist/770.js +18 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +904 -4
- package/dist/eslint-plugin/index.js +31 -2
- package/dist/index.d.ts +13 -1
- package/dist/index.js +4 -1
- package/dist/internal.js +1 -17
- package/package.json +14 -14
- package/bin/rslint.cjs +0 -48
- package/dist/207.js +0 -897
package/bin/rslint.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import nodeModule from 'node:module';
|
|
3
|
+
|
|
4
|
+
// Enable on-disk code caching for modules loaded by Node.js.
|
|
5
|
+
// Available in Node.js >= 22.8.0.
|
|
6
|
+
const { enableCompileCache } = nodeModule;
|
|
7
|
+
if (enableCompileCache) {
|
|
8
|
+
try {
|
|
9
|
+
enableCompileCache();
|
|
10
|
+
} catch {
|
|
11
|
+
// Ignore cache setup errors; the CLI should still run normally.
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function main() {
|
|
16
|
+
const { runCLI } = await import('../dist/cli.js');
|
|
17
|
+
await runCLI();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
main().catch((err) => {
|
|
21
|
+
process.stderr.write(`rslint: ${err}\n`);
|
|
22
|
+
process.exitCode = 1;
|
|
23
|
+
});
|
package/dist/770.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
const resolve_binary_require = createRequire(import.meta.url);
|
|
3
|
+
function resolveRslintBinary() {
|
|
4
|
+
const arch = process.arch;
|
|
5
|
+
const tuples = 'linux' === process.platform ? [
|
|
6
|
+
`linux-${arch}-gnu`,
|
|
7
|
+
`linux-${arch}-musl`
|
|
8
|
+
] : 'win32' === process.platform ? [
|
|
9
|
+
`win32-${arch}-msvc`
|
|
10
|
+
] : [
|
|
11
|
+
`${process.platform}-${arch}`
|
|
12
|
+
];
|
|
13
|
+
for (const tuple of tuples)try {
|
|
14
|
+
return resolve_binary_require.resolve(`@rslint/native-${tuple}/bin`);
|
|
15
|
+
} catch {}
|
|
16
|
+
throw new Error(`rslint: no native binary for ${process.platform}-${arch} (looked for @rslint/native-{${tuples.join(',')}})`);
|
|
17
|
+
}
|
|
18
|
+
export { resolveRslintBinary };
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
export declare function run(binPath: string, argv: string[], startTime: number): Promise<number>;
|
|
2
2
|
|
|
3
|
+
export declare function runCLI({ argv, }?: RunCLIOptions): Promise<void>;
|
|
4
|
+
|
|
5
|
+
export declare type RunCLIOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* The command-line arguments to parse, matching the shape of Node.js `process.argv`
|
|
8
|
+
* @default process.argv
|
|
9
|
+
*/
|
|
10
|
+
argv?: string[];
|
|
11
|
+
};
|
|
12
|
+
|
|
3
13
|
export { }
|