Skip to content

Instantly share code, notes, and snippets.

@LukeSamkharadze
Last active June 3, 2021 06:14
Show Gist options
  • Save LukeSamkharadze/d1ed53a0a35b4bf557096320c1563649 to your computer and use it in GitHub Desktop.
Save LukeSamkharadze/d1ed53a0a35b4bf557096320c1563649 to your computer and use it in GitHub Desktop.
ESLint config for TS (Specific paths)
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
extends: ['plugin:prettier/recommended'],
rules: {
'prettier/prettier': 'warn',
},
parserOptions: {
sourceType: 'module',
},
overrides: [
{
files: '*.ts',
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
},
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['./src/**/*.ts'],
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