eslint-config-fishbrain-base
v5.0.5
Published
ESLint config for Fishbrain TypeScript projects
Downloads
164
Keywords
Readme
ESLint config for Fishbrain TypeScript projects
Rule set based on Airbnb JavaScript style guide with some extra rules for Jest tests from eslint-plugin-jest.
Usage
npm install -D eslint-config-fishbrain-base
In .eslintrc
(or whatver your ESLint config file is)
{
"extends": ["eslint-config-fishbrain-base"]
}
Recommended tsconfig.json settings
In addition to setting target, module, moduleResolution etc, these strictness settings are recommended.
{
"compilerOptions": {
"strict": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}
Recommended Prettier settings
Add this to package.json
to get correct config for prettier
"prettier": {
"singleQuote": true,
"trailingComma": "all"
}
Editor settings
To enable ESLint in VS Code add the following to your settings.json
:
{
"tslint.enable": false,
"eslint.validate": [
"javascript",
"typescript",
]
}
Web Projects
For ESLint rules for React based web projects, see: https://github.com/fishbrain/eslint-config-fishbrain
Deploying
To trigger a release, merge changes into the master
branch with an updated package version. This
will trigger a Github Actions workflow to deploy a release.