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

@exercism/eslint-config-tooling

v0.4.0

Published

ESLint configuration for various pieces of tooling on Exercism

Downloads

90

Readme

@exercism/eslint-config-tooling

This is the shared eslint configuration used by various pieces of tooling, such as the JavaScript Analyzer, Representer, and Test Runner. The same configuration is used for the TypeScript tooling as well as various other pieces of technology. Shareable configs are designed to work with the extends feature of .eslintrc files. This means you can use the same configuration Exercism uses in your own projects!

Usage

To use the configuration for students, open your eslint configuration file, and add the following value to extends. For example, for JSON based configuration files:

{
  "extends": "@exercism/eslint-config-tooling"
}

Configuration

Find the configuration here. It's goal is to help detect and prevent common problems, and enforce a consistent code style.

The rules are based on:

It also includes the prettier plugin because we use prettier to achieve consistent code formatting. This plugin turns off rules that conflict with formatting.

Because most of the tooling is primarily focussing on running on Node, only node and es2021 are turned on as environment, but when extending this configuration, you can add more (or turn those off).

Type-based rules

In order to be able to use type information in the eslint rules, the appropiate parser option must be set.

{
  "parserOptions": {
    "tsconfigRootDir": __dirname,
    "project": ["./tsconfig.json"]
  }
}

"tsconfigRootDir": __dirname, is not required, but allows your editor to not infer this value, which it almost always does incorrectly, especially when you do not open the repository at git root / location of the .eslint configuration file. Setting the tsconfigRootDir forces the root directory for eslint to be the value given, and stop the editor and editor plugins from inferring the value. Setting it to a value of __dirname is only available in JavaScript based configuration files.

Setup with multiple tsconfig.json and ts-paths

When working with multiple folders and a composite tsconfig.json structure and/or using the compilerOptions with paths, you might have difficulty resolving issues around it not being able to find files, definitions, and more. A common problem is eslint complaining about files not being present or included in the configuration. Another common problem is types reporting as any to eslint, even when they do resolve inside the editor.

An easy way to resolve this is to create a new tsconfig.eslint.json that includes all the files in the project, including the test files. That tsconfig.eslint.json should then be referred in project, instead of the regular configuration file. You can check out the JavaScript Analyzer for an example.