A reusable eslint config that I use for most of my projects.
module.exports = {
extends: "@mlaursen/eslint-config",
};
Or if I want to do additional rules and strict type checking linting rules:
module.exports = {
extends: "@mlaursen/eslint-config",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
rules: {
// any custom rules for this project
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
},
// any custom overrides for this project
],
};