Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

ESLint config for Fishbrain TypeScript projects

License

Notifications You must be signed in to change notification settings

fishbrain/eslint-config-fishbrain-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPOSITORY IS NO LONGER MAINTAINED

Use https://github.com/fishbrain/eslint-config-fishbrain instead.


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.