Skip to content
Open
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
78 changes: 0 additions & 78 deletions .eslintrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,3 @@ jobs:
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:${{ env.TAG }}
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:latest


16 changes: 8 additions & 8 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@

on:
pull_request:
branches: [main]
branches: [main, develop]
push:
branches: [main]
branches: [main, develop]

concurrency:
# Cancel previous runs that are not completed yet
group: afj-controller-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}
group: credo-controller-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
validate:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: Validate
steps:
- name: Checkout afj-controller
- name: Checkout credo-controller
uses: actions/checkout@v4

- name: Setup NodeJS
uses: actions/setup-node@v3
- name: Setup node v20
uses: actions/setup-node@v4
with:
node-version: 18.19.0
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Linting
run: yarn lint

- name: Prettier
run: yarn check-format

- name: Compile
run: yarn check-types

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const run = async () => {
{
// ... AFJ Config ... //
},
agentDependencies
agentDependencies,
)
await startServer(agent, { port: 3000 })
}
Expand Down
13 changes: 8 additions & 5 deletions bin/afj-rest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires, no-undef */

const { runCliServer } = require('../build/cli')

runCliServer()
import('../build/cli.js')
.then((module) => {
module.runCliServer()
})
.catch((err) => {
console.error('Error starting CLI server:', err)
process.exit(1)
})
93 changes: 93 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintPluginTypescript from '@typescript-eslint/eslint-plugin';
import parser from '@typescript-eslint/parser';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export default [
{
ignores: ['**/tests/*', 'build'],
files: ['**/*.ts'],
languageOptions: {
parser,
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
sourceType: 'module',
},
globals: {
console: false, // no-console rule
},
},
plugins: {
'@typescript-eslint': eslintPluginTypescript,
import: eslintPluginImport,
prettier: eslintPluginPrettier,
},
rules: {
'no-constant-condition': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
'@typescript-eslint/explicit-member-accessibility': 'error',
'no-console': 'error',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/consistent-type-imports': 'error',
'import/no-cycle': 'error',
'import/order': [
'error',
{
groups: ['type', ['builtin', 'external'], 'parent', 'sibling', 'index'],
alphabetize: {
order: 'asc',
},
'newlines-between': 'always',
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
},
],
'prettier/prettier': 'error',
},
},
{
files: ['jest.config.ts', 'eslint.config.js'],
languageOptions: {
parserOptions: {
sourceType: 'commonjs',
},
globals: {
require: true,
module: true,
__dirname: true,
},
},
},
{
files: ['*.test.ts', '**/__tests__/**', '**/tests/**', 'jest.*.ts', '**/samples/**'],
languageOptions: {
globals: {
describe: true,
test: true,
expect: true,
jest: true,
},
},
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
},
];
Loading
Loading