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

@toznysecure/eslint-config

v1.0.0

Published

A shared eslint config for Tozny.

Downloads

52

Readme

Tozny's ESLint configs

Eslint is a linting engine for javascript that enforces good coding practices and prevents potential bugs. These are the rules tozny uses across our javascript repositories.

Install

npm install -D eslint @toznysecure/eslint-config

Use

This repo contains different configs for different purposes. Depending on the type of project, you'll use a different config, potentially with some additional dependencies. We have you manually install these packages to reduce the bloat of adding things your project type may not need.

Add a file named .eslintrc to your repo with the following contents (depending on your project).

After that, you're all set up! Add a lint script to your package.json and make sure your editor is configured to respect your new linting configuration. (TODO @pirtleshell)

Javascript Library

{
  "extends": "@toznysecure"
}

Typescript Library

Additional required dependencies: npm i -D typescript typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin

{
  "extends": "@toznysecure/eslint-config/typescript"
}

Vue App

Additional required dependencies: npm i -D eslint-plugin-vue @vue/cli-plugin-eslint

{
  "extends": "@toznysecure/eslint-config/vue"
}

A note about linting

We use prettier for formatting and style enforcement. This eslint config uses the prettier eslint config to turn off all styling rules in eslint that may conflict with prettier. We use eslint for its code health improvement powers, not for styling!

If you find yourself fighting a styling or formatting thing, you'll want to combat that with prettier rules, not in this repo.

A good rule of thumb: "Prettier for formatting, linters for catching bugs"

A note about peer dependencies

In true node toolchain fashion, dependency patterns are frustrating and not all features are supported everywhere. Despite optionalPeerDependencies being a thing package.jsons support, it seems ESLint wants to pretend they don't exist. For this reason, some packages like the typescript parser & the vue config are listed under peerDependencies despite being optional. This is because they do not get properly resolved otherwise.

If you happen to get errors regarding a peer dependency not existing that has no bearing on your project type, they can be safely ignored.