Registry / testing / eslint-plugin-airtight

eslint-plugin-airtight

JSON →
library2.0.0jsnpmunverified

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.

npm install eslint-plugin-airtight
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-AIRT
E
eslint-plugin-airtight
testingjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (plugin object)
import airtight from 'eslint-plugin-airtight'
const airtight = require('eslint-plugin-airtight')
ESM-only since v2. CommonJS require is not supported.
rules (named export)
import { rules } from 'eslint-plugin-airtight'
const { rules } = require('eslint-plugin-airtight')
TypeScript types available for rules object.
configs (named export)
import { configs } from 'eslint-plugin-airtight'
Provides recommended configuration presets.

This shows how to configure eslint-plugin-airtight rules in an ESLint config file and demonstrates the param-types and unbounded-concurrency rules.

// .eslintrc.cjs module.exports = { plugins: ['airtight'], rules: { 'airtight/export-inline': 'warn', 'airtight/param-types': ['warn', { user: ['./lib/dtos', 'UserDTO'] }], 'airtight/return-await': 'error', 'airtight/sequelize-comment': 'warn', 'airtight/unbounded-concurrency': 'error', }, }; // Example file function foo(user, name: string) { // 'user' will have type UserDTO added const p = new Promise((resolve) => {}); return await Promise.all([p]); // error: use pMap with concurrency }
Debug
Known issues
gotchaThe rules are ESM-only; CommonJS require may not work correctly with ESLint's plugin resolution.
fix
Use import syntax or upgrade ESLint to version that supports ESM plugins.
affects: >=2.0.0
deprecatedThe rule 'export-inline' is stylistic and may conflict with other formatters like Prettier.
fix
Consider using Prettier for consistent formatting instead.
affects: >=1.0.0
gotchaThe rule 'param-types' requires careful configuration; incorrect path/import can break TypeScript compilation.
fix
Ensure the import path in config is relative to the target file, or use absolute paths.
affects: >=1.0.0
gotchaThe rule 'return-await' may false-positively flag valid patterns where the catch block intentionally does nothing.
fix
Add ignore patterns or disable rule in specific files.
affects: >=1.0.0
gotchaThe rule 'unbounded-concurrency' requires installing p-map as a peer dependency.
fix
Run npm install p-map.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-airtight'
Package not installed or incorrect import syntax (CommonJS vs ESM).
fix
npm install eslint-plugin-airtight --save-dev and ensure using import or correct require path.
Configuration for rule "airtight/param-types" is invalid: value must be object.
Misconfigured rule options: param-types expects an object, not array or string.
fix
Use format: 'airtight/param-types': ['warn', { user: ['./lib/dtos', 'UserDTO'] }]
TypeError: Cannot read properties of undefined (reading 'map')
The unbounded-concurrency rule tried to access a property on an undefined AST node, possibly due to an incomplete syntax tree.
fix
Ensure ESLint parser is correctly configured (e.g., @typescript-eslint/parser for TypeScript).
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-airtight — npm install eslint-plugin-airtight · libregistry