SEL-473: Add lint rule for BUSL headers (#698)

* chore(app): enforce license header via eslint

* update lock and order

* fix formatting
This commit is contained in:
Justin Hernandez
2025-06-29 02:09:12 -07:00
committed by GitHub
parent db1991258d
commit 4e3f764f09
6 changed files with 25 additions and 10 deletions

View File

@@ -5,12 +5,17 @@ module.exports = {
'plugin:prettier/recommended',
'plugin:jest/recommended',
],
plugins: ['simple-import-sort', 'prettier', 'jest'],
plugins: ['header', 'jest', 'prettier', 'simple-import-sort'],
ignorePatterns: ['ios/', 'android/', 'deployments/', 'node_modules/'],
rules: {
// Import sorting rules
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
'header/header': [
2,
'line',
' SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11',
],
// Add prettier rule to show prettier errors as ESLint errors
'prettier/prettier': [

View File

@@ -1811,9 +1811,9 @@ PODS:
- segment-analytics-react-native (2.21.1):
- React-Core
- sovran-react-native
- Sentry (8.52.1):
- Sentry/Core (= 8.52.1)
- Sentry/Core (8.52.1)
- Sentry (8.53.1):
- Sentry/Core (= 8.53.1)
- Sentry/Core (8.53.1)
- Sentry/HybridSDK (8.48.0)
- SentryPrivate (8.21.0)
- SocketRocket (0.7.0)

View File

@@ -139,6 +139,7 @@
"@types/react-test-renderer": "^18",
"eslint": "^8.19.0",
"eslint-config-prettier": "^10.1.2",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-jest": "^28.11.1",
"eslint-plugin-prettier": "^5.2.6",
"eslint-plugin-simple-import-sort": "^12.1.1",

View File

@@ -148,7 +148,7 @@ export class SelfBackendVerifier {
if (!configId) {
issues.push({
type: ConfigMismatch.ConfigNotFound,
message: "Config Id not found",
message: 'Config Id not found',
});
}

View File

@@ -59,11 +59,10 @@ export const formatRevealedDataPacked = (
)
.toString('utf-8');
const olderThan = Buffer.from(
revealedDataPackedString
.subarray(
revealedDataIndices[attestationId].olderThanStart,
revealedDataIndices[attestationId].olderThanEnd + 1
)
revealedDataPackedString.subarray(
revealedDataIndices[attestationId].olderThanStart,
revealedDataIndices[attestationId].olderThanEnd + 1
)
).toString('utf-8');
const ofac = Array.from(
revealedDataPackedString.subarray(

View File

@@ -4505,6 +4505,7 @@ __metadata:
elliptic: "npm:^6.6.1"
eslint: "npm:^8.19.0"
eslint-config-prettier: "npm:^10.1.2"
eslint-plugin-header: "npm:^3.1.1"
eslint-plugin-jest: "npm:^28.11.1"
eslint-plugin-prettier: "npm:^5.2.6"
eslint-plugin-simple-import-sort: "npm:^12.1.1"
@@ -12896,6 +12897,15 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-header@npm:^3.1.1":
version: 3.1.1
resolution: "eslint-plugin-header@npm:3.1.1"
peerDependencies:
eslint: ">=7.7.0"
checksum: 10c0/2eb70acd8efe2b72a7bff3e3958a637871c6d0ed4166effea8b68e79b9ba291b6a33182e7f0e31ca7de717fc5b2cf2e42dcc0a07db1a37ae6941bbb6a8eda731
languageName: node
linkType: hard
"eslint-plugin-jest@npm:^27.9.0":
version: 27.9.0
resolution: "eslint-plugin-jest@npm:27.9.0"