mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Lint
This commit is contained in:
@@ -8,7 +8,7 @@ import Header from './components/Header';
|
|||||||
import Tooltip from './components/Tooltip';
|
import Tooltip from './components/Tooltip';
|
||||||
import ModalImport from './components/ModalImport';
|
import ModalImport from './components/ModalImport';
|
||||||
import * as CompanionApiUtils from './utils/CompanionApiUtils';
|
import * as CompanionApiUtils from './utils/CompanionApiUtils';
|
||||||
import { outfitURL } from './utils/UrlGenerators'
|
import { outfitURL } from './utils/UrlGenerators';
|
||||||
|
|
||||||
import AboutPage from './pages/AboutPage';
|
import AboutPage from './pages/AboutPage';
|
||||||
import NotFoundPage from './pages/NotFoundPage';
|
import NotFoundPage from './pages/NotFoundPage';
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default class ComparisonTable extends TranslatedComponent {
|
|||||||
* @return {React.Component} Table row
|
* @return {React.Component} Table row
|
||||||
*/
|
*/
|
||||||
_buildRow(build, facets, formats, units) {
|
_buildRow(build, facets, formats, units) {
|
||||||
let url = outfitURL(build.id, build.toString(), build.buildName)
|
let url = outfitURL(build.id, build.toString(), build.buildName);
|
||||||
let cells = [
|
let cells = [
|
||||||
<td key='s' className='tl'><Link href={url}>{build.name}</Link></td>,
|
<td key='s' className='tl'><Link href={url}>{build.name}</Link></td>,
|
||||||
<td key='bn' className='tl'><Link href={url}>{build.buildName}</Link></td>
|
<td key='bn' className='tl'><Link href={url}>{build.buildName}</Link></td>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default class Modification extends TranslatedComponent {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var symbol;
|
let symbol;
|
||||||
if (name === 'jitter') {
|
if (name === 'jitter') {
|
||||||
symbol = '°';
|
symbol = '°';
|
||||||
} else if (name !== 'burst') {
|
} else if (name !== 'burst') {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default class Module {
|
|||||||
}
|
}
|
||||||
// We store percentages as decimals, so to get them back we need to divide by 10000. Otherwise
|
// We store percentages as decimals, so to get them back we need to divide by 10000. Otherwise
|
||||||
// we divide by 100. Both ways we end up with a value with two decimal places
|
// we divide by 100. Both ways we end up with a value with two decimal places
|
||||||
var modValue;
|
let modValue;
|
||||||
if (modification.type === 'percentage') {
|
if (modification.type === 'percentage') {
|
||||||
modValue = this.getModValue(name) / 10000;
|
modValue = this.getModValue(name) / 10000;
|
||||||
} else if (modification.type === 'numeric') {
|
} else if (modification.type === 'numeric') {
|
||||||
|
|||||||
@@ -1297,7 +1297,7 @@ export default class Ship {
|
|||||||
bulkheadBlueprint = this.bulkheads.m.blueprint;
|
bulkheadBlueprint = this.bulkheads.m.blueprint;
|
||||||
}
|
}
|
||||||
slots.push(bulkheadMods);
|
slots.push(bulkheadMods);
|
||||||
blueprints.push(bulkheadBlueprint)
|
blueprints.push(bulkheadBlueprint);
|
||||||
specials.push(bulkheadBlueprint ? bulkheadBlueprint.special : null);
|
specials.push(bulkheadBlueprint ? bulkheadBlueprint.special : null);
|
||||||
|
|
||||||
for (let slot of this.standard) {
|
for (let slot of this.standard) {
|
||||||
@@ -1386,7 +1386,7 @@ export default class Ship {
|
|||||||
buffer.writeInt8(slotMod.id, curpos++);
|
buffer.writeInt8(slotMod.id, curpos++);
|
||||||
if (isNaN(slotMod.value)) {
|
if (isNaN(slotMod.value)) {
|
||||||
// Need to write the string with exactly four characters, so pad with whitespace
|
// Need to write the string with exactly four characters, so pad with whitespace
|
||||||
buffer.write((" " + slotMod.value).slice(-4), curpos, 4);
|
buffer.write((' ' + slotMod.value).slice(-4), curpos, 4);
|
||||||
} else {
|
} else {
|
||||||
buffer.writeInt32LE(slotMod.value, curpos);
|
buffer.writeInt32LE(slotMod.value, curpos);
|
||||||
}
|
}
|
||||||
@@ -1414,7 +1414,7 @@ export default class Ship {
|
|||||||
* See updateModificationsString() for details of the structure.
|
* See updateModificationsString() for details of the structure.
|
||||||
* @param {String} buffer Buffer holding modification info
|
* @param {String} buffer Buffer holding modification info
|
||||||
* @param {Array} modArr Modification array
|
* @param {Array} modArr Modification array
|
||||||
* @param {Array} bluprintArr Blueprint array
|
* @param {Array} blueprintArr Blueprint array
|
||||||
*/
|
*/
|
||||||
decodeModificationsStruct(buffer, modArr, blueprintArr) {
|
decodeModificationsStruct(buffer, modArr, blueprintArr) {
|
||||||
let curpos = 0;
|
let curpos = 0;
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ export function shipFromJson(json) {
|
|||||||
function _addModifications(module, modifiers, blueprint, grade) {
|
function _addModifications(module, modifiers, blueprint, grade) {
|
||||||
if (!modifiers || !modifiers.modifiers) return;
|
if (!modifiers || !modifiers.modifiers) return;
|
||||||
|
|
||||||
var special;
|
let special;
|
||||||
for (const i in modifiers.modifiers) {
|
for (const i in modifiers.modifiers) {
|
||||||
// Some special modifications
|
// Some special modifications
|
||||||
if (modifiers.modifiers[i].name === 'mod_weapon_clip_size_override') {
|
if (modifiers.modifiers[i].name === 'mod_weapon_clip_size_override') {
|
||||||
|
|||||||
Reference in New Issue
Block a user