Skip to content

Commit e92c560

Browse files
committed
chore: eslint rule for license
1 parent b9c5343 commit e92c560

104 files changed

Lines changed: 391 additions & 16 deletions

File tree

Some content is hidden

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

eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import js from '@eslint/js';
22
import tsPlugin from '@typescript-eslint/eslint-plugin';
33
import tsParser from '@typescript-eslint/parser';
44
import simpleImportSort from 'eslint-plugin-simple-import-sort';
5+
import licenseHeader from 'eslint-plugin-license-header';
56

67
export default [
78
{
@@ -45,6 +46,7 @@ export default [
4546
plugins: {
4647
'@typescript-eslint': tsPlugin,
4748
'simple-import-sort': simpleImportSort,
49+
'license-header': licenseHeader,
4850
},
4951
rules: {
5052
...js.configs.recommended.rules,
@@ -53,6 +55,8 @@ export default [
5355
'simple-import-sort/exports': 'error',
5456
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
5557
'@typescript-eslint/no-explicit-any': 'error',
58+
59+
'license-header/header': ['error', './resources/license-header.js'],
5660
},
5761
},
5862
];

package-lock.json

Lines changed: 44 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"env-cmd": "^11.0.0",
7676
"eslint": "^10.0.1",
7777
"eslint-config-prettier": "^10.1.8",
78+
"eslint-plugin-license-header": "^0.9.0",
7879
"eslint-plugin-prettier": "^5.5.4",
7980
"eslint-plugin-simple-import-sort": "^12.1.1",
8081
"husky": "^9.1.7",
@@ -88,4 +89,4 @@
8889
"typescript-eslint": "^8.56.0",
8990
"vitest": "^4.0.3"
9091
}
91-
}
92+
}

resources/license-header.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
* Copyright © 2026 Fells Code, LLC
3+
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
5+
*/

src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copyright © 2026 Fells Code, LLC
33
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
45
*/
6+
57
import cookieParser from 'cookie-parser';
68
import cors, { CorsOptions } from 'cors';
79
import express, { NextFunction, Request, Response } from 'express';

src/config/bootstrapSystemConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copyright © 2026 Fells Code, LLC
33
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
45
*/
6+
57
import { SystemConfig } from '../models/systemConfig.js';
68
import { SystemConfigSchema } from '../schemas/systemConfig.schema.js';
79
import { parseSystemConfigEnvValue } from '../utils/parseEnvConfigs.js';

src/config/getSystemConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copyright © 2026 Fells Code, LLC
33
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
45
*/
6+
57
import { SystemConfig as SysConfigModel } from '../models/systemConfig.js';
68
import { SystemConfig } from '../schemas/systemConfig.schema.js';
79

src/config/requiredSystemConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copyright © 2026 Fells Code, LLC
33
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
45
*/
6+
57
export interface RequiredSystemConfig {
68
app_name: string;
79
default_roles: string[];

src/config/systemConfig.envMap.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copyright © 2026 Fells Code, LLC
33
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
45
*/
6+
57
export const SYSTEM_CONFIG_ENV_MAP = {
68
default_roles: 'DEFAULT_ROLES',
79
available_roles: 'AVAILABLE_ROLES',

src/controllers/admin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* Copyright © 2026 Fells Code, LLC
3+
* Licensed under the GNU Affero General Public License v3.0
4+
* See LICENSE file in the project root for full license information
5+
*/
6+
17
import { CreateUserSchema, UpdateUserSchema } from '@seamless-auth/types';
28
import { Request, Response } from 'express';
39
import { Op, WhereOptions } from 'sequelize';

0 commit comments

Comments
 (0)