Skip to content

Tiffinger-Thiel-GmbH/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tiffinger-thiel/eslint-config

Usage

  1. Install
yarn add -D @tiffinger-thiel/eslint-config @rushstack/eslint-config eslint
  1. Setup your config files .eslintrc.js
// For yarn2 you will need this
require('@rushstack/eslint-config/patch/modern-module-resolution');

module.exports = {
  // Pick one profile.
  // Possible profiles:
  // - @tiffinger-thiel/eslint-config/profile/react
  // - @tiffinger-thiel/eslint-config/profile/node
  // - @tiffinger-thiel/eslint-config/profile/nest
  extends: ['@tiffinger-thiel/eslint-config/profile/react'],
  
  // The following is optional, it speeds up prettier if passed.
  // It should match your react version.
  settings: {
    react: {
      version: '18.0'
    }
  }
};

.prettierrc.js

module.exports = require('@tiffinger-thiel/eslint-config/prettier');

package.json

{
  "scripts": {
    "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\""
  },
}

VSCode

You only need "dbaeumer.vscode-eslint". No Prettier plugin needed. Example .vscode/settings.json:

{
  "eslint.format.enable": true,
  "editor.formatOnSave": true,
  "[javascript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[typescript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
}

Release

Run following

yarn
yarn release