Skip to content
Merged
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
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

64 changes: 64 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite/biome/core", "ultracite/biome/vitest"],
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": ["src/**", "!**/lib", "!**/coverage"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"arrowParentheses": "asNeeded",
"semicolons": "always"
}
},
"linter": {
"rules": {
"style": {
// ESLint config left default-export preference unset.
"noDefaultExport": "off",
// The checksum logic uses String.prototype.substring (not the
// deprecated substr); converting to slice changes edge-case
// semantics, so keep substring in this validation library.
"noSubstr": "off",
// Files are named after their exported validator (validateCPF.ts);
// renaming would break the public import paths and git history.
"useFilenamingConvention": "off",
// tsconfig targets es2016; String.prototype.at() is es2022, so keep
// charAt(length - 1) for runtime compatibility of the published lib.
"useAtIndex": "off"
},
"performance": {
// src/index.ts and ie/index.ts are intentional public-API barrels.
"noBarrelFile": "off"
}
}
},
"overrides": [
{
// ie/index.ts builds a UF->validator registry by name from the states
// module; the namespace import + dynamic access is the intended shape.
"includes": ["src/validations/ie/index.ts"],
"linter": {
"rules": {
"performance": {
"noNamespaceImport": "off",
"noDynamicNamespaceImportAccess": "off"
}
}
}
}
]
}
58 changes: 0 additions & 58 deletions eslint.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://lefthook.dev/configuration/
pre-commit:
jobs:
- name: biome
glob: '**/*.{js,jsx,ts,tsx,json,jsonc}'
run: pnpm biome check --write --no-errors-on-unmatched {staged_files}
stage_fixed: true
32 changes: 8 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,27 @@
],
"scripts": {
"build": "tsdown",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint --ext .js,.jsx,.ts,.tsx ./src",
"format": "biome format --write ./src",
"lint": "biome check ./src",
"lint:fix": "biome check --write ./src",
"test": "vitest",
"coverage": "vitest run --coverage",
"test:e2e": "pnpm build && cd examples && pnpm install --ignore-workspace && pnpm start",
"release": "release-it"
"release": "release-it",
"prepare": "lefthook install"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^10.0.1",
"@biomejs/biome": "2.5.0",
"@release-it/conventional-changelog": "^11.0.1",
"@types/jest": "^30.0.0",
"@typescript-eslint/eslint-plugin": "^8.62.0",
"@typescript-eslint/parser": "^8.62.0",
"@vitest/coverage-v8": "^4.1.9",
"esbuild": "^0.28.1",
"eslint": "^10.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.6",
"globals": "^17.7.0",
"husky": "^9.1.7",
"lint-staged": "^17.0.8",
"prettier": "^3.8.4",
"lefthook": "^2.1.9",
"release-it": "^20.2.0",
"release-it-pnpm": "^4.6.6",
"tsdown": "^0.22.3",
"typescript": "^6.0.3",
"ultracite": "^7.8.3",
"vite": "^8.0.16",
"vitest": "^4.1.9"
},
"lint-staged": {
"*.{js,json,jsx,ts,tsx}": [
"eslint",
"prettier --check"
]
}
}
Loading