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

@porscheofficial/eslint-config-porschedigital-base

v4.0.0

Published

This package provides Porsche Digital's eslint-config as an extensible shared config.

Downloads

1,273

Readme

@porscheofficial/eslint-config-porschedigital-base

This package provides the base ESLint config as an extensible shared component.

✅ Intended Projects

🔧 Configure Project

  1. Install with peerDependencies:
  npm info "@porscheofficial/eslint-config-porschedigital-base" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add --dev "@porscheofficial/eslint-config-porschedigital-base"
  1. Create or update /.eslintrc:
{
  "extends": "@porscheofficial/eslint-config-porschedigital-base"
}
  1. [Optional] Add prettier config:
yarn add --dev --exact prettier @porscheofficial/prettier-config-porschedigital

Update package.json:

{
  "prettier": "@porscheofficial/prettier-config-porschedigital"
}
  1. [Optional] Add scripts to ./package.json:
"scripts": {
  "eslint:ci": "eslint src/ --ext .js,.jsx,.tsx,.ts -f stylish",
  "eslint:fix": "eslint src/ --fix --ext .js,.jsx,.tsx,.ts  -f stylish --quiet",
  "prettier:ci": "prettier --check ./",
  "prettier:fix": "prettier --write ./"
}
  1. [Optional] Enable eslint autofix:

if(ide === "vscode") update ./.vscode/settings.json:

Requires Prettier Plugin esbenp.prettier-vscode Requires ESLint Plugin: dbaeumer.vscode-eslint

// .vscode/settings.json
{
 "editor.codeActionsOnSave": {
     "source.fixAll.eslint": true
 },
 "eslint.validate": [
     "html",
     "javascript",
     "typescript",
     "typescript",
 ],
 "editor.formatOnSave": true,
 "[javascript]": {
     "editor.formatOnSave": false
 },
 "[javascriptreact]": {
     "editor.formatOnSave": false
 },
 "[typescript]": {
     "editor.formatOnSave": false
 },
 "[typescriptreact]": {
     "editor.formatOnSave": false
 }
}

Errors

ESLint couldn't find the plugin "eslint-plugin-jest"

Unfortunately eslint doesn't officially support plugins as dependencies in shareable configs (See eslint#3458). The result is, that eslint doesn't find these plugins. However, we want this package to be as convient to use as possible, so we don't plan to add these plugins as peerDependencies.

If you see a complain like "eslint-plugin-jest", simply install this dependency explicitly:

yarn add --dev --exact eslint-plugin-jest

With more recent package managers, dependencies are installed in a flat way. That means, that dependencies and secondary dependencies are installed directly in the top level node_modules directory (See how npm3 works).

Parsing error: Cannot read file [...]tsconfig

Reference directly to your .tsconfig.

//.eslintrc
{
  // ...
      "parserOptions": {
      "project": "./tsconfig.json"
    },
 // ...
}

License

See LICENSE.