How to use the customize-cra.useEslintRc function in customize-cra

To help you get started, we’ve selected a few customize-cra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github quid / refraction / config-overrides.js View on Github external
p => p.constructor.name !== 'ModuleScopePlugin'
  );
  return config;
};

/**
 * react-app-rewired configuration file
 *
 * Theses functions are used to override the configurations provided by
 * create-react-app to be able to tweak it without ejecting the
 * project. Be careful!
 */
module.exports = {
  webpack: override(
    babelInclude([path.resolve('src'), path.resolve('packages')]),
    useEslintRc(),
    removeModuleScopePlugin(),
    addWebpackAlias(lernaAlias.webpack())
  ),
  jest: config => {
    // create-react-app looks for tests in `src`, we look in `packages`
    config.roots = ['/packages'];
    config.testMatch = config.testMatch.map(m => m.replace('src', 'packages'));
    config.collectCoverageFrom = ['**/packages/**/*.js'];
    config.coveragePathIgnorePatterns = ['/dist/'];

    // we tell Jest to import the @quid packages from their source directory
    // rather than from the dist one, so we don't have to build them each time
    config.moduleNameMapper = lernaAlias.jest();

    return config;
  },
github runelite / runelite.net / config-overrides.js View on Github external
url: link
        },
        template: 'redirect.html',
        filename: key + '/index.html',
        inject: false,
        xhtml: false
      })
    )
  }

  return config
}

module.exports = override(
  useBabelRc(),
  useEslintRc(),
  addWebpackAlias({
    react: 'preact/compat',
    'react-dom': 'preact/compat'
  }),
  addSitePlugins()
)
github chenxiaolei / ZLMediaKit_NVR_UI / config-overrides.js View on Github external
const path = require('path');
const {override, useEslintRc, fixBabelImports, addBabelPresets, addBabelPlugins, addWebpackResolve, addLessLoader, addDecoratorsLegacy} = require('customize-cra');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');

module.exports = override(
    useEslintRc(),
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {
            '@primary-color': "#4777e8",
            '@link-color': '#4777e8',
        },

    }),

    addWebpackResolve({
        alias: {'@': path.resolve(__dirname, 'src')}
    }),


    addBabelPlugins(
        "@babel/plugin-syntax-object-rest-spread",
github jigsawye / rosim / config-overrides.js View on Github external
const { addBabelPlugins, override, useEslintRc } = require('customize-cra');

module.exports = override(
  ...addBabelPlugins(
    [
      'import',
      {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: 'css',
      },
    ],
    ['lodash', { id: ['lodash'] }]
  ),
  useEslintRc()
);
github denysdovhan / chernivtsi-transport / app / config-overrides.js View on Github external
const { override, useEslintRc, fixBabelImports } = require('customize-cra');

module.exports = override(
  useEslintRc('../.eslintrc'),
  fixBabelImports('lodash', {
    libraryName: 'react-use',
    libraryDirectory: 'lib',
    camel2DashComponentName: false
  })
);
github sandiz / rs-manager / config-overrides.js View on Github external
const { override, useEslintRc, addWebpackModuleRule } = require('customize-cra');
const path = require('path');

module.exports = override(
    config => ({
        ...config,
        output: {
            ...config.output,
            globalObject: 'this'
        },
    }),
    useEslintRc(path.resolve(__dirname, '.eslintrc')),
    addWebpackModuleRule({
        test: /\.worker\.js$/,
        use: { loader: 'worker-loader' },
    })
);