{"id":42711,"library":"eslint-plugin-sequel","title":"eslint-plugin-sequel","description":"An ESLint plugin providing lint rules for inline SQL in JavaScript and TypeScript code. Current stable version is 1.9.10, released on npm. It helps catch common SQL mistakes (e.g., missing WHERE clauses, LIKE misuse) directly in your codebase. Unlike other SQL linting tools, it integrates seamlessly with ESLint workflows and supports various SQL dialects. Release cadence is irregular, with maintenance updates as needed.","status":"active","version":"1.9.10","language":"javascript","source_language":"en","source_url":"https://github.com/5app/eslint-plugin-sequel","tags":["javascript","eslint","eslintplugin","eslint-plugin","sql"],"install":[{"cmd":"npm install eslint-plugin-sequel","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-sequel","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-sequel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency - ESLint is required to load and run the plugin.","package":"eslint","optional":false}],"imports":[{"note":"The plugin is used as an ESLint plugin, not imported directly in code. It adds custom rules under 'sequel/' prefix.","wrong":"// Incorrect: expecting a default import\nimport plugin from 'eslint-plugin-sequel';","symbol":"plugin","correct":"// In .eslintrc.js\nmodule.exports = {\n  plugins: ['sequel'],\n  rules: {\n    'sequel/no-unsafe-query': 'error',\n  },\n};"},{"note":"Rules are accessed via the plugin namespace in ESLint config, not directly as modules.","wrong":"// Wrong: trying to require rules individually\nconst missingWhere = require('eslint-plugin-sequel/rules/missing-where');","symbol":"rules","correct":"// Using rules via ESLint config\n'sequel/missing-where': 'warn'"},{"note":"Configs are exposed via the plugin's 'configs' property but should be used via ESLint's 'extends' with 'plugin:' prefix.","wrong":"// Wrong: expecting direct require of config object\nconst config = require('eslint-plugin-sequel/configs/recommended');","symbol":"configs","correct":"// Extending recommended config\nmodule.exports = {\n  extends: ['plugin:sequel/recommended'],\n};"}],"quickstart":{"code":"// eslint.config.js\nmodule.exports = [\n  {\n    plugins: {\n      sequel: require('eslint-plugin-sequel'),\n    },\n    rules: {\n      'sequel/no-unsafe-query': 'error',\n      'sequel/missing-where': 'warn',\n    },\n  },\n];\n\n// or with Flat Config:\n// import sequel from 'eslint-plugin-sequel';\n// export default [ sequel.configs.recommended ];","lang":"javascript","description":"Shows how to set up the plugin in ESLint flat config or traditional .eslintrc, enabling SQL lint rules."},"warnings":[{"fix":"Ensure your SQL queries are written as tagged template literals: sql`SELECT * FROM users WHERE id = ${id}`","message":"Rules only apply to template literals tagged with sql, not generic SQL strings.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Refactor SQL strings to tagged template literals using the sql tag.","message":"The plugin does not detect SQL in regular strings or concatenated strings.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set the 'dialect' option in rule configuration: 'sequel/no-unsafe-query': ['error', { dialect: 'mysql' }]","message":"Some rules may require specific SQL dialect configuration (e.g., MySQL vs PostgreSQL).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Remove the rule from your config or replace with 'sequel/no-unsafe-query'.","message":"The 'sequel/no-parameterized-query' rule is deprecated in favor of better analysis.","severity":"deprecated","affected_versions":">=1.7.0"},{"fix":"If using ESLint flat config (eslint.config.js), upgrade to v1.9.0+.","message":"Flat config support was added in v1.9.0; previous versions only work with .eslintrc.","severity":"gotcha","affected_versions":"<1.9.0"}],"env_vars":null,"search_vec":"'1.9.10':23 'cadenc':60 'catch':29 'claus':36 'code':18 'codebas':42 'common':30 'current':19 'dialect':58 'direct':39 'e.g':33 'eslint':2,6,52,69,72 'eslint-plugin':71 'eslint-plugin-sequel':1 'eslintplugin':70 'help':28 'inlin':12 'integr':49 'irregular':62 'javascript':15,68 'like':37 'lint':9,46 'mainten':64 'miss':34 'mistak':32 'misus':38 'need':67 'npm':26 'plugin':3,7,73 'provid':8 'releas':24,59 'rule':10 'seamless':50 'sequel':4 'sql':13,31,45,57,74 'stabl':20 'support':55 'tool':47 'typescript':17 'unlik':43 'updat':65 'various':56 'version':21 'workflow':53","created_at":"2026-06-05T16:56:18.575710+00:00","updated_at":"2026-06-05T16:56:18.575710+00:00","problems":[{"fix":"npm install eslint-plugin-sequel --save-dev","cause":"Plugin not installed or missing from node_modules.","error":"Error: Failed to load plugin 'sequel' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-sequel'"},{"fix":"Add 'plugins: [\"sequel\"]' to your ESLint config.","cause":"Plugin not properly registered in ESLint plugins section.","error":"Definition for rule 'sequel/no-unsafe-query' was not found"},{"fix":"Install and configure a parser like @typescript-eslint/parser if using TypeScript, or babel-eslint for JavaScript.","cause":"ESLint is not configured to parse template literals with tagging; may need babel-eslint or @typescript-eslint/parser.","error":"Parsing error: Unexpected token at \"sql`SELECT * FROM users`\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/5app/eslint-plugin-sequel#readme","github":"https://github.com/5app/eslint-plugin-sequel","docs":null,"changelog":null,"pypi":null,"npm":"eslint-plugin-sequel","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}