New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@spyrosoft/spyro-eslint-plugin

Package Overview
Dependencies
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spyrosoft/spyro-eslint-plugin

[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.

latest
npmnpm
Version
2.1.3
Version published
Maintainers
8
Created
Source

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:

RuleDescription
printWidthline length that the printer will wrap on, set to 120
semiprint semicolons at the ends of statements
singleQuoteuse single quotes instead of double quotes
jsxSingleQuoteuse single quotes instead of double quotes in JSX
trailingCommatrailing commas where valid in ES5
useTabsfalse, indent lines with spaces instead of tabs
tabWidthnumber of spaces per indentation-level, set to 2
bracketSpacingprint spaces between brackets in object literals

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts