Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm run format:check
- run: pnpm run lint
- run: pnpm run typecheck

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- run: pnpm install --frozen-lockfile
- run: npm install -g npm@latest
- run: npm publish
- run: pnpm publish

publish-jsr:
runs-on: ubuntu-latest
Expand Down
49 changes: 49 additions & 0 deletions .oxfmtrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"sortImports": {
"newlinesBetween": false,
},
"sortPackageJson": {
"sortScripts": true,
},
"htmlWhitespaceSensitivity": "css",
"ignorePatterns": [
"**/node_modules/**",
"**/dist/**",
"pnpm-lock.yaml",
"**/*.min.*",
"**/tests/fixtures/**",
],
"insertFinalNewline": true,
"jsxSingleQuote": true,
"objectWrap": "preserve",
"overrides": [
{
"files": ["**/*.{css,scss}"],
"options": {
"singleQuote": false,
},
},
{
"files": ["**/*.html"],
"options": {
"singleAttributePerLine": false,
},
},
],
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": false,
"singleAttributePerLine": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"vueIndentScriptAndStyle": false,
}
136 changes: 136 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"eslint",
"import",
"jsdoc",
"node",
"promise",
"oxc",
"typescript",
"unicorn"
],
"categories": {
"correctness": "error",
"suspicious": "warn",
"pedantic": "warn",
"perf": "warn",
"style": "warn",
"restriction": "warn"
},
"ignorePatterns": [
"**/dist/**",
"**/node_modules/**",
"**/tests/fixtures/**"
],
"rules": {
"capitalized-comments": "off",
"no-ternary": "off",
"sort-imports": "off",
"max-lines-per-function": [
"warn",
{
"max": 200,
"skipComments": true,
"skipBlankLines": true
}
],
"import/group-exports": "off",
"import/no-named-export": "off",
"import/prefer-default-export": "off",
"import/no-nodejs-modules": "off",
"import/no-relative-parent-imports": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"oxc/no-map-spread": "off",
"oxc/no-optional-chaining": "off",
"oxc/no-rest-spread-properties": "off",
"typescript/explicit-function-return-type": "off",
"unicorn/filename-case": "off",
"unicorn/no-process-exit": "off",
"unicorn/prefer-module": "off",
"id-length": [
"warn",
{
"min": 2,
"max": 30,
"properties": "never",
"exceptions": [
// Compare
"a",
"b",
// Loop
"i",
"v",
// Generic types
"T",
// Unused vars
"_",
"$"
]
}
],
"func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
"no-duplicate-imports": [
"warn",
{
"allowSeparateTypeImports": true,
"includeExports": true
}
],
"no-magic-numbers": [
"warn",
{
"ignore": [0, 1, -1],
"ignoreArrayIndexes": true,
"enforceConst": true,
"detectObjects": false
}
]
},
"overrides": [
{
"files": ["scripts/**/*.{js,ts}"],
"rules": {
"import/no-nodejs-modules": "off",
"import/prefer-default-export": "off",
"import/no-named-export": "off"
}
},
{
"files": ["**/*.config.{ts,mjs}"],
"rules": {
"import/no-default-export": "off"
}
},
{
"files": ["*.d.ts"],
"rules": {
// to extend existing modules, import/export must not appear in declaration files at top level
"import/unambiguous": "off",
// we need `export {}` to convert a file to a module
"unicorn/require-module-specifiers": "off"
}
},
{
"files": ["*.{spec,test}.{js,ts,tsx}", "*.{spec,test}-d.{ts,tsx}"],
"plugins": ["vitest"],
"rules": {
"id-length": "off",
"max-classes-per-file": "off",
"max-lines-per-function": "off",
"max-lines": "off",
"max-statements": "off",
"no-empty-function": "off",
"no-magic-numbers": "off",
"no-undefined": "off",
"import/no-nodejs-modules": "off",
"typescript/ban-ts-comment": "off",
"typescript/no-non-null-assertion": "off",
"typescript/prefer-ts-expect-error": "off",
"typescript/require-array-sort-compare": "off",
"vitest/no-importing-vitest-globals": "off"
}
}
]
}
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"recommendations": [
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"oxc.oxc-vscode",
"typescriptteam.native-preview"
]
}
29 changes: 9 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
{
"eslint.enable": true,
"prettier.enable": true,
"oxc.enable": true,
"eslint.enable": false,
"prettier.enable": false,
"editor.formatOnSave": true,
"prettier.configPath": "./prettier.config.mjs",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never",
"source.sortImports": "never"
"source.fixAll.oxc": "explicit"
},
"eslint.validate": [
"vue",
"yaml",
"toml",
"json",
"jsonc",
"json5",
"markdown",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact"
],
"typescript.experimental.useTsgo": true,
"cSpell.words": [
"bumpp",
"changelogithub",
"codecov",
"esbuild",
"lcov",
"oxfmt",
"oxlint",
"pnpm",
"tsdown",
"tsgo",
"unrs",
"vite",
"vitepress",
Expand Down
9 changes: 0 additions & 9 deletions eslint.config.mjs

This file was deleted.

55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"name": "uncase",
"type": "module",
"version": "0.2.0",
"packageManager": "pnpm@10.26.2",
"description": "Wrapper of change-case to create case converter, validator and etc.",
"keywords": [
"camelCase",
Expand All @@ -21,16 +19,23 @@
"trainCase",
"validate"
],
"homepage": "https://github.com/ntnyq/uncase#readme",
"bugs": {
"url": "https://github.com/ntnyq/uncase/issues"
},
"license": "MIT",
"author": {
"name": "ntnyq",
"email": "ntnyq13@gmail.com"
},
"homepage": "https://github.com/ntnyq/uncase#readme",
"repository": "ntnyq/uncase",
"bugs": {
"url": "https://github.com/ntnyq/uncase/issues"
},
"files": [
"dist"
],
"type": "module",
"sideEffects": false,
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -42,47 +47,43 @@
"default": "./dist/is.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"scripts": {
"build": "tsdown",
"coverage": "vitest --coverage",
"dev": "tsdown --watch",
"lint": "eslint",
"format": "oxfmt",
"format:check": "oxfmt --check",
"lint": "oxlint",
"prepare": "husky",
"prepublishOnly": "pnpm run build",
"release": "run-s release:check release:version",
"release:check": "run-s lint typecheck test",
"release:check": "run-s format:check lint typecheck test",
"release:version": "bumpp",
"test": "vitest",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"change-case": "^5.4.4"
},
"devDependencies": {
"@ntnyq/eslint-config": "^5.8.0",
"@ntnyq/prettier-config": "^3.0.1",
"@types/node": "^25.0.3",
"@vitest/coverage-v8": "^4.0.16",
"bumpp": "^10.3.2",
"eslint": "^9.39.2",
"@types/node": "^25.5.0",
"@typescript/native-preview": "^7.0.0-dev.20260322.1",
"@vitest/coverage-v8": "^4.1.0",
"bumpp": "^11.0.1",
"husky": "^9.1.7",
"nano-staged": "^0.9.0",
"npm-run-all2": "^8.0.4",
"prettier": "^3.7.4",
"tsdown": "^0.18.3",
"typescript": "^5.9.3",
"vitest": "^4.0.16"
"oxfmt": "^0.41.0",
"oxlint": "^1.56.0",
"tsdown": "^0.21.4",
"vitest": "^4.1.0"
},
"nano-staged": {
"*.{js,ts,mjs,cjs,md,yml,yaml,json}": "eslint --fix"
}
"*.{js,ts,mjs,tsx}": "oxlint --fix",
"*": "oxfmt --no-error-on-unmatched-pattern"
},
"packageManager": "pnpm@10.32.1"
}
Loading
Loading