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

@3angletech/eslint-config

v15.0.2

Published

Shareable lint configuration library

Downloads

755

Readme

@3angletech/eslint-config

Shareable lint configuration library maintained by the 3angleTech team.

Usage in Node.js projects

Install latest compatible version of required peer dependencies:

npm install --save-dev @typescript-eslint/eslint-plugin@4 @typescript-eslint/parser@4 eslint@7 eslint-config-standard@16 eslint-plugin-import@2 eslint-plugin-jsdoc@36 eslint-plugin-node@11 eslint-plugin-promise@5 eslint-plugin-security@1 eslint-plugin-sonarjs@0 typescript@4

Create a new .eslintrc.json next to the tsconfig.json file:

{
  "root": true,
  "extends": [
    "@3angletech/lint/node"
  ],
  "rules": {
    "___IDE_OVERRIDES_GO_HERE___": true
  }
}

NOTE: The keys containing ___ are comments for documentation purposes.

Provide a new .eslintrc.ci.json file:

{
  "extends": [
    ".eslintrc.json"
  ],
  "rules": {
    "___CI_OVERRIDES_GO_HERE___": true
  }
}

The .eslintrc.ci.json may contain rule overrides for the lint command to pass while transitioning to stricter rules.

Lint using:

{
  "scripts": {
    "lint": "eslint --ext=.js,.ts ./src",
    "lint:ci": "eslint --config=.eslintrc.ci.json --no-eslintrc --ext=.js,.ts ./src",
    "lint:fix": "eslint --ext=.js,.ts --fix ./src",
  }
}

Usage in Angular projects

Install latest compatible version of required peer dependencies:

npm install --save-dev @typescript-eslint/eslint-plugin@4 @typescript-eslint/parser@4 eslint@7 eslint-config-standard@16 eslint-plugin-import@2 eslint-plugin-jsdoc@36 eslint-plugin-node@11 eslint-plugin-promise@5 eslint-plugin-security@1 eslint-plugin-sonarjs@0 typescript@4
npm install --save-dev @angular-eslint/eslint-plugin@12 @angular-eslint/eslint-plugin-template@12 @angular-eslint/template-parser@12 eslint-plugin-rxjs@3 stylelint@13 stylelint-config-sass-guidelines@8 stylelint-config-standard@22

Update your project ($NAME) in angular.json to include a project.$NAME.architect.lint path with:

{ "projects": { "$NAME": { "architect": {
  "lint": {
    "builder": "@angular-eslint/builder:lint",
    "options": {
      "eslintConfig": ".eslintrc.json",
      "lintFilePatterns": [ "src/**/*.ts", "src/**/*.html" ]
    },
    "configurations": {
      "fix": { "fix": true }
    }
  }
} } } }

Provide a new .eslintrc.json file:

{
  "root": true,
  "extends": [
    "@3angletech/eslint-config/angular"
  ],
  "rules": {
    "___COMMON_JS_AND_TS_OVERRIDES_GO_HERE___": true
  },
  "overrides": [
    {
      "files": [ "*.ts" ],
      "___OPTIONAL_TSCONFIG_OVERRIDE___parserOptions": { "project": [ "tsconfig.json" ] },
      "rules": {
        "___TS_ONLY_OVERRIDES_GO_HERE___": true
      }
    },
    {
      "files": [ "*.html" ],
      "rules": {
        "___TEMPLATE_ONLY_OVERRIDES_GO_HERE___": true
      }
    }
  ]
}

NOTE: Rules that don't apply to all file types should be included in "overrides" and contain a file extension filter.

To use the StyleLint rules, update .stylelintrc to include:

{
  "extends": [
    "@3angletech/lint/style"
  ],
  "rules": {
  }
}

Lint using:

npx ng lint && npx stylelint 'src/**/*.*css'

Or add some extra package.json scripts:

{
  "scripts": {
    "lint": "npm run lint:code; npm run lint:style",
    "lint:code": "ng lint",
    "lint:code:fix": "ng lint --configuration=fix",
    "lint:style": "stylelint 'src/**/*.*css'",
    "lint:style:fix": "stylelint --fix 'src/**/*.*css'"
  }
}

More information