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

@nikhilrajnair/ng-configs

v1.1.0

Published

Shareable linting configurations (ESLint, Prettier, Stylelint) for Angular projects

Readme

Angular Linting Configs

Shareable linting configurations for Angular projects, including ESLint, Prettier, and Stylelint configurations.

Installation

Install this package along with its peer dependencies:

npm install --save-dev @nikhilrajnair/ng-configs \
  @angular-eslint/eslint-plugin@^18.0.0 \
  @angular-eslint/eslint-plugin-template@^18.0.0 \
  @angular-eslint/template-parser@^18.0.0 \
  @typescript-eslint/eslint-plugin@^7.0.0 \
  @typescript-eslint/parser@^7.0.0 \
  eslint@^8.57.0 \
  prettier@^3.0.0 \
  stylelint@^16.0.0 \
  stylelint-config-standard@^36.0.0 \
  stylelint-config-standard-scss@^13.0.0

Usage

ESLint Configuration

Create or update your .eslintrc.js file in your Angular project:

module.exports = {
  extends: ['./node_modules/@nikhilrajnair/ng-configs/eslint.config.js'],
  // Override or add your custom rules here
  rules: {
    // Your custom rules
  },
};

Alternatively, you can use .eslintrc.json:

{
  "extends": ["./node_modules/@nikhilrajnair/ng-configs/eslint.config.js"],
  "rules": {
    // Your custom rules
  }
}

Prettier Configuration

Create a .prettierrc.js file in your Angular project:

module.exports = {
  ...require('@nikhilrajnair/ng-configs/prettier.config.js'),
  // Override or add your custom options here
  // printWidth: 120,
};

Or use .prettierrc.json:

{
  "extends": ["@nikhilrajnair/ng-configs/prettier.config.js"]
}

Or reference it directly in package.json:

{
  "prettier": "@nikhilrajnair/ng-configs/prettier.config.js"
}

Stylelint Configuration

Create a stylelint.config.js file in your Angular project:

module.exports = {
  extends: ['@nikhilrajnair/ng-configs/stylelint.config.js'],
  // Override or add your custom rules here
  rules: {
    // Your custom rules
  },
};

Or use .stylelintrc.json:

{
  "extends": ["@nikhilrajnair/ng-configs/stylelint.config.js"],
  "rules": {
    // Your custom rules
  }
}

Configuration Details

ESLint

The ESLint configuration includes:

  • Recommended ESLint rules
  • TypeScript ESLint rules
  • Angular-specific linting rules
  • Template linting for Angular components
  • Accessibility checks for templates

Prettier

The Prettier configuration includes:

  • 100 character line width
  • 2 space indentation
  • Single quotes
  • Trailing commas (ES5)
  • Line feed (LF) line endings
  • Special handling for Angular HTML templates

Stylelint

The Stylelint configuration includes:

  • Standard CSS/SCSS rules
  • Angular-specific selector support (ng-deep, component selectors)
  • Tailwind CSS support (optional)

Customization

All configurations are designed to be extendable. You can override any rule by specifying it in your project's configuration file.

Example of overriding ESLint rules:

module.exports = {
  extends: ['./node_modules/@nikhilrajnair/ng-configs/eslint.config.js'],
  rules: {
    '@angular-eslint/component-selector': [
      'error',
      {
        type: 'element',
        prefix: 'myapp', // Custom prefix instead of 'app'
        style: 'kebab-case',
      },
    ],
  },
};

NPM Scripts

Add these scripts to your package.json for easy linting:

{
  "scripts": {
    "lint": "ng lint",
    "lint:fix": "ng lint --fix",
    "format": "prettier --write \"src/**/*.{ts,html,css,scss,json}\"",
    "format:check": "prettier --check \"src/**/*.{ts,html,css,scss,json}\"",
    "stylelint": "stylelint \"src/**/*.{css,scss}\"",
    "stylelint:fix": "stylelint \"src/**/*.{css,scss}\" --fix"
  }
}

Publishing

To publish this package:

  1. Update the version in package.json:

    npm version patch  # or minor, or major
  2. Publish to NPM:

    npm publish

License

MIT