父节点
f46e5d9ebe
当前提交
0d4a6e2c6c
|
@ -1,11 +1,6 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"wikimedia/client-es5",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki"
|
||||
],
|
||||
"env": {
|
||||
"commonjs": true
|
||||
}
|
||||
"wikimedia/server"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-env node */
|
||||
'use strict';
|
||||
module.exports = function ( grunt ) {
|
||||
var conf = grunt.file.readJSON( 'extension.json' );
|
||||
const conf = grunt.file.readJSON( 'extension.json' );
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
|
@ -10,8 +10,7 @@ module.exports = function ( grunt ) {
|
|||
banana: conf.MessagesDirs,
|
||||
stylelint: {
|
||||
all: [
|
||||
'**/*.css',
|
||||
'**/*.less',
|
||||
'**/*.{css,less}',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"wikimedia/client-es5",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki"
|
||||
],
|
||||
"env": {
|
||||
"commonjs": true
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* @class
|
||||
* @extends OO.ui.TextInputWidget
|
||||
* @mixins OO.ui.mixin.LookupElement
|
||||
* @mixin OO.ui.mixin.LookupElement
|
||||
*
|
||||
* @constructor
|
||||
* @param {Object} [config] Configuration options
|
||||
|
|
文件差异内容过多而无法显示
加载差异
10
package.json
10
package.json
|
@ -4,11 +4,11 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.20.0",
|
||||
"grunt": "1.4.0",
|
||||
"eslint-config-wikimedia": "0.22.1",
|
||||
"grunt": "1.4.1",
|
||||
"grunt-banana-checker": "0.9.0",
|
||||
"grunt-eslint": "23.0.0",
|
||||
"grunt-stylelint": "0.16.0",
|
||||
"stylelint-config-wikimedia": "0.11.1"
|
||||
"grunt-eslint": "24.0.0",
|
||||
"grunt-stylelint": "0.17.0",
|
||||
"stylelint-config-wikimedia": "0.12.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"extends": [
|
||||
"../../modules/.eslintrc.json",
|
||||
"wikimedia/qunit"
|
||||
]
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
spy = this.sandbox.spy( api, 'getCentralAuthToken' );
|
||||
|
||||
return api.get( {} ).then( function () {
|
||||
assert.notOk( spy.called, 'Anonymous users do not ask for centralauthtoken' );
|
||||
assert.false( spy.called, 'Anonymous users do not ask for centralauthtoken' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
);
|
||||
|
||||
return api.get( {} ).then( function () {
|
||||
assert.ok( spy.called, 'Called' );
|
||||
assert.true( spy.called, 'Called' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
);
|
||||
|
||||
return api.get( {} ).then( function () {
|
||||
assert.notOk( spy.called, 'Called' );
|
||||
assert.false( spy.called, 'Called' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
api = new mw.ForeignRest( '//localhost:4242/w/rest.php', actionApi );
|
||||
return api.get( '/hello' ).then( function () {
|
||||
assert.notOk( spy.called, 'Anonymous users do not ask for centralauthtoken' );
|
||||
assert.false( spy.called, 'Anonymous users do not ask for centralauthtoken' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
@ -47,8 +47,8 @@
|
|||
|
||||
api = new mw.ForeignRest( '//localhost:4242/w/rest.php', actionApi );
|
||||
return api.get( '/hello' ).then( function () {
|
||||
assert.ok( loginSpy.called, 'Login spy called' );
|
||||
assert.ok( tokenSpy.called, 'Token spy called' );
|
||||
assert.true( loginSpy.called, 'Login spy called' );
|
||||
assert.true( tokenSpy.called, 'Token spy called' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
@ -69,8 +69,8 @@
|
|||
|
||||
api = new mw.ForeignRest( '//localhost:4242/w/rest.php', actionApi );
|
||||
return api.get( {} ).then( function () {
|
||||
assert.ok( loginSpy.called, 'Login called' );
|
||||
assert.notOk( tokenSpy.called, 'Token not called' );
|
||||
assert.true( loginSpy.called, 'Login called' );
|
||||
assert.false( tokenSpy.called, 'Token not called' );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
|
正在加载...
在新工单中引用