Created
February 26, 2020 19:15
-
-
Save diondree/4813f82d66d260a267854d8c661977ce to your computer and use it in GitHub Desktop.
Working Typescript Eslint configuration using Prettier, Airbnb and jsx-a11y
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 = { | |
parser: '@typescript-eslint/parser', | |
plugins: ['@typescript-eslint', 'jest', 'jsx-a11y', 'prettier'], | |
extends: [ | |
'airbnb', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:jest/recommended', | |
'plugin:prettier/recommended', | |
'prettier/react', | |
'prettier/@typescript-eslint', | |
], | |
env: { | |
node: true, | |
browser: true, | |
jest: true, | |
}, | |
parserOptions: { | |
project: './tsconfig.json', | |
}, | |
rules: { | |
'@typescript-eslint/ban-ts-ignore': 'off', | |
'react/prop-types': 'off', | |
'react/jsx-props-no-spreading': 'off', | |
'import/no-extraneous-dependencies': 'off', | |
'import/no-named-as-default': 'off', | |
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }], | |
'react/no-unescaped-entities': 'off', | |
'import/extensions': [ | |
'error', | |
'ignorePackages', | |
{ | |
js: 'never', | |
mjs: 'never', | |
jsx: 'never', | |
ts: 'never', | |
tsx: 'never', | |
}, | |
], | |
}, | |
settings: { | |
'import/resolver': { | |
node: { | |
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json'], | |
}, | |
}, | |
'import/extensions': ['.js', '.ts', '.jsx', '.tsx'], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment