Getting Started
Install the plugin:
npm install --save-dev eslint-plugin-etc-misc typescript
Enable one preset in your Flat Config:
import etcMisc from "eslint-plugin-etc-misc";
export default [etcMisc.configs.recommended];
Every exported preset is scoped to JavaScript and TypeScript file extensions, so it can be composed safely with ESLint language plugins for JSON, CSS, or other non-JavaScript languages.
Use minimal or recommended first, then move through stricter presets as
your baseline stabilizes.
Alternative: manual scoped setup
If you prefer to apply plugin rules inside your own file-scoped config object, spread the preset rules manually.
import tsParser from "@typescript-eslint/parser";
import etcMisc from "eslint-plugin-etc-misc";
export default [
{
files: ["**/*.{ts,tsx,mts,cts}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
// Enable only when using a type-aware preset.
// projectService: true,
sourceType: "module",
},
},
plugins: {
"etc-misc": etcMisc,
},
rules: {
...etcMisc.configs.recommended.rules,
},
},
];
Use this pattern when you only extend rules and want full control over parser setup per scope.
Recommended rollout
- Start with
minimalif you want to defer thetypescript/prefer-readonly*rules. - Move to
recommendedfor the full baseline. - Promote to
strictwhen you want the same rules to hard-fail. - Move to
strictTypeCheckedonce your lint config is fully type-aware. - Adopt
allStrictorallwhen you want every non-deprecated rule.
Use allStrictWithDeprecated or allWithDeprecated only as temporary
migration presets when an existing configuration still needs deprecated rules.
Deprecated rules with same-plugin replacements remain available for explicit legacy configurations but are intentionally excluded from every preset.
See the Presets section in this sidebar for details and examples.