UNPKG

1.08 kBJavaScriptView Raw
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
8'use strict';
9
10// Fix eslint shareable config (https://github.com/eslint/eslint/issues/3458)
11require('@rushstack/eslint-patch/modern-module-resolution');
12
13// This file contains the minimum ESLint configuration required for Create
14// React App support, and is used as the `baseConfig` for `eslint-loader`
15// to ensure that user-provided configs don't need this boilerplate.
16
17module.exports = {
18 root: true,
19
20 parser: '@babel/eslint-parser',
21
22 plugins: ['react'],
23
24 env: {
25 browser: true,
26 commonjs: true,
27 es6: true,
28 jest: true,
29 node: true,
30 },
31
32 parserOptions: {
33 sourceType: 'module',
34 requireConfigFile: false,
35 babelOptions: {
36 presets: [require.resolve('babel-preset-react-app/prod')],
37 },
38 },
39
40 settings: {
41 react: {
42 version: 'detect',
43 },
44 },
45
46 rules: {
47 'react/jsx-uses-vars': 'warn',
48 'react/jsx-uses-react': 'warn',
49 },
50};