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

eslint-plugin-imports-whitespace-bezier-curve

v1.0.4

Published

an eslint plugin for import whitespace to follow a bezier curve

Downloads

14

Readme

eslint-plugin-imports-whitespace-bezier-curve

A silly little ESLint plugin to enforce that the import statements in a file follow a predefined cubic Bezier curve.

If you use Prettier, this plugin will conflict with it. But that's part of the fun 😈

View on npm

Install

$ pnpm i eslint-plugin-imports-whitespace-bezier-curve --save-dev

If you haven't already, set up ESLint in your project.

Add the plugin & rule to your ESLint config (.eslintrc.json):

{
  "plugins": ["eslint-plugin-imports-whitespace-bezier-curve"],
  "rules": {
    "imports-whitespace-bezier-curve/imports-whitespace-bezier-curve": "warn"
  }
}

Example

import { NextPage } from "next";
import { useEffect, useState, useMemo } from "react";
import Head from "next/head";
import { GetStaticProps } from "next";

import Hero from "../components/hero";
import Email from "../components/email";
import Community from "../components/community";
import Workshops from "../components/workshops";
import HackNight from "../components/hack-night";
import JoinUs from "../components/join-us";
import { IEvent } from "../utils/interfaces/SanityEvent";

import { DraggableContext } from "../context/DraggableContext";
import { fetchEvents } from "../utils/fetchEvents";
import Footer from "../components/footer";

this becomes:

import Head from 'next/head';
import    { NextPage } from 'next';
import       { GetStaticProps } from 'next';
import         Hero from '../components/hero';
import          Email from '../components/email';
import          Footer from '../components/footer';
import          JoinUs from '../components/join-us';
import           Community from '../components/community';
import           Workshops from '../components/workshops';
import           HackNight from '../components/hack-night';
import            { fetchEvents } from '../utils/fetchEvents';
import              { useEffect, useState, useMemo } from 'react';
import                 { IEvent } from '../utils/interfaces/SanityEvent';
import                     { DraggableContext } from '../context/DraggableContext';

The more import statements you have, the higher "resolution" the curve becomes.

import Test1 from "a";
import Test2 from "bv";
import Test3 from "ckj";
import Test4 from "dqwe";
import Test5 from "fniru";
import Test6 from "gtshjy";
import Test7 from "haklsdh";
import Test8 from "ipmjelqs";
import Test9 from "jdmwekfle";
import Test10 from "kjawioefjw";
import Test11 from "lheuaklsjfl";
import Test13 from "nahdslieurnb";
import Test12 from "mgdlqwejtskj";
import Test14 from "ogdkwmeurkfhd";
import Test15 from "pxnfhekjslfheu";
import Test16 from "qamjdhwuierkhfn";
import Test17 from "rqnsgldkwmeufhls";
import Test18 from "siqhekjdwmurflgl";
import Test19 from "tjwhedklweurflhwe";
import Test20 from "ukdhslwekjrfhlweju";
import Test21 from "vsndlkwjeurhflejrh";
import Test22 from "wjdkshlekwurhflejsd";
import Test23 from "xahdksjlekwjhrflejwr";
import Test24 from "yksjdhfkjwehrfkjwehr";
import Test25 from "zkjshdfkjwehrfkljwehrf";

this becomes:

import Test1 from 'a';
import   Test2 from 'bv';
import      Test3 from 'ckj';
import        Test4 from 'dqwe';
import         Test5 from 'fniru';
import           Test6 from 'gtshjy';
import           Test7 from 'haklsdh';
import            Test8 from 'ipmjelqs';
import             Test9 from 'jdmwekfle';
import             Test10 from 'kjawioefjw';
import             Test11 from 'lheuaklsjfl';
import             Test13 from 'nahdslieurnb';
import             Test12 from 'mgdlqwejtskj';
import             Test14 from 'ogdkwmeurkfhd';
import             Test15 from 'pxnfhekjslfheu';
import             Test16 from 'qamjdhwuierkhfn';
import             Test17 from 'rqnsgldkwmeufhls';
import              Test18 from 'siqhekjdwmurflgl';
import               Test19 from 'tjwhedklweurflhwe';
import               Test20 from 'ukdhslwekjrfhlweju';
import                 Test21 from 'vsndlkwjeurhflejrh';
import                  Test22 from 'wjdkshlekwurhflejsd';
import                    Test23 from 'xahdksjlekwjhrflejwr';
import                       Test24 from 'yksjdhfkjwehrfkjwehr';
import                          Test25 from 'zkjshdfkjwehrfkljwehrf';