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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-config-htmlacademy

v11.0.0

Published

ESLint Config for HTML Academy CODEGUIDE

Readme

ESLint Config for HTML Academy Codeguide

npm version test license

ESLint configuration for JavaScript and TypeScript validation according to HTML Academy Codeguide.

Requirements

  • Node.js >= 24
  • ESLint >= 10

Installation

npm install -D eslint eslint-config-htmlacademy

Usage

Create eslint.config.js in your project root and import the preset you need:

import preset from 'eslint-config-htmlacademy/<preset-name>';

export default [
  ...preset,
];

Presets

| Preset | Use case | | --- | --- | | vanilla | Plain JavaScript in the browser (widgets, vanilla apps) | | typescript | TypeScript in the browser without a framework | | node | Node.js (plain JavaScript) | | node-typescript | Node.js with TypeScript | | react | React, Vue or Angular without TypeScript | | react-typescript | React, Vue or Angular with TypeScript |

TypeScript presets enable type-aware rules and require a valid tsconfig.json.

Key Features

  • Modern style — single quotes, trailing comma required in multiline literals, function-call-spacing: 'never' (foo(), not foo ()), mandatory braces (curly: 'all'), 2-space indent. Backticks reserved for template literals with interpolation.
  • Defensive seteslint:recommended extended with the codeguide ruleset: error prevention (array-callback-return, no-promise-executor-return, require-await, no-self-compare, no-implicit-coercion, no-template-curly-in-string, no-throw-literal, default-param-last), variable hygiene (no-use-before-define, no-shadow with hoisting, no-undef-init), discipline (no-alert, no-console, no-eval, no-iterator, no-labels, no-with).
  • Modern syntaxprefer-const, no-var, prefer-template, prefer-arrow-callback, object-shorthand, prefer-rest-params, prefer-spread, prefer-object-has-own, prefer-object-spread, logical-assignment-operators.
  • Readabilityno-else-return, no-nested-ternary, no-unneeded-ternary, max-nested-callbacks: 3, one-var: 'never', consistent-return, dot-notation, yoda: 'never'.
  • TypeScripttypescript-eslint strictTypeChecked + stylisticTypeChecked sets (~150 type-aware rules). consistent-type-imports and consistent-type-exports enforced. no-unsafe-* reports as a warning for gradual any cleanup. parserOptions.projectService: true auto-discovers tsconfig.json, monorepo-friendly.
  • Node.jseslint-plugin-n v18 + eslint-plugin-unicorn recommended. Built-in objects must be imported (import process from 'node:process'); only console stays global. n/no-sync: error, n/no-process-env: warn (NODE_ENV allowed), unicorn/prefer-node-protocol: error.
  • React / Vue / Angular@eslint-react/eslint-plugin v5 + eslint-plugin-jsx-a11y recommended set: alt-text, label-has-associated-control, anchor-is-valid, role-has-required-aria-props, iframe-has-title, no-noninteractive-element-interactions, ARIA validators. Plus dom-no-missing-button-type, dom-no-missing-iframe-sandbox, dom-no-unsafe-target-blank, no-unstable-context-value, no-unstable-default-props. Full @stylistic/jsx-* formatting.
  • File namingKEBAB_CASE for *.{js,ts}; PASCAL_CASE for *.{jsx,tsx,vue} in React presets.

File Naming

Source filenames must match the case convention enforced by check-file:

src/utils/format-date.js          /* Valid: KEBAB_CASE */
src/components/Button.jsx         /* Valid: PASCAL_CASE for components */
src/components/Button.vue         /* Valid: PASCAL_CASE for components */

src/utils/formatDate.js           /* Invalid: camelCase */
src/components/button.jsx         /* Invalid: kebab-case for component */

Quoting

Single quotes everywhere; double quotes only to avoid escaping:

const message = 'hello';                  /* Valid */
const sentence = "It's working";          /* Valid: avoidEscape */
const greeting = `hello, ${name}`;        /* Valid: interpolation */

const title = "double quotes";            /* Invalid: prefer single */
const literal = `static string`;          /* Invalid: backticks without ${} */

In JSX attributes — double quotes:

<button type="button" className="primary">Send</button>

Imports in Node.js

Built-ins must come with the node: protocol; globals from node:buffer, node:process, etc., must be imported explicitly:

/* Valid */
import {readFile} from 'node:fs/promises';
import process from 'node:process';
import {Buffer} from 'node:buffer';

/* Invalid */
import {readFile} from 'fs/promises';     /* missing node: */
const cwd = process.cwd();                /* `process` not imported */
const buf = Buffer.from('hi');            /* `Buffer` not imported */

console is the only built-in still available as a global.

Extending

Add your own configuration objects after the spread:

import nodeTypescript from 'eslint-config-htmlacademy/node-typescript';

export default [
  ...nodeTypescript,
  {
    files: ['scripts/**/*.ts'],
    rules: {
      'no-console': 'off',
    },
  },
];

Editor Integration

Install the ESLint extension for VS Code.

For auto-fix on save, add to .vscode/settings.json:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }
}

Links