{"id":19685,"library":"eslint-plugin-airtight","title":"eslint-plugin-airtight","description":"An ESLint plugin providing additional rules for TypeScript/JavaScript, including export-inline, param-types (migration helper), return-await (bug finder), sequelize-comment (feature), and unbounded-concurrency (bug finder). Version 2.0.0, maintained by Snyk, with TypeScript types included. Last release 2022-09-26. Differentiators: rules derived from eslint-plugin-sinful with a focus on security and correctness; param-types aids migration by adding types based on configuration; unbounded-concurrency prevents resource starvation by enforcing concurrency limits.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/snyk/eslint-plugin-airtight","tags":["javascript","typescript"],"install":[{"cmd":"npm install eslint-plugin-airtight","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-airtight","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-airtight","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v2. CommonJS require is not supported.","wrong":"const airtight = require('eslint-plugin-airtight')","symbol":"default (plugin object)","correct":"import airtight from 'eslint-plugin-airtight'"},{"note":"TypeScript types available for rules object.","wrong":"const { rules } = require('eslint-plugin-airtight')","symbol":"rules (named export)","correct":"import { rules } from 'eslint-plugin-airtight'"},{"note":"Provides recommended configuration presets.","wrong":null,"symbol":"configs (named export)","correct":"import { configs } from 'eslint-plugin-airtight'"}],"quickstart":{"code":"// .eslintrc.cjs\nmodule.exports = {\n  plugins: ['airtight'],\n  rules: {\n    'airtight/export-inline': 'warn',\n    'airtight/param-types': ['warn', { user: ['./lib/dtos', 'UserDTO'] }],\n    'airtight/return-await': 'error',\n    'airtight/sequelize-comment': 'warn',\n    'airtight/unbounded-concurrency': 'error',\n  },\n};\n\n// Example file\nfunction foo(user, name: string) {  // 'user' will have type UserDTO added\n  const p = new Promise((resolve) => {});\n  return await Promise.all([p]); // error: use pMap with concurrency\n}","lang":"typescript","description":"This shows how to configure eslint-plugin-airtight rules in an ESLint config file and demonstrates the param-types and unbounded-concurrency rules."},"warnings":[{"fix":"Use import syntax or upgrade ESLint to version that supports ESM plugins.","message":"The rules are ESM-only; CommonJS require may not work correctly with ESLint's plugin resolution.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Consider using Prettier for consistent formatting instead.","message":"The rule 'export-inline' is stylistic and may conflict with other formatters like Prettier.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure the import path in config is relative to the target file, or use absolute paths.","message":"The rule 'param-types' requires careful configuration; incorrect path/import can break TypeScript compilation.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add ignore patterns or disable rule in specific files.","message":"The rule 'return-await' may false-positively flag valid patterns where the catch block intentionally does nothing.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run npm install p-map.","message":"The rule 'unbounded-concurrency' requires installing p-map as a peer dependency.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint-plugin-airtight --save-dev and ensure using import or correct require path.","cause":"Package not installed or incorrect import syntax (CommonJS vs ESM).","error":"Error: Cannot find module 'eslint-plugin-airtight'"},{"fix":"Use format: 'airtight/param-types': ['warn', { user: ['./lib/dtos', 'UserDTO'] }]","cause":"Misconfigured rule options: param-types expects an object, not array or string.","error":"Configuration for rule \"airtight/param-types\" is invalid: value must be object."},{"fix":"Ensure ESLint parser is correctly configured (e.g., @typescript-eslint/parser for TypeScript).","cause":"The unbounded-concurrency rule tried to access a property on an undefined AST node, possibly due to an incomplete syntax tree.","error":"TypeError: Cannot read properties of undefined (reading 'map')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}