Skip to content

Commit

Permalink
run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Feb 24, 2024
1 parent ff38cf4 commit 3ea437d
Show file tree
Hide file tree
Showing 682 changed files with 146,733 additions and 130,057 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
// 'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit
'plugin:@typescript-eslint/eslint-recommended',
// 'plugin:react-hooks/recommended',
// 'plugin:react/recommended',
// 'plugin:react-hooks/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit, and we are moving away from react
// 'plugin:react/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit, and we are moving away from react
],
plugins: ['@typescript-eslint', 'prettier', 'react-hooks', 'react', 'tailwindcss'],
parser: '@typescript-eslint/parser',
Expand Down
106 changes: 53 additions & 53 deletions fbw-a32nx/mach.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,66 @@ const { typecheckingPlugin } = require('#build-utils');

/** @type { import('@synaptic-simulations/mach').MachConfig } */
module.exports = {
packageName: 'A32NX',
packageDir: 'out/flybywire-aircraft-a320-neo',
plugins: [
imagePlugin({ limit: -1 }),
postCssPlugin({
extract: true,
postcss: {
plugins: [
tailwind('../fbw-common/src/systems/instruments/src/EFB/tailwind.config.js'),
packageName: 'A32NX',
packageDir: 'out/flybywire-aircraft-a320-neo',
plugins: [
imagePlugin({ limit: -1 }),
postCssPlugin({
extract: true,
postcss: {
plugins: [
tailwind('../fbw-common/src/systems/instruments/src/EFB/tailwind.config.js'),

// transform: hsl(x y z / alpha) -> hsl(x, y, z, alpha)
postCssColorFunctionalNotation(),
// transform: hsl(x y z / alpha) -> hsl(x, y, z, alpha)
postCssColorFunctionalNotation(),

// transform: inset: 0; -> top/right/left/bottom: 0;
postCssInset(),
],
},
}),
typecheckingPlugin(),
],
instruments: [
msfsAvionicsInstrument('PFD'),
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),
// transform: inset: 0; -> top/right/left/bottom: 0;
postCssInset(),
],
},
}),
typecheckingPlugin(),
],
instruments: [
msfsAvionicsInstrument('PFD'),
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),

reactInstrument('SD'),
reactInstrument('DCDU'),
reactInstrument('RTPI'),
reactInstrument('RMP'),
reactInstrument('ISIS'),
reactInstrument('BAT'),
reactInstrument('ATC'),
reactInstrument('EFB', ['/Pages/VCockpit/Instruments/Shared/Map/MapInstrument.html']),
],
reactInstrument('SD'),
reactInstrument('DCDU'),
reactInstrument('RTPI'),
reactInstrument('RMP'),
reactInstrument('ISIS'),
reactInstrument('BAT'),
reactInstrument('ATC'),
reactInstrument('EFB', ['/Pages/VCockpit/Instruments/Shared/Map/MapInstrument.html']),
],
};

function msfsAvionicsInstrument(name, folder = name) {
return {
name,
index: `src/systems/instruments/src/${folder}/instrument.tsx`,
simulatorPackage: {
type: 'baseInstrument',
templateId: `A32NX_${name}`,
mountElementId: `${name}_CONTENT`,
fileName: name.toLowerCase(),
imports: ['/JS/dataStorage.js'],
},
};
return {
name,
index: `src/systems/instruments/src/${folder}/instrument.tsx`,
simulatorPackage: {
type: 'baseInstrument',
templateId: `A32NX_${name}`,
mountElementId: `${name}_CONTENT`,
fileName: name.toLowerCase(),
imports: ['/JS/dataStorage.js'],
},
};
}

function reactInstrument(name, additionalImports) {
return {
name,
index: `src/systems/instruments/src/${name}/index.tsx`,
simulatorPackage: {
type: 'react',
isInteractive: false,
fileName: name.toLowerCase(),
imports: ['/JS/dataStorage.js', '/JS/fbw-a32nx/A32NX_Simvars.js', ...(additionalImports ?? [])],
},
};
return {
name,
index: `src/systems/instruments/src/${name}/index.tsx`,
simulatorPackage: {
type: 'react',
isInteractive: false,
fileName: name.toLowerCase(),
imports: ['/JS/dataStorage.js', '/JS/fbw-a32nx/A32NX_Simvars.js', ...(additionalImports ?? [])],
},
};
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2021-2023 FlyByWire Simulations
//
// SPDX-License-Identifier: GPL-3.0

const WING_FUELRATE_GAL_SEC = 3.99;
const CENTER_MODIFIER = 3.0198;

Expand Down Expand Up @@ -80,8 +84,7 @@ class A32NX_Refuel {
SimVar.SetSimVarValue("FUEL TANK LEFT AUX QUANTITY", "Gallons", LOutTarget);
SimVar.SetSimVarValue("FUEL TANK RIGHT MAIN QUANTITY", "Gallons", RInnTarget);
SimVar.SetSimVarValue("FUEL TANK RIGHT AUX QUANTITY", "Gallons", ROutTarget);
}
else {
} else {
let multiplier = 1;
if (refuelRate == '1') { // fast
multiplier = 5;
Expand Down
Loading

0 comments on commit 3ea437d

Please sign in to comment.