module.exports = {
  parser: '@typescript-eslint/parser',
  extends: [
    'airbnb',
    'plugin:react/recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:jest/recommended',
    // config-prettier + plugin-prettier to integrate prettier into eslint
    'prettier',
    'plugin:prettier/recommended',
  ],
  plugins: ['@typescript-eslint', 'react', 'jest', 'prettier'],
  env: {
    browser: true,
    es6: true,
  },
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
  },
  // global variables
  globals: {
    __LOCALE__: false,
    __DEV__: false,
    __STAGING__: false,
    __BROWSER__: true,
    __SSR__: false,
    __TEST__: false,
  },
  rules: {
    'linebreak-style': 'off',
    'global-require': 'off',
    'no-restricted-globals': 'off',
    'func-names': 'off',
    'no-console': 'off',
    'no-continue': 'off',
    'no-param-reassign': 'off',
    'no-plusplus': 'off',
    'no-loop-func': 'off',
    //"class-methods-use-this": "off",
    'jsx-a11y/no-static-element-interactions': 'off',
    'jsx-a11y/click-events-have-key-events': 'off',
    'react/prop-types': 'off',
    'react/require-default-props': 'off',
    'react/jsx-filename-extension': 'off',
    'react/no-array-index-key': 'off',
    'react/default-props-match-prop-types': 'off',
    'react/jsx-props-no-multi-spaces': 'off',
    'import/no-webpack-loader-syntax': 'off',
    'import/no-extraneous-dependencies': 'off',
    'no-underscore-dangle': 'off',
    'prefer-destructuring': 'off',
    'jsx-a11y/no-noninteractive-element-interactions': 'off',
    'jsx-a11y/label-has-associated-control': 'off',
    'jsx-a11y/label-has-for': 'off',
    'jsx-a11y/no-noninteractive-tabindex': 'off',
    'react/prefer-stateless-function': 0,
    'prettier/prettier': 'error',
    'import/extensions': 'off',
    // Typescript
    '@typescript-eslint/explicit-member-accessibility': 'off',
    '@typescript-eslint/indent': 'off',
    '@typescript-eslint/no-var-requires': 'off',
    '@typescript-eslint/explicit-function-return-type': 'off',
    '@typescript-eslint/no-empty-interface': 'off',
  },
};
