├── .babelrc ├── .editorconfig ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── package.json ├── src ├── ast-util.js ├── generators.js ├── index.js └── util.js ├── test ├── babel-plugin-jsdoc-to-assert-test.js ├── fixtures │ ├── ArrowFunctionExpression │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── AssertOption │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ClassMethod │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── Default-Option-Generator │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ExportDefaultFunctionDeclaration │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ExportDefaultFunctionDestructuring │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ExportFunctionDeclaration │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── FunctionDeclaration │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── FunctionExpression │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── NOT_SUPPORT_Type_Object │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── NoTypeOption │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ObjectMethod │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ObjectMethodB │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── ObjectMethod_with_es2015 │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── SpecGenerator-param │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── SpecGenerator-type │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── TypeCustomObject │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── TypeExportExpression │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── TypeString │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── TypeThisAssignMent │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── TypeVariableAssignMent │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ ├── VariableDeclaration │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js │ └── multiple-comments │ │ ├── .babelrc │ │ ├── actual.js │ │ └── expected.js └── mocha.opts └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/.babelrc -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/package.json -------------------------------------------------------------------------------- /src/ast-util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/src/ast-util.js -------------------------------------------------------------------------------- /src/generators.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/src/generators.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/src/index.js -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/src/util.js -------------------------------------------------------------------------------- /test/babel-plugin-jsdoc-to-assert-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/babel-plugin-jsdoc-to-assert-test.js -------------------------------------------------------------------------------- /test/fixtures/ArrowFunctionExpression/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ArrowFunctionExpression/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ArrowFunctionExpression/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ArrowFunctionExpression/actual.js -------------------------------------------------------------------------------- /test/fixtures/ArrowFunctionExpression/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ArrowFunctionExpression/expected.js -------------------------------------------------------------------------------- /test/fixtures/AssertOption/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/AssertOption/.babelrc -------------------------------------------------------------------------------- /test/fixtures/AssertOption/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/AssertOption/actual.js -------------------------------------------------------------------------------- /test/fixtures/AssertOption/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/AssertOption/expected.js -------------------------------------------------------------------------------- /test/fixtures/ClassMethod/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ClassMethod/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ClassMethod/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ClassMethod/actual.js -------------------------------------------------------------------------------- /test/fixtures/ClassMethod/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ClassMethod/expected.js -------------------------------------------------------------------------------- /test/fixtures/Default-Option-Generator/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/Default-Option-Generator/.babelrc -------------------------------------------------------------------------------- /test/fixtures/Default-Option-Generator/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/Default-Option-Generator/actual.js -------------------------------------------------------------------------------- /test/fixtures/Default-Option-Generator/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/Default-Option-Generator/expected.js -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDeclaration/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportDefaultFunctionDeclaration/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDeclaration/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportDefaultFunctionDeclaration/actual.js -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDeclaration/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportDefaultFunctionDeclaration/expected.js -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDestructuring/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportDefaultFunctionDestructuring/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDestructuring/actual.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {string} key 3 | */ 4 | export default function fn({key}) { 5 | 6 | } -------------------------------------------------------------------------------- /test/fixtures/ExportDefaultFunctionDestructuring/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportDefaultFunctionDestructuring/expected.js -------------------------------------------------------------------------------- /test/fixtures/ExportFunctionDeclaration/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportFunctionDeclaration/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ExportFunctionDeclaration/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportFunctionDeclaration/actual.js -------------------------------------------------------------------------------- /test/fixtures/ExportFunctionDeclaration/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ExportFunctionDeclaration/expected.js -------------------------------------------------------------------------------- /test/fixtures/FunctionDeclaration/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionDeclaration/.babelrc -------------------------------------------------------------------------------- /test/fixtures/FunctionDeclaration/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionDeclaration/actual.js -------------------------------------------------------------------------------- /test/fixtures/FunctionDeclaration/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionDeclaration/expected.js -------------------------------------------------------------------------------- /test/fixtures/FunctionExpression/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionExpression/.babelrc -------------------------------------------------------------------------------- /test/fixtures/FunctionExpression/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionExpression/actual.js -------------------------------------------------------------------------------- /test/fixtures/FunctionExpression/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/FunctionExpression/expected.js -------------------------------------------------------------------------------- /test/fixtures/NOT_SUPPORT_Type_Object/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/NOT_SUPPORT_Type_Object/.babelrc -------------------------------------------------------------------------------- /test/fixtures/NOT_SUPPORT_Type_Object/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/NOT_SUPPORT_Type_Object/actual.js -------------------------------------------------------------------------------- /test/fixtures/NOT_SUPPORT_Type_Object/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/NOT_SUPPORT_Type_Object/expected.js -------------------------------------------------------------------------------- /test/fixtures/NoTypeOption/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/NoTypeOption/.babelrc -------------------------------------------------------------------------------- /test/fixtures/NoTypeOption/actual.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {MyObject} 3 | */ 4 | const value = {}; -------------------------------------------------------------------------------- /test/fixtures/NoTypeOption/expected.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {MyObject} 3 | */ 4 | const value = {}; -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod/actual.js -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod/expected.js -------------------------------------------------------------------------------- /test/fixtures/ObjectMethodB/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethodB/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ObjectMethodB/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethodB/actual.js -------------------------------------------------------------------------------- /test/fixtures/ObjectMethodB/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethodB/expected.js -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod_with_es2015/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod_with_es2015/.babelrc -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod_with_es2015/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod_with_es2015/actual.js -------------------------------------------------------------------------------- /test/fixtures/ObjectMethod_with_es2015/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/ObjectMethod_with_es2015/expected.js -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-param/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-param/.babelrc -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-param/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-param/actual.js -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-param/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-param/expected.js -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-type/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-type/.babelrc -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-type/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-type/actual.js -------------------------------------------------------------------------------- /test/fixtures/SpecGenerator-type/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/SpecGenerator-type/expected.js -------------------------------------------------------------------------------- /test/fixtures/TypeCustomObject/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeCustomObject/.babelrc -------------------------------------------------------------------------------- /test/fixtures/TypeCustomObject/actual.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {MyObject} 3 | */ 4 | const value = {}; -------------------------------------------------------------------------------- /test/fixtures/TypeCustomObject/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeCustomObject/expected.js -------------------------------------------------------------------------------- /test/fixtures/TypeExportExpression/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeExportExpression/.babelrc -------------------------------------------------------------------------------- /test/fixtures/TypeExportExpression/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeExportExpression/actual.js -------------------------------------------------------------------------------- /test/fixtures/TypeExportExpression/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeExportExpression/expected.js -------------------------------------------------------------------------------- /test/fixtures/TypeString/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeString/.babelrc -------------------------------------------------------------------------------- /test/fixtures/TypeString/actual.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {string} 3 | */ 4 | const value = "s"; -------------------------------------------------------------------------------- /test/fixtures/TypeString/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeString/expected.js -------------------------------------------------------------------------------- /test/fixtures/TypeThisAssignMent/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeThisAssignMent/.babelrc -------------------------------------------------------------------------------- /test/fixtures/TypeThisAssignMent/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeThisAssignMent/actual.js -------------------------------------------------------------------------------- /test/fixtures/TypeThisAssignMent/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeThisAssignMent/expected.js -------------------------------------------------------------------------------- /test/fixtures/TypeVariableAssignMent/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeVariableAssignMent/.babelrc -------------------------------------------------------------------------------- /test/fixtures/TypeVariableAssignMent/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeVariableAssignMent/actual.js -------------------------------------------------------------------------------- /test/fixtures/TypeVariableAssignMent/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/TypeVariableAssignMent/expected.js -------------------------------------------------------------------------------- /test/fixtures/VariableDeclaration/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/VariableDeclaration/.babelrc -------------------------------------------------------------------------------- /test/fixtures/VariableDeclaration/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/VariableDeclaration/actual.js -------------------------------------------------------------------------------- /test/fixtures/VariableDeclaration/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/VariableDeclaration/expected.js -------------------------------------------------------------------------------- /test/fixtures/multiple-comments/.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/multiple-comments/.babelrc -------------------------------------------------------------------------------- /test/fixtures/multiple-comments/actual.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/multiple-comments/actual.js -------------------------------------------------------------------------------- /test/fixtures/multiple-comments/expected.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/test/fixtures/multiple-comments/expected.js -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require @babel/register 2 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/babel-plugin-jsdoc-to-assert/HEAD/yarn.lock --------------------------------------------------------------------------------