eslint-plugin-fsecond
raw JSON → 1.5.0 verified Sat Apr 25 auth: no javascript
ESLint plugin providing opinionated rules for JavaScript, TypeScript, and React projects. Current stable version is 1.5.0 (February 2026). Requires Node.js >=22 and ESLint >=9.0.0. Supports TypeScript via peer dependency typescript >=5.0.0. Key differentiators: includes rules like no-inline-interfaces (auto-fixable), prefer-destructured-optionals, valid-event-listener, and no-redundant-jsx-prop-usage (requires type information). Offers recommended and recommendedTypeChecked configs. Actively maintained with regular releases.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module ... ↓
cause Package is ESM-only; using require() in a CommonJS file.
fix
Switch to import syntax or use dynamic import: const fsecond = await import('eslint-plugin-fsecond');
error ESLint couldn't find the plugin "eslint-plugin-fsecond". Are you sure it's installed? ↓
cause ESLint plugin not installed or not in node_modules.
fix
Run: pnpm add -D eslint-plugin-fsecond
Warnings
breaking Node.js >=22 required; older Node versions are not supported. ↓
fix Upgrade Node.js to version 22 or higher.
breaking ESLint >=9.0.0 required; flat config only (no .eslintrc). ↓
fix Migrate to ESLint flat config (eslint.config.js/ts) and upgrade ESLint to 9+.
deprecated The rule 'valid-event-listener' has an option 'checkWindowListener' that was deprecated in v1.1.0; use 'checkGlobalListeners' instead. ↓
fix Replace 'checkWindowListener' with 'checkGlobalListeners' in rule options.
gotcha Default import is ESM-only; require() will throw an error. ↓
fix Use import statements or dynamic import().
Install
npm install eslint-plugin-fsecond yarn add eslint-plugin-fsecond pnpm add eslint-plugin-fsecond Imports
- fsecond wrong
const fsecond = require('eslint-plugin-fsecond')correctimport fsecond from 'eslint-plugin-fsecond' - fsecond.configs.recommended wrong
import { configs } from 'eslint-plugin-fsecond'correctimport fsecond from 'eslint-plugin-fsecond'; export default [...fsecond.configs.recommended] - no-inline-interfaces wrong
import { rules } from 'eslint-plugin-fsecond'correctimport fsecond from 'eslint-plugin-fsecond'; ... rules: { 'fsecond/no-inline-interfaces': 'error' }
Quickstart
// eslint.config.ts
import fsecond from 'eslint-plugin-fsecond';
export default [
...fsecond.configs.recommended,
{
rules: {
'fsecond/no-inline-interfaces': ['error', { allowObjectTypes: false }],
},
},
];