Skip to content

Configuration

The quickest setup — one line, all 59 rules enabled:

import ceaseNonsense from "@pobammer-ts/eslint-cease-nonsense-rules";
export default [ceaseNonsense.configs.recommended];

Rules are grouped into four categories with these default severities. The table also shows which categories lean on type-aware analysis versus AST-only checks:

Category Type-aware AST-only Default Severity
React Rules 3 19 warn / error
Roblox & Luau Rules 4 14 warn / error
Naming & Conventions 1 6 warn
General Logic & Style 2 10 warn / error

Most rules support both warn and error. The recommended config uses warn for most rules and reserves error for things that are almost certainly bugs.

export default [
{
rules: {
"cease-nonsense/ban-react-fc": "error", // Already error in recommended
"cease-nonsense/no-god-components": "warn",
},
},
];

Pull in rules for a single category instead of everything:

import ceaseNonsense from "@pobammer-ts/eslint-cease-nonsense-rules";
export default [
// React only
...ceaseNonsense.rulesets.react,
// Roblox only
...ceaseNonsense.rulesets.roblox,
// Naming only
...ceaseNonsense.rulesets.naming,
];
// eslint-disable-next-line cease-nonsense/ban-react-fc
const MyComponent = React.forwardRef<Props, Ref>((props, ref) => {
// ...
});
export default [
ceaseNonsense.configs.recommended,
{
rules: {
"cease-nonsense/ban-react-fc": "off",
"cease-nonsense/no-god-components": "off",
},
},
];

These rules support auto-fix via eslint --fix:

Rule Fix Type
no-commented-code Removes dead comments
prefer-early-return Restructures control flow
prefer-pattern-replacements Applies pattern swaps
no-unused-imports Removes dead imports
prefer-ternary-conditional-rendering Suggestion fix
no-shorthand-names Suggestion fix
Terminal window
nlx eslint . --fix