npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2024 โ€“ย Pkg Stats / Ryan Hefner

@jellydn/eslint-fixer

v0.3.1

Published

<h1 align="center">Welcome to @jellydn/eslint-fixer ๐Ÿ‘‹</h1>

Downloads

25

Readme

Prerequisites

  • Node.js >= 18.20.0 or later

Motivation

We will continue to use @typescript-eslint/parser and @typescript-eslint/eslint-plugin to lint TypeScript files until this issue โ˜‚๏ธ Type-aware linter ยท Issue #3187 ยท biomejs/biome is resolved.

Enabled rules

The following rules are enabled to effectively lint TypeScript files:

{
  "@typescript-eslint/await-thenable": "error",
  "@typescript-eslint/no-floating-promises": "error",
  "@typescript-eslint/no-for-in-array": "error",
  "@typescript-eslint/no-misused-promises": "error",
  "@typescript-eslint/no-redundant-type-constituents": "error",
  "@typescript-eslint/no-unnecessary-type-assertion": "error",
  "@typescript-eslint/require-await": "error"
}

Usage

# Install eslint-fixer
npm install -g @jellydn/eslint-fixer

# Or Run eslint-fixer
npx @jellydn/eslint-fixer "examples/**/*.ts,examples/**/*.tsx"

How to use with Neovim

To use eslint-fixer with lazy.nvim and nvim-lint, you should define as a custom linter:

return {
  {
    "mfussenegger/nvim-lint",
    event = "VeryLazy",
    opts = {},
    init = function()
      -- Register customer linter
      require("lint").linters.eslint_fixer = {
        name = "eslint_fixer",
        cmd = "eslint-fixer", -- e.g: npm install -g @jellydn/eslint-fixer
        stdin = false,
        stream = "stdout",
        ignore_exitcode = true,
        parser = function(output, bufnr)
          local trimmed_output = vim.trim(output)
          if trimmed_output == "" then
            return {}
          end
          -- Skip if Parsing error on output
          if string.match(trimmed_output, "Parsing error") then
            return {}
          end

          -- Parse output base on Eslint errorformat
          local diagnostic = require("lint.parser").from_errorformat("%f %l:%c %m", {
            error = vim.diagnostic.severity.ERROR,
          })(trimmed_output, bufnr)

          return diagnostic
        end,
      }
    end,
    config = function(_, opts)
      -- Your setup here
    end,
    keys = {
      {
        -- Run lint by name
        "<leader>rl",
        function()
          local items = {
            -- Eslint fixer
            "eslint_fixer", -- npm install -g @jellydn/eslint-fixer
          }

          vim.ui.select(items, {
            prompt = "Select Linter to run",
          }, function(choice)
            if choice ~= nil then
              run_linter_by(choice)
            end
          end)
        end,
        desc = "Run Nvim Lint",
      }
    }
  },
}

GitHub Actions

To use eslint-fixer in GitHub Actions, follow these steps:

name: ESLint Fixer

on:
  push:
    branches:
      - main

jobs:
  eslint-fixer:
    name: ESLint Fixer
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx --yes @jellydn/[email protected] "examples/**/*.ts" # change to the latest release
  oxlint:
    name: Lint JS
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx --yes [email protected] --deny-warnings # change to the latest release
  quality:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Biome
        uses: biomejs/setup-biome@v2
        with:
          version: latest
      - name: Run Biome
        run: biome ci .

How to publish

make release

Resources

Author

๐Ÿ‘ค Dung Huynh

Show your support

Give a โญ๏ธ if this project helped you!

kofi paypal buymeacoffee