Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .eslintrc.json

This file was deleted.

21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import base from '@constructive-io/eslint-config';

export default [
...base,
{ ignores: ['**/__fixtures__/output/**'] },
{
// terminal packages match/emit ANSI escape sequences on purpose
files: ['packages/{yanse,clean-ansi,inquirerer}/**'],
rules: {
'no-control-regex': 'off'
}
},
{
// vendored port of noble-hashes; keep it diffable against upstream
files: ['packages/noble-hashes/**'],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off'
}
}
];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"deps": "pnpm up -r -i -L"
},
"devDependencies": {
"@constructive-io/eslint-config": "workspace:*",
"@types/jest": "^30.0.0",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.53.1",
Expand Down
1 change: 1 addition & 0 deletions packages/appstash/__tests__/appstash.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';

import { appstash, ensure, resolve } from '../src';

describe('appstash', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/appstash/__tests__/config-store.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';

import { createConfigStore } from '../src';

describe('createConfigStore', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/appstash/src/config-store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';

import { appstash, resolve } from './index';

export interface ContextTargetEndpoint {
Expand Down
5 changes: 3 additions & 2 deletions packages/appstash/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as path from 'path';

/**
* Result from appstash() containing all resolved directory paths
Expand Down Expand Up @@ -56,6 +56,7 @@ function getHomeDir(): string | null {
return home;
}
} catch {
// ignore
}
return null;
}
Expand Down Expand Up @@ -275,7 +276,6 @@ export function resolve(
return path.join(dirs[kind], ...parts);
}

export { createConfigStore } from './config-store';
export type {
ClientConfig,
ConfigStore,
Expand All @@ -286,3 +286,4 @@ export type {
Credentials,
GlobalSettings,
} from './config-store';
export { createConfigStore } from './config-store';
6 changes: 1 addition & 5 deletions packages/bash-ast/test-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ export class FixtureTestUtils extends TestUtils {
}
const entries = this.getTestEntries(filters);
for (const [relativePath, source] of entries) {
try {
await this.expectAstMatch(relativePath, source);
} catch (err) {
throw err;
}
await this.expectAstMatch(relativePath, source);
}
}
}
2 changes: 1 addition & 1 deletion packages/cel-proto-parser/__tests__/roundtrip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* manually constructed ASTs that match the @marcbachmann/cel-js format.
*/

import { deparse, Expr } from '../src/deparser';
import { convertToProtoExpr, MarcAstNode } from '../src/converter';
import { deparse } from '../src/deparser';

describe('CEL AST Converter', () => {
describe('Value Conversion', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/cel-proto-parser/scripts/generate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { join, resolve } from 'path';

import { CelProtoParser, CelProtoParserOptions } from '../src';

const inFile: string = join(__dirname, '../__fixtures__/syntax.proto');
Expand Down
7 changes: 4 additions & 3 deletions packages/cel-proto-parser/scripts/test-roundtrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
*/

import { parse } from '@marcbachmann/cel-js';
import { deparse, Expr } from '../src/deparser';
import { convertToProtoExpr, MarcAstNode } from '../src/converter';
import { readFileSync } from 'fs';
import { resolve, dirname } from 'path';
import { dirname,resolve } from 'path';
import { fileURLToPath } from 'url';

import { convertToProtoExpr, MarcAstNode } from '../src/converter';
import { deparse, Expr } from '../src/deparser';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Expand Down
2 changes: 1 addition & 1 deletion packages/cel-proto-parser/src/ast/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './types';
export * from './enums';
export * from './types';
23 changes: 12 additions & 11 deletions packages/cel-proto-parser/src/ast/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as t from '@babel/types';

import { ResolvedCelProtoParserOptions } from '../options';
import { toCamelCase, getFieldName, createNamedImport } from '../utils';
import { createNamedImport,getFieldName, toCamelCase } from '../utils';

// Type mapping from protobuf to TypeScript
const PROTO_TO_TS_TYPE: Record<string, string> = {
Expand Down Expand Up @@ -35,16 +36,16 @@ export function resolveTypeName(typeName: string): t.TSType {
const tsType = PROTO_TO_TS_TYPE[typeName];
if (tsType) {
switch (tsType) {
case 'string':
return t.tsStringKeyword();
case 'boolean':
return t.tsBooleanKeyword();
case 'number':
return t.tsNumberKeyword();
case 'bigint':
return t.tsBigIntKeyword();
default:
return t.tsTypeReference(t.identifier(tsType));
case 'string':
return t.tsStringKeyword();
case 'boolean':
return t.tsBooleanKeyword();
case 'number':
return t.tsNumberKeyword();
case 'bigint':
return t.tsBigIntKeyword();
default:
return t.tsTypeReference(t.identifier(tsType));
}
}

Expand Down
Loading
Loading