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
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import CodeX from 'eslint-config-codex';

export default [
...CodeX,

{
rules: {
/**
* Downgraded in .eslintrc.js, kept that way here.
*/
'no-shadow': 'warn',
'no-unused-expressions': 'warn',

/**
* Resolves imports as Node does and never looks for .ts.
*/
'n/no-missing-import': 'off',

/**
* Demand require('process') and require('buffer') over the globals.
*/
'n/prefer-global/process': 'off',
'n/prefer-global/buffer': 'off',
},
},

{
/**
* CodeX registers @typescript-eslint and jsdoc for *.ts only, and resolves
* tsconfigRootDir inside its own package.
*/
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
sourceType: 'module',
},
},
rules: {
/**
* Downgraded in .eslintrc.js, kept that way here. `jsdoc/require-jsdoc`
* replaces the removed core `require-jsdoc`.
*/
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/explicit-function-return-type': 'warn',
'jsdoc/require-jsdoc': 'warn',
},
},
];
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "hawk.api",
"version": "1.5.8",
"version": "1.5.9",
"main": "index.ts",
"license": "BUSL-1.1",
"scripts": {
"dev": "ts-node-dev --no-notify index.ts",
"start": "node index.ts",
"lint": "eslint -c ./.eslintrc.js src/ --ext .ts,.js --fix",
"lint-test": "eslint -c ./.eslintrc.js src/ --ext .ts,.js",
"lint": "eslint ./src --fix",
"lint-test": "eslint ./src",
"dev:up": "docker-compose -f docker-compose.dev.yml up -d",
"dev:down": "docker-compose -f docker-compose.dev.yml down",
"build": "tsc",
Expand All @@ -24,16 +24,16 @@
"@swc/core": "^1.3.0",
"@types/jest": "^29.5.0",
"@types/xml2js": "^0.4.14",
"eslint": "^6.7.2",
"eslint-config-codex": "1.2.4",
"eslint": "^9.39.5",
"eslint-config-codex": "^2.0.3",
"eslint-plugin-import": "^2.19.1",
"jest": "^30.2.0",
"mongodb-memory-server": "^6.6.1",
"nodemon": "^2.0.2",
"redis-mock": "^0.56.3",
"ts-jest": "^29.4.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"typescript": "^6.0.3",
"xml2js": "^0.6.2"
},
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
"zod/v4": ["src/types/zod-v4.d.ts"]
"paths": { /* A series of entries which re-map imports to lookup locations relative to this file. */
"zod/v4": ["./src/types/zod-v4.d.ts"]
},
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
Expand Down
Loading
Loading