.eslintrc.js 908B

1234567891011121314151617181920212223242526
  1. const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json');
  2. const typescriptEslintPrettier = require('eslint-config-prettier/@typescript-eslint');
  3. module.exports = {
  4. extends: ['@react-native-community'],
  5. overrides: [
  6. {
  7. files: ['*.ts', '*.tsx'],
  8. // Apply the recommended Typescript defaults and the prettier overrides to all Typescript files
  9. rules: Object.assign(
  10. typescriptEslintRecommended.rules,
  11. typescriptEslintPrettier.rules,
  12. {'@typescript-eslint/explicit-member-accessibility': 'off'},
  13. ),
  14. },
  15. {
  16. files: ['example/**/*.ts', 'example/**/*.tsx'],
  17. rules: {
  18. // Turn off rules which are useless and annoying for the example files files
  19. '@typescript-eslint/explicit-function-return-type': 'off',
  20. 'react-native/no-inline-styles': 'off',
  21. },
  22. },
  23. ],
  24. };