Socket
Socket
Sign inDemoInstall

eslint-plugin-sql-formatter

Package Overview
Dependencies
74
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-sql-formatter

ESLint plugin for formatting *.sql files and sql`...` template strings inside *.js files


Version published
Weekly downloads
525
decreased by-62.12%
Maintainers
1
Install size
70.2 MB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-sql-formatter

ESLint plugin that allows formatting of sql queries in *.sql files and template literals in .js/.ts files.

Installation

  1. Install ESLint.
  2. Install eslint-plugin-sql-formatter plugin.
npm install eslint --save-dev
npm install eslint-plugin-sql --save-dev

Configuration

  1. Add plugins section and specify sql-formatter as a plugin.
  2. Enable rules.
{
  "plugins": [
    "sql"
  ],
  "rules": {
    "sql/format": [
      "error",
      {
        // Everything is optional.
        "ignoreSingleLine": true, // Do not format if sql query fits single line. Enabled by default.
        "sqlFormatterConfig": {
          // https://github.com/sql-formatter-org/sql-formatter#configuration-options
          
          "language": "mysql",
          // ... any other option from sql-formatter
        }
      }
    ],
  }
}

Keywords

FAQs

Last updated on 01 Aug 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc