Skip to content

Commit c8acad4

Browse files
authored
chore: switch to @tony.ganchev/eslint-plugin-header (#4308)
1 parent 6a83c3d commit c8acad4

12 files changed

Lines changed: 750 additions & 1407 deletions

File tree

eslint.config.mjs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
import { includeIgnoreFile } from '@eslint/compat';
44
import eslint from '@eslint/js';
5-
import headerPlugin from 'eslint-plugin-header';
5+
import headerPlugin from '@tony.ganchev/eslint-plugin-header';
66
import jestPlugin from 'eslint-plugin-jest';
77
import noUnsanitizedPlugin from 'eslint-plugin-no-unsanitized';
88
import eslintPrettier from 'eslint-plugin-prettier/recommended';
@@ -18,9 +18,6 @@ import cloudscapeCommonRules from '@cloudscape-design/build-tools/eslint/index.j
1818

1919
import cloudscapeComponentsRules from './build-tools/eslint/index.js';
2020

21-
// https://github.com/Stuk/eslint-plugin-header/issues/57
22-
headerPlugin.rules.header.meta.schema = false;
23-
2421
export default tsEslint.config(
2522
includeIgnoreFile(path.resolve('.gitignore')),
2623
{
@@ -112,8 +109,23 @@ export default tsEslint.config(
112109
'require-await': 'error',
113110
'header/header': [
114111
'error',
115-
'line',
116-
[' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.', ' SPDX-License-Identifier: Apache-2.0'],
112+
{
113+
header: {
114+
commentType: 'line',
115+
lines: [
116+
' Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.',
117+
' SPDX-License-Identifier: Apache-2.0',
118+
],
119+
},
120+
leadingComments: {
121+
comments: [
122+
{
123+
commentType: 'block',
124+
lines: ['*', ' * @jest-environment node', ' '],
125+
},
126+
],
127+
},
128+
},
117129
],
118130
'no-restricted-syntax': [
119131
'error',

0 commit comments

Comments
 (0)