opinionated-eslint
v1.0.1
Published
An opinionated TypeScript eslint rigging config based on Rushstack
Downloads
12
Maintainers
Readme
Opinionated ESLint
An opinionated ESLint config rigging package based on Rushstack.
Base Config Setup
Modifies the base Rushstack ESLint config to:
- [x] Include import sorting.
- [x] Disable the demand for
I
interface prefixes. - [x] Disables type specification for Zod schema folders.
- [x] Enforce no require imports.
- [x] Disabled no parameter properties to enforce public/protected/private.
Usage
To implement this config in your project, add it to your devDependencies
and setup your package .eslintrc.js
file as follows:
$ npm install -d opinionated-eslint
$ npm install -d @rushstack/eslint-config
$ npm install -d @typescript-eslint/parser
require("@rushstack/eslint-config/patch/modern-module-resolution")
module.exports = {
extends: [
"@rushstack/eslint-config/profile/node",
"@rushstack/eslint-config/mixins/friendly-locals",
"opinionated-eslint",
]
}
IDE Setup
Make sure to set up your IDE to auto-apply the rules it can easily fix by enabling "fix on save"
.
References
- https://eslint.org/
- https://rushstack.io/pages/heft_tasks/eslint/
- https://github.com/microsoft/rushstack/tree/master/stack/eslint-config