Enable eslint via js-builder
This commit is contained in:
parent
cc4d35e581
commit
68f0a21459
|
@ -40,6 +40,10 @@ indent_size = 4
|
|||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[**.jsx]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[**.css]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "blueocean-core",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"lint": "./node_modules/.bin/eslint .",
|
||||
"lint": "gulp lint",
|
||||
"lint:fix": "npm run lint -- --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// Initialise the Blue Ocean app.
|
||||
var init = require('./init.jsx');
|
||||
const init = require('./init.jsx');
|
||||
|
||||
init.initialize(() => {
|
||||
|
||||
// start the App
|
||||
require('./main.jsx');
|
||||
});
|
||||
|
|
|
@ -4,12 +4,12 @@ exports.initialize = function(oncomplete) {
|
|||
//
|
||||
// Application initialization.
|
||||
//
|
||||
var jenkinsMods = require('@jenkins-cd/js-modules');
|
||||
const jenkinsMods = require('@jenkins-cd/js-modules');
|
||||
|
||||
// Create and export the shared js-extensions instance. This
|
||||
// will be accessible to bundles from plugins etc at runtime, allowing them to register
|
||||
// extension point impls that can be rendered via the ExtensionPoint class.
|
||||
var extensions = require('@jenkins-cd/js-extensions');
|
||||
const extensions = require('@jenkins-cd/js-extensions');
|
||||
jenkinsMods.export('jenkins-cd', 'js-extensions', extensions);
|
||||
|
||||
// Create and export a shared instance of the design
|
||||
|
@ -18,19 +18,19 @@ exports.initialize = function(oncomplete) {
|
|||
jenkinsMods.export('jenkins-cd', 'jdl', jdl);
|
||||
|
||||
// Load and export the react modules, allowing them to be imported by other bundles.
|
||||
var react = require('react');
|
||||
var reactDOM = require('react-dom');
|
||||
const react = require('react');
|
||||
const reactDOM = require('react-dom');
|
||||
jenkinsMods.export('react', 'react', react);
|
||||
jenkinsMods.export('react', 'react-dom', reactDOM);
|
||||
|
||||
// Manually register extention points. TODO: we will be auto-registering these.
|
||||
extensions.store.addExtension("jenkins.topNavigation.menu", AboutNavLink);
|
||||
extensions.store.addExtension('jenkins.topNavigation.menu', AboutNavLink);
|
||||
|
||||
// Get the extension list metadata from Jenkins.
|
||||
// Might want to do some flux fancy-pants stuff for this.
|
||||
var $ = require('jquery-detached').getJQuery();
|
||||
var jenkinsRoot = jenkinsMods.getRootURL();
|
||||
$.getJSON(jenkinsRoot + '/blue/javaScriptExtensionInfo', function(data) {
|
||||
const $ = require('jquery-detached').getJQuery();
|
||||
const jenkinsRoot = jenkinsMods.getRootURL();
|
||||
$.getJSON(`${jenkinsRoot}/blue/javaScriptExtensionInfo`, (data) => {
|
||||
extensions.store.setExtensionPointMetadata(data);
|
||||
oncomplete();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue