0.0.3 • Published 6 years ago

iwag v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

iwag

2018/4/2

Consider to build some UI components with react for my own use.

2018/5/4

为了支持在定义class时可以用以下语法安装了babel-plugin-transform-class-properties插件,然后为了让eslint支持这种语法安装了babel-eslint

class Bork {
    //Property initializer syntax
    instanceProperty = "bork";
    boundFunction = () => {
      return this.instanceProperty;
    }

    //Static class properties
    static staticProperty = "babelIsCool";
    static staticFunction = function() {
      return Bork.staticProperty;
    }
  }

并且分别在.babelrc和.eslintrc文件中添加配置

"plugins": [
        "transform-class-properties"
    ]
"parser": "babel-eslint"

因为这个项目用的yarn作包管理,vscode工作区设置添加了下条才使得vscode能找到安装的babel-eslint插件,否则报错

"eslint.packageManager": "yarn",
0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago