Skip to content

Commit 9c1eea8

Browse files
authored
Evaluation Improvements + Maintenance (#11)
* fix: quiet down stderr reporting on lexer/parser errs * chore: npm audit * chore: ignore local files * fix: update usages w/out context & mark tags opt * feat: introduce yaml -> evalcase decoder * chore: remove deprecated npm flag * fix: setup eslint * fix: lint reformatting (same code, just style shift) * chore: pin node/npm via nvmrc + direnv * test: cover yaml loading for eval cases * chore: npm audit fix * test: lint during ci * chore: update tsconfig + imports * docs: update changelog
1 parent 5ace7db commit 9c1eea8

41 files changed

Lines changed: 1902 additions & 241 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_nvm

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525

2626
- name: Build packages
2727
run: npm run build
28+
29+
- name: Lint
30+
run: npm run lint
2831

2932
- name: Run tests
3033
run: npm run test:ci

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ results
1212
downloads/
1313
stores/
1414
data/
15-
.langium-ai
15+
.langium-ai
16+
*.local.*

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.11.1

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CHANGELOG
2+
3+
## v4.1.5 (Unreleased)
4+
5+
### New features
6+
- Introduced yaml -> evalcase decoder for loading evaluator cases in bulk
7+
8+
### General improvements
9+
- Added tests for evaluator + splitter
10+
- Setup eslint and lint during CI
11+
- Bump pinned node to v24 via nvmrc + direnv
12+
- Move edit distance evaluator from core into examples
13+
- Move levenshtein distance evaluator into examples
14+
- Quiet down stderr reporting on lexer/parser errors
15+
- Update usages without context & mark tags optional
16+
- Update tsconfig + imports
17+
- npm audit fixes
18+
- Ignore local files
19+
20+
## v4.1.4 (2025-12-17)
21+
22+
### New features
23+
- Use protobuf definition to generate language independent types (#9)
24+
- Align langium and lai versions
25+
26+
## v4.1.0 (2025-09-30)
27+
28+
### New features
29+
- Initial LAI MCP server implementation (#7)
30+
- Collect rule call statistics (#8)
31+
- Added tests for document syntax analyzer
32+
- Allow setting includeImportedRules and includeHiddenRules
33+
34+
### General improvements
35+
- Move main to track latest langium, 4.1.X
36+
- Bump packages
37+
- Correct install ref on README
38+
- Audit updates
39+
- Added CI build
40+
- Fixed extension usage in document uri
41+
42+
## v0.0.2 (2025-05-13)
43+
44+
### New features
45+
- Add splitter example
46+
- Update splitter with program map functionality
47+
- Added copyrights
48+
49+
### General improvements
50+
- Update examples & exports
51+
- README update
52+
- Clean up other packages with small corrections
53+
- Add launch config
54+
55+
## v0.0.1 (2025-04-17)
56+
57+
### New features
58+
- Initial release of langium-ai and langium-ai-tools

eslint.config.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
export default tseslint.config(
5+
eslint.configs.recommended,
6+
{
7+
// global ignores
8+
ignores: [
9+
'**/dist/**',
10+
'**/node_modules/**',
11+
'**/src/gen/**',
12+
'**/*.js',
13+
'**/*.mjs',
14+
'**/*.cjs',
15+
],
16+
},
17+
{
18+
// type-checked linting for source files
19+
files: ['**/src/**/*.ts'],
20+
extends: [...tseslint.configs.recommendedTypeChecked],
21+
languageOptions: {
22+
parserOptions: {
23+
project: true,
24+
tsconfigRootDir: import.meta.dirname,
25+
},
26+
},
27+
},
28+
{
29+
// basic linting for test files and config files (no type-checking)
30+
files: ['**/tests/**/*.ts', '**/vitest.config.ts'],
31+
extends: [...tseslint.configs.recommended],
32+
},
33+
{
34+
// custom rules for all TypeScript files
35+
files: ['**/*.ts'],
36+
rules: {
37+
'curly': ['error', 'all'],
38+
'prefer-const': 'error',
39+
'no-var': 'error',
40+
'eqeqeq': ['error', 'always'],
41+
// typescript-specific rules
42+
'@typescript-eslint/no-explicit-any': 'warn',
43+
'@typescript-eslint/no-unused-vars': ['error', {
44+
'argsIgnorePattern': '^_',
45+
'varsIgnorePattern': '^_',
46+
}],
47+
// allow empty interfaces for extensibility
48+
'@typescript-eslint/no-empty-interface': 'off',
49+
},
50+
},
51+
{
52+
// additional rules for source files with type information
53+
files: ['**/src/**/*.ts'],
54+
rules: {
55+
// allow any for specific cases
56+
'@typescript-eslint/no-unsafe-assignment': 'warn',
57+
'@typescript-eslint/no-unsafe-member-access': 'warn',
58+
'@typescript-eslint/no-unsafe-call': 'warn',
59+
'@typescript-eslint/no-unsafe-return': 'warn',
60+
},
61+
}
62+
);

0 commit comments

Comments
 (0)