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

eslint-config-flat-gitignore

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-flat-gitignore

.gitignore support for ESLint Flat Config

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
166K
decreased by-37.24%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-flat-gitignore

npm version npm downloads bundle JSDocs License

.gitignore support for ESLint Flat Config.

Usage

npm i -D eslint-config-flat-gitignore
// eslint.config.js
import gitignore from 'eslint-config-flat-gitignore'

export default [
  // recommended putting it at the first
  gitignore(),
  // your other configs here
]

By default it will only looks for .gitignore but NOT .eslintignore, as we would recommended move away from .eslintignore to declare directly in eslint.config.js for single source of truth. If you still want it, you can pass the files option to specify the files to look for.

gitignore({
  files: [
    '.gitignore',
    '.eslintignore',
  ]
})

By default, this plugin throws if any of the ignore files are missing. This can be disabled by passing setting the strict option to false.

gitignore({
  files: [
    '.gitignore',
    '.eslintignore',
  ],
  strict: false,
})

By default, this plugin will try to look up the directory tree and match the first .gitignore file. You can disable this by setting the root option to true, or specify the files option to a specific path.

gitignore({
  root: true
})

Sponsors

License

MIT License © 2023-PRESENT Anthony Fu

Keywords

FAQs

Package last updated on 02 Apr 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

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