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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:

- run: npm ci

- run: npx biome ci
- run: npm run lint:ci
39 changes: 39 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import baselinePlugin from 'eslint-plugin-baseline-js';
import yalhPlugin from 'eslint-plugin-yet-another-license-header';
import tseslint from 'typescript-eslint';

const defaultLicense = `
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
`;

const licensePattern =
/^\/\*\n \* Copyright The OpenTelemetry Authors(?:, [^\n]+)*\n(?: \* Copyright [^\n]+\n)*(?: \*\n)? \* SPDX-License-Identifier: Apache-2\.0\n \*\/$/;

export default [
{
files: ['packages/*/src/**/*.{js,ts,mjs}'],
languageOptions: {
parser: tseslint.parser,
},
plugins: {
'baseline-js': baselinePlugin,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this effectively duplicating biome linting? I understand they aren't identical.

Copy link
Contributor Author

@overbalance overbalance Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's not. This is only running the baseline plugin and the header plugin which are not available in the biome plugin format. Both features are essential so while running biome and eslint is not ideal, it's still a major speed up from running eslint recommended rules on its own.

'yet-another-license-header': yalhPlugin,
},
rules: {
...baselinePlugin.configs['recommended-ts']({
available: 'widely',
level: 'error',
}).rules,
'yet-another-license-header/header': [
'error',
{
header: defaultLicense,
allowedHeaderPatterns: [licensePattern],
},
],
},
},
];
Loading