Last active
June 3, 2021 06:15
-
-
Save LukeSamkharadze/17f518056afeb47607a5ffd82b537dcd to your computer and use it in GitHub Desktop.
Advanced ESLint config for TS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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