gajus/eslint-plugin-sql

allow to supply custom isSqlQuery helper or use better library

Open

#4 建立於 2018年9月1日

在 GitHub 查看
 (6 留言) (4 反應) (0 負責人)TypeScript (24 fork)github user discovery
help wanted

倉庫指標

Star
 (113 star)
PR 合併指標
 (PR 指標待抓取)

描述

Toying with the plugin, I'm coming across valid SQL queries that aren't recognized, such as:

SELECT * FROM article a WHERE NOT a.archived

-- or

SELECT * FROM article a WHERE (a.authz & 8)::bool

One solution would be to either allow users to supply their own SQL parser (though I haven't checked if eslint allows to pass functions as settings values in .eslintrc.js), or replace the sql-parse, which seems unmaintained, with something else.

貢獻者指南