eslint-plugin-fsecond
v1.5.0
Published
ESLint plugin with misc rules. Typescript and React related.
Downloads
80,004
Maintainers
Readme
ESLINT PLUGIN FSECOND
ESLint plugin with some opinionated rules, useful in JavaScript, TypeScript and React projects.
Requirements
- Node.js >=22
- ESLint >=9.0.0
Install
pnpm add -D eslint eslint-plugin-fsecondUsage
Use a preset config or configure each rule separately.
With preset
// eslint.config.ts
import fsecond from "eslint-plugin-fsecond";
export default [fsecond.configs.recommended];With individual rules
// eslint.config.ts
import fsecond from "eslint-plugin-fsecond";
export default [
{
plugins: { fsecond: fsecond },
rules: {
// Override/add rules settings here, such as:
"fsecond/prefer-destructured-optionals": "error",
},
},
];Configs
| | Name |
| :-- | :----------------------- |
| ✅ | recommended |
| ☑️ | recommendedTypeChecked |
Rules
💼 Configurations enabled in.
✅ Set in the recommended configuration.
☑️ Set in the recommendedTypeChecked configuration.
⚙️ Has configuration options.
💭 Requires type information.
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 💼 | ⚙️ | 💭 | 🔧 | | :--------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :---- | :-- | :-- | :-- | | no-inline-interfaces | disallow inline object type literals in variable and function annotations; extract to a named interface or type alias. | ✅ ☑️ | ⚙️ | | 🔧 | | no-redundant-jsx-prop-usage | disallow passing a JSX prop whose value matches the component's destructuring default for that prop | ☑️ | | 💭 | 🔧 | | prefer-destructured-optionals | enforce placing optional parameters on a destructured object instead of the function signature itself | ✅ ☑️ | | | | | valid-event-listener | enforces best practices around addEventListener method in React components. | ✅ ☑️ | ⚙️ | | |
