mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 16:24:27 +08:00
Fix babel and eslint config [SCI-1461]
This commit is contained in:
parent
b8e93ee883
commit
ba35717243
4 changed files with 22 additions and 4 deletions
10
.babelrc
10
.babelrc
|
@ -11,7 +11,8 @@
|
|||
"useBuiltIns": true
|
||||
}
|
||||
],
|
||||
"react"
|
||||
"react",
|
||||
"es2015"
|
||||
],
|
||||
"plugins": [
|
||||
"syntax-dynamic-import",
|
||||
|
@ -21,5 +22,10 @@
|
|||
"spec": true
|
||||
}
|
||||
]
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": ["transform-es2015-modules-commonjs"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
{
|
||||
"extends": "google",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jquery": true
|
||||
},
|
||||
"plugins": [
|
||||
"react"
|
||||
],
|
||||
"extends": ["eslint:recommended", "plugin:react/recommended"],
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 6,
|
||||
"ecmaFeatures": {
|
||||
"impliedStrict": true,
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"spaced-comment": [
|
||||
"error",
|
||||
|
|
|
@ -21,6 +21,6 @@ Hello.propTypes = {
|
|||
document.addEventListener('DOMContentLoaded', () => {
|
||||
ReactDOM.render(
|
||||
<Hello name="React" />,
|
||||
document.body.appendChild(document.createElement('div')),
|
||||
document.body.appendChild(document.createElement('div'))
|
||||
)
|
||||
})
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"devDependencies": {
|
||||
"eslint": "^3.7.1",
|
||||
"eslint-config-google": "^0.5.0",
|
||||
"eslint-plugin-react": "^7.1.0",
|
||||
"webpack-dev-server": "^2.5.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in a new issue