mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
fix eslint
This commit is contained in:
parent
217992a666
commit
5e564afb3a
@ -60,7 +60,7 @@ function getOptions(options) {
|
||||
force: false,
|
||||
format: 'stylish',
|
||||
targetVersion: reactDOMSupport.default,
|
||||
reactImportPath: options.native ? 'react-native' : (options.targetVersion === '0.14.0' ? 'react' : 'react/addons'),
|
||||
reactImportPath: reactImport(options),
|
||||
lodashImportPath: 'lodash',
|
||||
native: false,
|
||||
nativeTargetVersion: reactNativeSupport.default,
|
||||
@ -77,6 +77,16 @@ function getOptions(options) {
|
||||
return finalOptions;
|
||||
}
|
||||
|
||||
function reactImport(options) {
|
||||
if (options.native) {
|
||||
return 'react-native';
|
||||
}
|
||||
if (options.targetVersion === '0.14.0') {
|
||||
return 'react';
|
||||
}
|
||||
return 'react/addons';
|
||||
}
|
||||
|
||||
/**
|
||||
* @const
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user