我有一个eslint的问题,它给了我[解析错误关键字导入是保留]这只发生在sublime,在原子编辑器工作得很好.我有意见
.eslintrc.js
module.exports = {
"extends": "airbnb",
"plugins": [
"react"
]
};
Run Code Online (Sandbox Code Playgroud)
的package.json
{
"name": "paint",
"version": "0.0.0",
"description": "paint on the browser",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"paint",
"javascript"
],
"author": "",
"license": "ISC",
"devDependencies": {
"browserify": "^11.2.0",
"eslint": "^2.2.0",
"eslint-config-airbnb": "^2.1.1",
"eslint-plugin-react": "^3.11.2",
"gulp-babel": "^5.2.1",
"gulp-clean": "^0.3.1",
"gulp-stylus": "^2.2.0",
"vinyl-source-stream": "^1.1.0"
}
}
Run Code Online (Sandbox Code Playgroud) 我正在运行OSX 10.6 Snow Leopard,已下载rhino1_7R2并将其移至/ usr/local /
但我知道(虽然这会阻止它被操作系统更新改变)这可能不是它的最佳位置,并想象它可能需要连接到Java安装.
我对Rhino的用途是从终端命令行运行JavaScript,我正在寻求帮助,因为我相信我缺乏Java知识来快速解决这个问题.
我将不胜感激任何帮助或建议链接,
谢谢保罗
我想将ngdoc文档添加到角度服务中的函数声明中.我如何在下面的示例中为myFunction执行此操作?
我估计我需要像@closure,@ functionOf或@functionIn这样的东西.
请注意(与myMethod相反)myFunction不是一种方法.
/**
* @ngdoc service
* @name myApp.service:myService
* @description
* My application.
*/
angular
.module('myApp')
.factory('myService', function() {
'use strict';
var x = 0;
/**
* @ngdoc function
* @name ?
* @description
* How can this be identified as being within the closure of
* myService, and not be described as a constructor?
*/
function myFunction (z) {
x++;
x += z;
}
return {
/**
* @ngdoc method
* @name myMethod
* @methodOf myApp.service:myService …Run Code Online (Sandbox Code Playgroud) javascript ×2
angularjs ×1
eslint ×1
java ×1
macos ×1
ngdoc ×1
parsing ×1
rhino ×1
sublimetext ×1