Skip to content

fishbrain/eslint-config-fishbrain-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESLint config for Fishbrain TypeScript projects

npm version Build Status

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.