diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 214ad04..314a270 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: github-actions - directory: "/" + directory: '/' schedule: interval: monthly labels: @@ -11,7 +11,7 @@ updates: prefix-development: chore(deps-dev) - package-ecosystem: npm - directory: "/" + directory: '/' schedule: interval: monthly open-pull-requests-limit: 10 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7fe5834..bb4039b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: 'CodeQL' on: push: @@ -20,16 +20,16 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] steps: - - name: Checkout repository - uses: actions/checkout@v5 + - name: Checkout repository + uses: actions/checkout@v5 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/README.md b/README.md index 0729099..75c3029 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ npm install --save remove-undefined-objects ```js import removeUndefinedObjects from 'remove-undefined-objects'; -console.log(removeUndefinedObjects({key: [], key2: 123})); +console.log(removeUndefinedObjects({ key: [], key2: 123 })); // { key2: 123 } ``` @@ -23,14 +23,14 @@ console.log(removeUndefinedObjects({key: [], key2: 123})); Any items with the following value will be removed: -* Empty object, `{}` -* Empty array, `[]` -* Undefined, `undefined` +- Empty object, `{}` +- Empty array, `[]` +- Undefined, `undefined` The following items will NOT be removed: -* Empty string, `''` -* Null, `null` +- Empty string, `''` +- Null, `null` ## Options @@ -42,6 +42,6 @@ If provided, the empty string `''` and `null` will be removed as well. ```js import removeUndefinedObjects from 'remove-undefined-objects'; -console.log(removeUndefinedObjects({key1: null, key2: 123, key3: ''}), {removeAllFalsy: true}); +console.log(removeUndefinedObjects({ key1: null, key2: 123, key3: '' }), { removeAllFalsy: true }); // { key2: 123 } ``` diff --git a/package.json b/package.json index 1038d87..006250b 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ }, "scripts": { "build": "tsup", - "lint": "tsc --noEmit && biome check", + "lint": "tsc --noEmit && biome check && prettier --check .", "prebuild": "rm -rf dist/", "prepack": "npm run build", "pretest": "npm run lint", - "prettier": "prettier --list-different --write \"./**/**.{js,ts}\"", + "prettier": "prettier --check --write .", "test": "vitest run --coverage" }, "devDependencies": {