Skip to content

Configuration

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

import ceaseNonsense from "eslint-plugin-cease-nonsense";
export default [ceaseNonsense.configs.recommended];

Rules are grouped into four categories with these default severities:

CategoryRulesDefault Severity
React Rules21 ruleswarn / error
Roblox & Luau Rules17 ruleswarn / error
Naming & Conventions7 ruleswarn
General Logic & Style12 ruleswarn / 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 "eslint-plugin-cease-nonsense";
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:

RuleFix Type
no-commented-codeRemoves dead comments
prefer-early-returnRestructures control flow
prefer-pattern-replacementsApplies pattern swaps
no-unused-importsRemoves dead imports
prefer-ternary-conditional-renderingSuggestion fix
no-shorthand-namesSuggestion fix
Terminal window
bun run eslint . --fix