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,
|
force: false,
|
||||||
format: 'stylish',
|
format: 'stylish',
|
||||||
targetVersion: reactDOMSupport.default,
|
targetVersion: reactDOMSupport.default,
|
||||||
reactImportPath: options.native ? 'react-native' : (options.targetVersion === '0.14.0' ? 'react' : 'react/addons'),
|
reactImportPath: reactImport(options),
|
||||||
lodashImportPath: 'lodash',
|
lodashImportPath: 'lodash',
|
||||||
native: false,
|
native: false,
|
||||||
nativeTargetVersion: reactNativeSupport.default,
|
nativeTargetVersion: reactNativeSupport.default,
|
||||||
@ -77,6 +77,16 @@ function getOptions(options) {
|
|||||||
return finalOptions;
|
return finalOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reactImport(options) {
|
||||||
|
if (options.native) {
|
||||||
|
return 'react-native';
|
||||||
|
}
|
||||||
|
if (options.targetVersion === '0.14.0') {
|
||||||
|
return 'react';
|
||||||
|
}
|
||||||
|
return 'react/addons';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user