Socket
Book a DemoInstallSign in
Socket

eslint-config-faithlife

Package Overview
Dependencies
Maintainers
0
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-faithlife

ESLint configs for Faithlife developers

10.1.0
latest
npmnpm
Version published
Weekly downloads
870
-23.88%
Maintainers
0
Weekly downloads
 
Created
Source

ESLint rules for Faithlife projects

Installing

yarn add --dev eslint-config-faithlife

Configuring

In your .eslintrc/.eslintrc.json, extend the "faithlife" config:

{
	"extends": ["faithlife"]
}

If you want to opt out of React-specific configuration, you can use base instead:

{
	"extends": ["faithlife/base"]
}

react-jest

If you use Jest and React Testing Library for testing your frontend, extend faithlife/react-jest as well.

{
	"extends": ["faithlife", "faithlife/react-jest"]
}

If you'd like to make sure faithlife/react-jest only applies the rules to your test files, you can use (replacing the files glob as needed):

module.exports = {
	extends: ['faithlife'],
	overrides: [
		Object.assign(
			{
				files: ['*.test.{ts,tsx,js,jsx}'],
			},
			require('eslint-config-faithlife/react-jest')
		),
	],
};

Behavior

This configuration will attempt to use an appropriate set of rules and parser options for your project.

  • For TypeScript (.ts, and .tsx) files, the @typescript-eslint/parser parser will be used, and TypeScript-specific rules will be loaded.
  • For JavaScript (.js, and .jsx) files, the default ESLint parser will be used.

FAQs

Package last updated on 19 Jul 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.