{"repo":"gajus/eslint-plugin-sql","free":true,"listed":false,"github":"https://github.com/gajus/eslint-plugin-sql","clone":"git clone https://github.com/gajus/eslint-plugin-sql.git","description":"SQL linting rules for ESLint.","language":"TypeScript","stars":113,"topics":["eslint","eslint-plugin","sql","postgresql","postgres"],"license":null,"category":"databases-storage","readme_excerpt":"eslint-plugin-sql SQL linting rules for ESLint. In its current form, the plugin has been designed and tested to work with Postgres codebase. eslint-plugin-sql Installation Configuration Settings placeholderRule Rules format no-unsafe-query Installation 1. Install ESLint. 1. Install eslint-plugin-sql plugin. Configuration 1. Add plugins section and specify eslint-plugin-sql as a plugin. 1. Enable rules. Settings placeholderRule A regex used to ignore placeholders or other fragments of the query that'd make it invalid SQL query, e.g. If you are using ? placeholders in your queries, you must ignore \\? pattern as otherwise the string is not going to be recognized as a valid SQL query. This configuration is relevant for sql/no-unsafe-query to match queries containing placeholders as well as for sql/format when used with {ignoreTagless: false} configuration. Rules format The --fix option on the command line automatically fixes problems reported by this rule. Matches queries in template literals. Warns when query formatting does not match the configured format (see Options). This rule is used to format the queries using sql-formatter. Options The first option is an object with the following configuration. configuration format default description --- --- --- --- ignoreExpressions boolean false Does not format template literals that contain expressions. ignoreInline boolean true Does not format queries that are written on a single line. ignoreStartWithNewLine boolean true Does not rem","default_branch":null,"files":null,"tree":[],"storefront":"/r/gajus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gajus/eslint-plugin-sql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}