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,
];
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 full rule coverage.
See the Presets section in this sidebar for details and examples.