Skip to content

Instantly share code, notes, and snippets.

@myobie
Created July 17, 2020 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myobie/2f395f78f8c881ea19b22dcb237542c9 to your computer and use it in GitHub Desktop.
Save myobie/2f395f78f8c881ea19b22dcb237542c9 to your computer and use it in GitHub Desktop.
My eslint config for typescript projects
module.exports = {
root: true,
env: {
browser: true,
mocha: true
},
globals: {
expect: true
},
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint'
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'eslint-config-standard'
],
ignorePatterns: [
'.yarn/**',
'dist/**',
'vendor/**'
],
rules: {
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true, variables: true }]
},
// NOTE: overrides are because of https://github.com/typescript-eslint/typescript-eslint/issues/906
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off'
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment