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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, {Component} from 'react';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
export default class AdminNavLink extends Component {
|
||||
render() {
|
||||
|
|
|
@ -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,4 +1,4 @@
|
|||
import React, {Component} from 'react';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
export default class AboutNavLink extends Component {
|
||||
render() {
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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 <span className="label-info">label-warning</span>)
|
||||
</div>
|
||||
|
||||
<ExtensionPoint name="jenkins.main.body"/>
|
||||
<ExtensionPoint name="jenkins.main.body" />
|
||||
</main>
|
||||
<footer>
|
||||
<p>This is a footer. I'm sure you'll agree.</p>
|
||||
|
|
Loading…
Reference in New Issue