2016-04-07 29 views
1

aşağıda ES6 kod sözdizimi,girinti hatası, ES6

import React from 'react'; 

const App = ({ children }) => { 
    let childrenData; 
    if (children) { 
     childrenData = (<div>{children}</div>); 
    } 
    return childrenData; 
}; 

export default App; 

eslint

5:2 error Expected indentation of 4 space character but found 0 indent 
    6:2 error Expected indentation of 4 space character but found 0 indent 
    7:3 error Expected indentation of 4 space character but found 0 indent 
    9:2 error Expected indentation of 4 space character but found 0 indent 

Hata ve benim kural motoru

"indent": [2, 4, {'SwitchCase': 1}], 
"max-len": ["error", 200, 4], 
"object-shorthand": ["error", "always", { "ignoreConstructors": true }], 
"one-var": ["error", { 
    "var": "always", // Exactly one var declaration per function 
    "let": "always", // Exactly one let declaration per block 
    "const": "never" // Exactly one declarator per const declaration per block 
}], 

size söyleyebilecek, şöyle lütfen bana nerede yardımcı olurum ??

+0

Ve hatalar bu dosyayla ilgili olduğundan emin misiniz? – azium

+0

Kazayla sekmeler kullanıyor musunuz? – azium

+0

evet sadece dosyadan ... hayır sekmelerden .. –

cevap

0

Anahtar kutusu tek tırnak işareti arasında, bu bir JSON dosyası olduğu için iki katı arasında olmalıdır.