Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add biome.json and remove redundant config files #2181

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
138 changes: 0 additions & 138 deletions .eslintrc.js

This file was deleted.

9 changes: 3 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Linting
run: pnpm lint

- name: Prettier
run: pnpm check-format
- name: Linting and Formatting
run: pnpm style:check

- name: Check Types
run: pnpm check-types
Expand Down Expand Up @@ -168,4 +165,4 @@ jobs:
- uses: codecov/codecov-action@v4
with:
directory: coverage
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

128 changes: 128 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"maxSize": 10000000
},
"formatter": {
"indentStyle": "space",
"lineWidth": 120,
"ignore": ["**/node_modules", "**/build", "**/.idea", "**/coverage", "**/pnpm-lock.yaml", "**/.changeset"]
},
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
},
"formatter": {
"semicolons": "asNeeded",
"quoteStyle": "single",
"trailingCommas": "es5",
"lineWidth": 120,
"indentStyle": "space"
}
},
"json": {
"parser": {
"allowComments": true
}
},
"organizeImports": {
"enabled": true
},
"linter": {
"rules": {
"style": {
"useImportType": "error",
"useNodejsImportProtocol": "off",
"noNonNullAssertion": "error"
},
"correctness": {
"noUnusedImports": "error",
"noUndeclaredDependencies": "warn",
"noInvalidUseBeforeDeclaration": "error"
},
"suspicious": {
"noConfusingVoidType": "off",
"noConsole": "error",
"noUnsafeDeclarationMerging": "off"
},
"complexity": {
"noBannedTypes": "error"
},
"nursery": {
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"packages/*": "using imports from packages/* is not allowed"
}
}
}
}
}
},
"overrides": [
{
"include": ["packages/core/**"],
"linter": {
"rules": {
"style": {
"noRestrictedGlobals": {
"level": "error",
"options": {
"deniedGlobals": ["Buffer"]
}
}
}
}
}
},
{
"include": ["jest.config.ts", "./scripts/**"],
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "off"
}
}
}
},
{
"include": ["demo/**", "demo-openid/**"],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
}
}
}
},
{
"include": [
"*.test.ts",
"**/__tests__/**",
"jest.*.ts",
"samples/**",
"demo/**",
"demo-openid/**",
"scripts/**",
"**/tests/**",
"tests/**"
],
"linter": {
"rules": {
"correctness": {
"noUndeclaredDependencies": "off"
},
"nursery": {
"useImportRestrictions": "off"
}
}
}
}
]
}
28 changes: 6 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "credo-ts",
"private": true,
"license": "Apache-2.0",
"workspaces": [
"packages/*",
"demo",
"demo-openid",
"samples/*"
],
"workspaces": ["packages/*", "demo", "demo-openid", "samples/*"],
"packageManager": "[email protected]+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a",
"repository": {
"url": "https://github.com/openwallet-foundation/credo-ts",
Expand All @@ -17,50 +12,39 @@
"check-types": "pnpm check-types:build && pnpm check-types:tests",
"check-types:tests": "tsc -p tsconfig.test.json --noEmit",
"check-types:build": "pnpm -r --parallel exec tsc --noEmit",
"prettier": "prettier --ignore-path .prettierignore '**/*.+(js|json|ts|md|yml|yaml)'",
"format": "pnpm prettier --write",
"check-format": "pnpm prettier --list-different",
"style:check": "biome check --unsafe",
"style:fix": "biome check --write --unsafe",
"clean": "pnpm -r --parallel run clean",
"build": "pnpm -r --parallel run build",
"test:unit": "jest --testPathIgnorePatterns 'e2e.test.ts$'",
"test:e2e": "jest --testMatch '**/?(*.)e2e.test.ts'",
"test": "jest",
"lint": "eslint --ignore-path .gitignore .",
"validate": "pnpm lint && pnpm check-types && pnpm check-format",
"validate": "pnpm check-types && pnpm style:check",
"run-mediator": "ts-node ./samples/mediator.ts",
"release": "pnpm build && pnpm changeset publish --no-git-tag",
"changeset-version": "pnpm changeset version && pnpm format"
"changeset-version": "pnpm changeset version && pnpm style:fix"
},
"devDependencies": {
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.27.5",
"@hyperledger/aries-askar-nodejs": "^0.2.3",
"@jest/types": "^29.6.3",
"@types/bn.js": "^5.1.5",
"@types/cors": "^2.8.10",
"@types/eslint": "^8.21.2",
"@types/express": "^4.17.13",
"@types/jest": "^29.5.12",
"@types/node": "^18.18.8",
"@types/supertest": "^6.0.2",
"@types/uuid": "^9.0.1",
"@types/varint": "^6.0.0",
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"bn.js": "^5.2.1",
"cors": "^2.8.5",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-workspaces": "^0.8.0",
"express": "^4.17.1",
"jest": "^29.7.0",
"nock": "^14.0.0-beta.19",
"prettier": "^2.3.1",
"rxjs": "^7.8.0",
"supertest": "^7.0.0",
"ts-jest": "^29.1.2",
Expand Down
Loading
Loading