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
22 changes: 16 additions & 6 deletions .github/workflows/ci-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,10 @@ jobs:
run: |
npm ci

- name: TSC
- name: Type check
if: ${{ env.TYPE_CHECK_PREVIOUSLY_PASSED != 'true' }}
run: |
npm run sdk:tsc:check
npm run sdk:check

- name: Cache successful type check results
if: ${{ success() }}
Expand Down Expand Up @@ -800,15 +800,25 @@ jobs:
run: |
npm ci

- name: Build SDK and CLI
- name: Build SDK
if: ${{ env.VALIDATE_PREVIOUSLY_PASSED != 'true' }}
run: |
npm run compile
npm run sdk:compile

- name: Validate SDK
if: ${{ env.VALIDATE_PREVIOUSLY_PASSED != 'true' }}
run: |
npm run sdk:validate

- name: Build CLI
if: ${{ env.VALIDATE_PREVIOUSLY_PASSED != 'true' }}
run: |
npm run cli:compile

- name: Validate SDK and CLI
- name: Validate CLI
if: ${{ env.VALIDATE_PREVIOUSLY_PASSED != 'true' }}
run: |
npm run validate
npm run cli:validate

- name: Build Demo
if: ${{ env.VALIDATE_PREVIOUSLY_PASSED != 'true' }}
Expand Down
25 changes: 25 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import baselinePlugin from 'eslint-plugin-baseline-js';
import tseslint from 'typescript-eslint';

export default [
{
files: ['src/**/*.{js,ts}'],
ignores: ['**/*.test.ts', '**/*.spec.ts', '**/testUtils/**'],
languageOptions: {
parser: tseslint.parser,
// enables type-aware linting to detect instance method usage
parserOptions: {
projectService: true,
},
},
plugins: {
'baseline-js': baselinePlugin,
},
rules: {
...baselinePlugin.configs['recommended-ts']({
available: 'widely',
level: 'error',
}).rules,
},
},
];
26 changes: 26 additions & 0 deletions eslint.dist.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import baselinePlugin from 'eslint-plugin-baseline-js';

// Compiled output - catches non-baseline APIs from dependencies
export default [
{
files: ['dist/**/*.js', 'dist/**/*.cjs'],
ignores: ['dist/**/*.d.ts', 'dist/**/*.d.cts'],
plugins: {
'baseline-js': baselinePlugin,
},
rules: {
'baseline-js/use-baseline': [
'error',
{
available: 'widely',
ignoreFeatures: [
// compression-streams: widely available since Nov 2025, plugin data stale
'compression-streams',
// proto: deprecated but universally supported, used by bundled dependencies
'proto',
],
},
],
},
},
];
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pre-commit:
lint:
run: npm run sdk:lint:fix
typecheck:
run: npm run sdk:tsc:check
run: npm run sdk:check:tsc
commit-msg:
commands:
commitlint:
Expand Down
Loading
Loading