diff --git a/.editorconfig b/.editorconfig
index 3675dc8d..a9218384 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -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
diff --git a/blueocean-admin/src/main/js/AdminNavLink.jsx b/blueocean-admin/src/main/js/AdminNavLink.jsx
index 0675df62..18b12587 100644
--- a/blueocean-admin/src/main/js/AdminNavLink.jsx
+++ b/blueocean-admin/src/main/js/AdminNavLink.jsx
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React, { Component } from 'react';
export default class AdminNavLink extends Component {
render() {
diff --git a/blueocean-web/package.json b/blueocean-web/package.json
index bedad402..6cc11991 100644
--- a/blueocean-web/package.json
+++ b/blueocean-web/package.json
@@ -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": {
diff --git a/blueocean-web/src/main/js/about/AboutNavLink.jsx b/blueocean-web/src/main/js/about/AboutNavLink.jsx
index 0df5f63e..4219b24c 100644
--- a/blueocean-web/src/main/js/about/AboutNavLink.jsx
+++ b/blueocean-web/src/main/js/about/AboutNavLink.jsx
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React, { Component } from 'react';
export default class AboutNavLink extends Component {
render() {
diff --git a/blueocean-web/src/main/js/blueocean.js b/blueocean-web/src/main/js/blueocean.js
index b72b3fc3..f884900b 100644
--- a/blueocean-web/src/main/js/blueocean.js
+++ b/blueocean-web/src/main/js/blueocean.js
@@ -1,8 +1,7 @@
// Initialise the Blue Ocean app.
-var init = require('./init.jsx');
-
-init.initialize( () => {
+const init = require('./init.jsx');
+init.initialize(() => {
// start the App
require('./main.jsx');
});
diff --git a/blueocean-web/src/main/js/init.jsx b/blueocean-web/src/main/js/init.jsx
index f927be01..f8e29585 100644
--- a/blueocean-web/src/main/js/init.jsx
+++ b/blueocean-web/src/main/js/init.jsx
@@ -1,15 +1,15 @@
import AboutNavLink from './about/AboutNavLink.jsx';
-exports.initialize = function(oncomplete) {
+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();
});
diff --git a/blueocean-web/src/main/js/main.jsx b/blueocean-web/src/main/js/main.jsx
index b6e7a6e8..56b3a128 100644
--- a/blueocean-web/src/main/js/main.jsx
+++ b/blueocean-web/src/main/js/main.jsx
@@ -1,7 +1,7 @@
-import React, {Component} from 'react';
-import {render} from 'react-dom';
+import React, { Component } from 'react';
+import { render } from 'react-dom';
-import {ExtensionPoint} from '@jenkins-cd/js-extensions';
+import { ExtensionPoint } from '@jenkins-cd/js-extensions';
/**
* Root Blue Ocean UI component
@@ -22,7 +22,7 @@ class App extends Component {
This is a label warning styled using the Jenkins Design Language (using CSS class label-warning)
-
+