Skip to content

Commit

Permalink
chore: switch from rome to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianBuzzo committed Feb 26, 2024
1 parent 16b2a0f commit 45c0312
Show file tree
Hide file tree
Showing 7 changed files with 644 additions and 164 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 20
- run: npm i
- run: npm test
- run: npm test:types
- run: npm run test:types
4 changes: 4 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended);
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"generate": "prisma generate",
"build": "tsc",
"test": "rome ci src test",
"lint:fix": "rome check --apply src test",
"test": "eslint",
"lint:fix": "eslint --fix",
"test:types": "tsc --noEmit",
"test:integration": "jest --runInBand test/integration",
"test:compose:integration": "docker compose -f docker-compose.yml --profile with-sut up db sut --exit-code-from sut",
Expand All @@ -23,11 +23,12 @@
"@types/lodash": "^4.14.191",
"@types/uuid": "^9.0.0",
"cls-hooked": "^4.2.2",
"eslint": "^8.57.0",
"jest": "^29.3.1",
"prisma": "^5.0.0",
"rome": "^11.0.0",
"ts-jest": "^29.0.5",
"typescript": "^4.9.4",
"typescript": "^5.3.3",
"typescript-eslint": "^7.0.2",
"uuid": "^9.0.0"
},
"dependencies": {
Expand Down
15 changes: 0 additions & 15 deletions rome.json

This file was deleted.

4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export type AllAbilities<ContextKeys extends string, YModels extends Models> = {

type CRUDOperations = "read" | "create" | "update" | "delete";
export type DefaultAbilities<ContextKeys extends string = string, YModels extends Models = Models> = {
[Model in YModels]: { [op in CRUDOperations]: Ability<ContextKeys, Model> };
[Model in YModels]: {
[op in CRUDOperations]: Ability<ContextKeys, Model>;
};
};
export type CustomAbilities<ContextKeys extends string = string, YModels extends Models = Models> = {
[model in YModels]?: {
Expand Down
92 changes: 0 additions & 92 deletions test/types/index.js

This file was deleted.

Loading

0 comments on commit 45c0312

Please sign in to comment.