Skip to content

Instantly share code, notes, and snippets.

@LukeSamkharadze
Last active June 3, 2021 06:15
Show Gist options
  • Save LukeSamkharadze/17f518056afeb47607a5ffd82b537dcd to your computer and use it in GitHub Desktop.
Save LukeSamkharadze/17f518056afeb47607a5ffd82b537dcd to your computer and use it in GitHub Desktop.
Advanced ESLint config for TS
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
parserOptions: {
sourceType: 'module',
},
extends: ['plugin:prettier/recommended'],
rules: {
'prettier/prettier': 'warn',
},
overrides: [
{
files: '*.ts',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
project: 'tsconfig.json',
},
extends: [
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
],
rules: {
'no-plusplus': 'off',
'no-underscore-dangle': 'off',
'import/prefer-default-export': 'off',
'prettier/prettier': 'warn',
},
},
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment