base.js 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. 'use strict';
  8. // This file contains the minimum ESLint configuration required for Create
  9. // React App support, and is used as the `baseConfig` for `eslint-loader`
  10. // to ensure that user-provided configs don't need this boilerplate.
  11. module.exports = {
  12. root: true,
  13. parser: 'babel-eslint',
  14. plugins: ['react'],
  15. env: {
  16. browser: true,
  17. commonjs: true,
  18. es6: true,
  19. jest: true,
  20. node: true,
  21. },
  22. parserOptions: {
  23. ecmaVersion: 2018,
  24. sourceType: 'module',
  25. ecmaFeatures: {
  26. jsx: true,
  27. },
  28. },
  29. settings: {
  30. react: {
  31. version: 'detect',
  32. },
  33. },
  34. rules: {
  35. 'react/jsx-uses-vars': 'warn',
  36. 'react/jsx-uses-react': 'warn',
  37. },
  38. };