Advertisement
Guest User

ESLint Configuration

a guest
Mar 27th, 2019
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var jsExtensions = ['.js', '.jsx'];
  2. var tsExtensions = ['.ts', '.tsx'];
  3. var allExtensions = jsExtensions.concat(tsExtensions);
  4.  
  5. module.exports =  {
  6.   plugins: ['import'],
  7.   extends:  [
  8.     'plugin:react/recommended',
  9.     'plugin:@typescript-eslint/recommended',
  10.     'airbnb',
  11.     'plugin:prettier/recommended'
  12.   ],
  13.   parserOptions:  {
  14.     ecmaVersion:  2018,
  15.     sourceType:  'module',
  16.     ecmaFeatures:  {
  17.       jsx:  true,
  18.     },
  19.   },
  20.   settings:  {
  21.     'import/extensions': allExtensions,
  22.     'import/parsers': {
  23.       '@typescript-eslint/parser': tsExtensions
  24.     },
  25.     'import/resolver': {
  26.       'node': {
  27.         'extensions': allExtensions
  28.       }
  29.     },
  30.     react:  {
  31.       version:  'detect',
  32.     },
  33.   },
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement