Skip to content

devthefuture-org/eslint-plugin-sql-pretty

Repository files navigation

eslint-plugin-sql-pretty

SQL linting rules for ESLint.

based on https://github.com/gajus/eslint-plugin-sql with improvements

Installation

npm install eslint --save-dev
npm install eslint-plugin-sql-pretty --save-dev

Configuration

  1. Add plugins section and specify eslint-plugin-sql-pretty as a plugin.
  2. Enable rules.
{
  "plugins": [
    "sql-pretty"
  ],
  "rules": {
    "sql-pretty/format": [
      1,
      {
        "ignoreExpressions": false,
        "ignoreInline": true,
        "ignoreTagless": true,
        "spaces": 2,
        "tags": ["sql","sqlt"]
      }
    ],
    "sql-pretty/no-unsafe-query": [
      2,
      {
        "allowLiteral": false,
        "tags": ["sql","sqlt"]
      }
    ]
  }
}

Contributing:

We welcome contributions! If you encounter a bug or have a feature suggestion, please open an issue. To contribute code, simply fork the repository and submit a pull request.

This repository is mirrored on both GitHub and Codeberg. Contributions can be made on either platform, as the repositories are synchronized bidirectionally.

For more information:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published