feat: eslint license header plugin

This commit is contained in:
2024-07-15 13:48:44 +02:00
parent 2a1a7a5d5b
commit f8efb7db57
9 changed files with 110 additions and 85 deletions

View File

@@ -22,7 +22,7 @@ const config = {
'plugin:unicorn/recommended',
'prettier',
],
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc'],
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc', 'header'],
settings: {
jsdoc: {
mode: 'typescript',
@@ -36,6 +36,7 @@ const config = {
'unicorn/prefer-node-protocol': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/prefer-event-target': 'off',
'unicorn/prevent-abbreviations': [
'error',
{
@@ -77,6 +78,27 @@ const config = {
},
],
'header/header': [
2,
'block',
[
'',
' * Copyright (C) 2023 StApps',
' * This program is free software: you can redistribute it and/or modify it',
' * under the terms of the GNU General Public License as published by the Free',
' * Software Foundation, version 3.',
' *',
' * This program is distributed in the hope that it will be useful, but WITHOUT',
' * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or',
' * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for',
' * more details.',
' *',
' * You should have received a copy of the GNU General Public License along with',
' * this program. If not, see <https://www.gnu.org/licenses/>.',
' ',
],
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',