A simple ESLint setup using @typescript-eslint, with Prettier and a couple TSConfig setups.
pnpm add eslint-config-dolmios
Populate .eslintrc
with the following, and code away.
"extends": ["dolmios"]
Alternatively, you can use eslintConfig
in package.json
.
"eslintConfig": {
"extends": ["dolmios"]
}
Prettier is configured to work nicely with this config, though is an optional inclusion. If you'd like to include the config, you can add it to package.json
.
"prettier": "eslint-config-dolmios/configs/prettier"
The above method does not offer a way to extend the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a
.prettierrc.js
file and export the modifications.
module.exports = {
...require("eslint-config-dolmios/configs/prettier"),
parser: "babel",
};
This config also exports two TSConfig setups, base
and lib
respectively. The base config is generally suitable. To include either, extend your tsconfig.json
.
"extends": "eslint-config-dolmios/configs/tsconfig"
You can view the ESLint configuration in the reference notes: reference.txt.
Feel free to get in touch with feedback, advice or suggestions. See Conventional Commits for new contributors.