Socket
Socket
Sign inDemoInstall

eslint-config-xo

Package Overview
Dependencies
0
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-xo


Version published
Weekly downloads
255K
increased by1.23%
Maintainers
1
Install size
9.54 kB
Created
Weekly downloads
 

Package description

What is eslint-config-xo?

eslint-config-xo is a shareable ESLint configuration package that enforces the XO style guide. XO is a strict and opinionated code style guide for JavaScript and TypeScript, which aims to enforce best practices and consistency in codebases.

What are eslint-config-xo's main functionalities?

Enforcing Code Style

By extending the 'xo' configuration in your ESLint configuration file, you can enforce the XO style guide in your project. This includes rules for code formatting, best practices, and potential errors.

{
  "extends": "xo"
}

TypeScript Support

eslint-config-xo provides support for TypeScript by allowing you to extend the 'xo-typescript' configuration. This ensures that TypeScript-specific rules and best practices are enforced.

{
  "extends": "xo",
  "overrides": [
    {
      "files": "*.ts",
      "extends": "xo-typescript"
    }
  ]
}

React Support

For projects using React, you can extend the 'xo-react' configuration to enforce React-specific linting rules and best practices.

{
  "extends": [
    "xo",
    "xo-react"
  ]
}

Other packages similar to eslint-config-xo

Readme

Source

eslint-config-xo Build Status

ESLint shareable config for XO

This is for advanced users. You probably want to use XO directly.

Install

$ npm install --save-dev eslint-config-xo

Usage

Add some ESLint config to your package.json:

{
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": "xo"
	}
}

Or to .eslintrc:

{
	"extends": "xo"
}

This package also exposes xo/esnext if you want ES2015 support and rules:

{
	"extends": "xo/esnext"
}

And xo/browser if you're in the browser:

{
	"extends": "xo/browser"
}

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 01 Aug 2015

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc