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

@spyrosoft/spyro-eslint-plugin

v2.1.3

Published

[Nx](https://nx.dev) plugin for setting up [ESlint](https://www.npmjs.com/package/eslint) & [Prettier](https://www.npmjs.com/package/prettier) in your monorepo.

Downloads

779

Readme

Spyrosoft ESlint Plugin

Nx plugin for setting up ESlint & Prettier in your monorepo.

Table of Contents

Requirements

This plugin can only be installed in an already existing Nx monorepo. Nx version 16.3.2 or higher is required.

Usage

First, install this plugin in your monorepo as a dev dependency:

npm i @spyrosoft/spyro-eslint-plugin --save-dev

Then, run the setup generator:

nx g @spyrosoft/spyro-eslint-plugin:setup

A couple of questions will be prompted to you. Once you answer all of them, the plugin will setup our eslint config in your monorepo.

If you wish to run the generator without having to answer prompted question, you can provide all necessary information as a command line arguments:

  • extend - extend your ESlint config with our rules, or overwrite it [true | false]

If true, it will simply add our config package to an already existing config, e.g.

{
  ...some other config,
  "extends": [...some other packages, "@spyrosoft/eslint-config-spyro"]
}

If false, it will replace the entire .eslintrc.json file content so that our config is the only source of rules:

{
  "extends": ["@spyrosoft/eslint-config-spyro"]
}
  • appName - name of your project (optional)
  • framework - framework used to create your project [angular | react | next] (optional)

The appName and framework parameters are used for overwriting files generated by Nx which are not compliant with our ESlint rules and not autofixable by linters. If you want to install this plugin in an already existing and modified workspace, it is not recommendend to use those arguments as your current work might be lost.

Example

npx nx g @spyrosoft/spyro-eslint-plugin:setup --appName=spyro-app --framework=angular --extend=false

ESlint rules

All ESlint rules are maintained in the form of npm package, you can find a full list here.

Prettier rules

A full list of applied prettier rules:

| Rule | Description | |-------------------|-------------------------------------------------------| | printWidth | line length that the printer will wrap on, set to 120 | | semi | print semicolons at the ends of statements | | singleQuote | use single quotes instead of double quotes | | jsxSingleQuote | use single quotes instead of double quotes in JSX | | trailingComma | trailing commas where valid in ES5 | | useTabs | false, indent lines with spaces instead of tabs | | tabWidth | number of spaces per indentation-level, set to 2 | | bracketSpacing | print spaces between brackets in object literals | | | |