@pazetal/eslint-config
v1.0.1
Published
Common ESLint configurations
Downloads
11
Readme
ESLint Config
Shared ESLint config file. To use this in other packages
- Add the following to your
package.json
{
"prettier": "@pazetal/prettier-config",
"scripts" : {
"build": "<enter your build commands> && npm run build:lint",
"build:lint": "eslint .",
"fix": "eslint . --fix"
},
"devDependencies": {
"@pazetal/eslint-config": "*",
"@pazetal/prettier-config": "*"
}
}
2 Extend the ESLint config file
- If you do not need to extend the configurations with your own rules, you can add the following to the
package.json
file
{
"eslintConfig": {"extends": "@pazetal/eslint-config"}
}
- Make a file titled
.eslintrc.cjs
at the root of your code package and put the following inside:
/** @type {import('@typescript-eslint/utils').TSELint.Linter.Config} */
module.exports = {
"extends": [
/**
* Pick one of the following cofig files. Choode the base broser if your package needs to work for both
* browser and Node environments.
*/
"@pazetal/eslint-config"
"@pazetal/eslint-config/browser"
"@pazetal/eslint-config/node"
]
}
This package should not need to be invoked directly. Prettier should be invoked via ESLint using the eslint-config
package.