Socket
Socket
Sign inDemoInstall

@papb/linter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@papb/linter

My custom linter configs and dependencies collected in one place to avoid repetition.


Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

@papb/linter

My custom linter configs and dependencies collected in one place to avoid repetition.

Why?

Until some time ago I was just using XO in my repos and overwriting a few rule configurations manually. However, XO now requires the project to be ESM and I don't want to do that. I don't want to stay locked in an old XO version either.

Install

# With npm
$ npm install --save-dev eslint@^8 prettier@^2 @papb/linter

# With yarn
$ yarn add --dev eslint@^8 prettier@^2 @papb/linter

Usage

// .eslintrc.cjs
module.exports = require('@papb/linter').eslintrc();

// .prettierrc.cjs
module.exports = require('@papb/linter').prettierrc();
# Will lint all `.js`, `.ts`, `.cjs` and `.md` files.
$ npx eslint . --max-warnings 0

# Will check all `.js`, `.ts`, `.cjs` and `.md` for prettier style.
$ npx prettier --check .

# Will overwrite in-place all `.js`, `.ts`, `.cjs` and `.md` for prettier style.
$ npx prettier --write .

Note: It is possible for ESLint to pass while prettier --check still fails, so you should run both.

Recommended npm scripts:

{
    "scripts": {
        "lint": "eslint . --max-warnings 0 && prettier --check .",
        "prettier": "prettier --write .",
    }
}

License

MIT © Pedro Augusto de Paula Barbosa

FAQs

Package last updated on 07 Mar 2022

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