Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lyra-lint

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lyra-lint

Lyra lint

  • 2.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Lyra lint 🐈

Opinated linter library for React

Table of contents

  1. Installation
  2. Usage
  3. Scripts
  4. Using with Husky

Installation

  1. Install lyra-lint package:
npm install --save-dev lyra-lint

Usage

  1. Add these scripts to the package.json *optional:
"lint": "eslint --ignore-path .gitignore .",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json)\"",
"format": "npm run prettier -- --write",
"check-format": "npm run prettier -- --list-different",
"validate": "npm run check-format && npm run lint"
  1. Add as a new property in the package.json to extends lyra-lint configuration: ​
"eslintConfig": {
   "extends": ["./node_modules/lyra-lint/.eslintrc.js"]
 }
  1. Add as a new property in the package.json in order to find the .prettierrc config from the package:
  "prettier": "./node_modules/lyra-lint/.prettierrc.js",

Scripts

Lint (every JS file except the listed in the project .gitignore file)
$ npm run lint
Lint and fix problems (the ones eslint can fix by itself)
$ npm run eslint -- --fix
Format JS and JSON files (except the listed in the project .gitignore file)
$ npm run format
Print the filenames of files that are different from Prettier formatting
$ npm run check-format
Execute the check-format script and the lint script
$ npm run check-format

Using with Husky

In order to avoid problems with Husky you need to install Eslint and Prettier into your project as a devDependency

Keywords

FAQs

Package last updated on 12 May 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc