Merge branch 'dev' into feature/add-infiltration-faction

This commit is contained in:
Jack 2022-03-26 10:59:24 +08:00 committed by GitHub
commit 557f0d8bff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 130 additions and 150927 deletions

@ -0,0 +1,85 @@
name: Check for Generated Files
on:
# Triggers the workflow on push or pull request events but only for the dev branch
pull_request:
branches: [dev]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
checkFiles:
name: Check Files
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v2
- name: Check bundle files
id: changed-bundle-files
uses: tj-actions/changed-files@v18.4
with:
files: |
dist/*
index.html
main.bundle.js
main.bundle.js.map
- name: Check documentation changes
id: changed-markdown-doc-files
uses: tj-actions/changed-files@v18.4
with:
files: |
markdown/*.md
- name: Warn when bundle files were changed
id: warn-bundles-changed
if: steps.changed-bundle-files.outputs.any_changed == 'true'
run: |
echo "One or more files in the bundle files were changed." >> warnings.txt
- name: Warn when documentation markdown files were changed
id: warn-markdown-changed
if: steps.changed-markdown-doc-files.outputs.any_changed == 'true'
run: |
echo "One or more files in the markdown documentation were changed." >> warnings.txt
- name: Print Warnings
id: get-warnings
run: |
if [ -f warnings.txt ]
then
echo "::set-output name=has_warnings::true"
else
echo "::set-output name=has_warnings::false"
touch warnings.txt
fi
- name: Get Comment Body
id: get-comment-body
if : steps.get-warnings.outputs.has_warnings == 'true'
run: |
cat warnings.txt > comment.txt
echo "" >> comment.txt
echo "Please do not commit files generated by webpack or generated markdown" >> comment.txt
echo "" >> comment.txt
echo "See [CONTRIBUTING.md](https://github.com/danielyxie/bitburner/blob/dev/doc/CONTRIBUTING.md) for details." >> comment.txt
body=$(cat comment.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Add github comment on problem
if : steps.get-warnings.outputs.has_warnings == 'true'
uses: peter-evans/commit-comment@v1
with:
body: ${{ steps.get-comment-body.outputs.body }}
- name: Flag as error
if : steps.get-warnings.outputs.has_warnings == 'true'
run: |
COMMIT_WARNINGS=$(cat warnings.txt)
echo "::warning:: $COMMIT_WARNINGS"
exit 1

@ -1,23 +0,0 @@
.staneksgift_row {
padding: 0;
margin: 0;
}
.staneksgift_cell {
width: 25px;
height: 25px;
background-color: #808080;
font-color: white;
padding: 0px;
margin: 0px;
border: 1px solid black;
float: left;
}
.staneksgift_cell:first-child {
clear: left;
}
.staneksgift_container {
position: fixed;
}

@ -1,2 +0,0 @@
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={2:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;u.push([1281,0]),o()}({1281:function(n,t,o){"use strict";o.r(t);o(1282),o(1284),o(1286),o(1288),o(1290),o(1292),o(1294),o(1296),o(1298),o(1300),o(1302),o(1304),o(1306),o(1308),o(1310),o(1312),o(1314),o(1316),o(1318),o(1320),o(1322),o(1324),o(1326),o(1328),o(1330),o(1332),o(1334),o(1336),o(1338),o(1340)},1284:function(n,t,o){},1286:function(n,t,o){},1288:function(n,t,o){},1290:function(n,t,o){},1292:function(n,t,o){},1294:function(n,t,o){},1296:function(n,t,o){},1298:function(n,t,o){},1300:function(n,t,o){},1302:function(n,t,o){},1304:function(n,t,o){},1306:function(n,t,o){},1308:function(n,t,o){},1310:function(n,t,o){},1312:function(n,t,o){},1314:function(n,t,o){},1316:function(n,t,o){},1318:function(n,t,o){},1320:function(n,t,o){},1322:function(n,t,o){},1324:function(n,t,o){},1326:function(n,t,o){},1328:function(n,t,o){},1330:function(n,t,o){},1332:function(n,t,o){},1334:function(n,t,o){},1336:function(n,t,o){},1338:function(n,t,o){},1340:function(n,t,o){}});
//# sourceMappingURL=engineStyle.bundle.js.map

6070
dist/engineStyle.css vendored

File diff suppressed because it is too large Load Diff

301
dist/vendor.css vendored

@ -1,301 +0,0 @@
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */ }
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0; }
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0; }
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */ }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */ }
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent; }
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */ }
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder; }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */ }
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%; }
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sub {
bottom: -0.25em; }
sup {
top: -0.5em; }
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none; }
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */ }
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible; }
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none; }
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button; }
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0; }
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText; }
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em; }
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */ }
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline; }
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto; }
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto; }
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */ }
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; }
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */ }
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block; }
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item; }
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none; }
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none; }
/*# sourceMappingURL=vendor.css.map*/

File diff suppressed because one or more lines are too long

@ -3,7 +3,6 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Bitburner</title> <title>Bitburner</title>
<link rel="stylesheet" href="main.css" />
<style> <style>
body { body {
background-color: black; background-color: black;

@ -3,7 +3,6 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Bitburner</title> <title>Bitburner</title>
<link rel="stylesheet" href="main.css" />
<style> <style>
body { body {
background-color: black; background-color: black;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7461
main.css

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -13,10 +13,6 @@ cp -r dist/ext .package/dist
cp -r dist/icons .package/dist cp -r dist/icons .package/dist
cp -r dist/images .package/dist cp -r dist/images .package/dist
# The css files
cp dist/vendor.css .package/dist
cp main.css .package/main.css
# The js files. # The js files.
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
cp main.bundle.js .package/main.bundle.js cp main.bundle.js .package/main.bundle.js

@ -4,7 +4,6 @@ import { BladeburnerConstants } from "../data/Constants";
import { formatNumber } from "../../utils/StringHelperFunctions"; import { formatNumber } from "../../utils/StringHelperFunctions";
import { IBladeburner } from "../IBladeburner"; import { IBladeburner } from "../IBladeburner";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
interface IProps { interface IProps {
bladeburner: IBladeburner; bladeburner: IBladeburner;
} }
@ -23,8 +22,7 @@ export function SkillPage(props: IProps): React.ReactElement {
<strong>Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}</strong> <strong>Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}</strong>
</Typography> </Typography>
<Typography> <Typography>
You will gain one skill point every{" "} You will gain one skill point every {BladeburnerConstants.RanksPerSkillPoint} ranks.
{BladeburnerConstants.RanksPerSkillPoint * BitNodeMultipliers.BladeburnerSkillCost} ranks.
<br /> <br />
Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different
skills with each other is multiplicative. skills with each other is multiplicative.

@ -19,14 +19,14 @@ export class StaneksGift implements IStaneksGift {
fragments: ActiveFragment[] = []; fragments: ActiveFragment[] = [];
baseSize(): number { baseSize(): number {
return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13); return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13)
} }
width(): number { width(): number {
return Math.floor(this.baseSize() / 2 + 1); return Math.min(Math.floor(this.baseSize() / 2 + 1),StanekConstants.MaxSize);
} }
height(): number { height(): number {
return Math.floor(this.baseSize() / 2 + 0.6); return Math.min(Math.floor(this.baseSize() / 2 + 0.6),StanekConstants.MaxSize);
} }
charge(player: IPlayer, af: ActiveFragment, threads: number): void { charge(player: IPlayer, af: ActiveFragment, threads: number): void {

@ -1,7 +1,9 @@
export const StanekConstants: { export const StanekConstants: {
RAMBonus: number; RAMBonus: number;
BaseSize: number; BaseSize: number;
MaxSize: number;
} = { } = {
RAMBonus: 0.1, RAMBonus: 0.1,
BaseSize: 9, BaseSize: 9,
MaxSize: 25
}; };

@ -19,6 +19,7 @@ import { IRouter } from "../../ui/Router";
import { Faction } from "../Faction"; import { Faction } from "../Faction";
import { joinFaction } from "../FactionHelpers"; import { joinFaction } from "../FactionHelpers";
import { Factions } from "../Factions"; import { Factions } from "../Factions";
import { FactionNames } from "../data/FactionNames";
export const InvitationsSeen: string[] = []; export const InvitationsSeen: string[] = [];
@ -80,6 +81,11 @@ export function FactionsRoot(props: IProps): React.ReactElement {
).length; ).length;
} }
const allFactions = Object.values(FactionNames).map(faction => faction as string)
const allJoinedFactions = props.player.factions.slice(0);
allJoinedFactions.sort((a, b) =>
allFactions.indexOf(a) - allFactions.indexOf(b));
return ( return (
<Container disableGutters maxWidth="md" sx={{ mx: 0, mb: 10 }}> <Container disableGutters maxWidth="md" sx={{ mx: 0, mb: 10 }}>
<Typography variant="h4">Factions</Typography> <Typography variant="h4">Factions</Typography>
@ -92,11 +98,11 @@ export function FactionsRoot(props: IProps): React.ReactElement {
<Typography variant="h5" color="primary" mt={2} mb={1}> <Typography variant="h5" color="primary" mt={2} mb={1}>
Factions you have joined: Factions you have joined:
</Typography> </Typography>
{(props.player.factions.length > 0 && ( {(allJoinedFactions.length > 0 && (
<Paper sx={{ my: 1, p: 1, pb: 0, display: "inline-block" }}> <Paper sx={{ my: 1, p: 1, pb: 0, display: "inline-block" }}>
<Table padding="none" style={{ width: "fit-content" }}> <Table padding="none" style={{ width: "fit-content" }}>
<TableBody> <TableBody>
{props.player.factions.map((faction: string) => ( {allJoinedFactions.map((faction: string) => (
<TableRow key={faction}> <TableRow key={faction}>
<TableCell> <TableCell>
<Typography noWrap mb={1}> <Typography noWrap mb={1}>

@ -42,7 +42,6 @@ import { Terminal } from "../Terminal";
import { calculateHackingTime } from "../Hacking"; import { calculateHackingTime } from "../Hacking";
import { Server } from "../Server/Server"; import { Server } from "../Server/Server";
import { netscriptCanHack } from "../Hacking/netscriptCanHack"; import { netscriptCanHack } from "../Hacking/netscriptCanHack";
import { FactionNames } from "../Faction/data/FactionNames";
import { FactionInfos } from "../Faction/FactionInfo"; import { FactionInfos } from "../Faction/FactionInfo";
export function NetscriptSingularity( export function NetscriptSingularity(

@ -1,33 +0,0 @@
// These should really be imported with the module that is presenting that UI, but because they very much depend on the
// cascade order, we'll pull them all in here.
import "normalize.css";
import "../css/styles.scss";
import "../css/tooltips.scss";
import "../css/buttons.scss";
import "../css/mainmenu.scss";
import "../css/characteroverview.scss";
import "../css/scripteditor.scss";
import "../css/hacknetnodes.scss";
import "../css/menupages.scss";
import "../css/augmentations.scss";
import "../css/redpill.scss";
import "../css/stockmarket.scss";
import "../css/workinprogress.scss";
import "../css/popupboxes.scss";
import "../css/gameoptions.scss";
import "../css/interactivetutorial.scss";
import "../css/loader.scss";
import "../css/missions.scss";
import "../css/companymanagement.scss";
import "../css/bladeburner.scss";
import "../css/gang.scss";
import "../css/sleeves.scss";
import "../css/resleeving.scss";
import "../css/treant.css";
import "../css/grid.min.css";
import "../css/dev-menu.css";
import "../css/casino.scss";
import "../css/milestones.scss";
import "../css/infiltration.scss";
import "../css/staneksgift.scss";

@ -66,7 +66,7 @@ export function AlertManager(): React.ReactElement {
{alerts.length > 0 && ( {alerts.length > 0 && (
<Modal open={true} onClose={close}> <Modal open={true} onClose={close}>
<Box overflow="scroll" sx={{ overflowWrap: "break-word", whiteSpace: "pre-line" }}> <Box overflow="scroll" sx={{ overflowWrap: "break-word", whiteSpace: "pre-line" }}>
<Typography>{alerts[0].text}</Typography> <Typography component={'span'}>{alerts[0].text}</Typography>
</Box> </Box>
</Modal> </Modal>
)} )}

@ -18,6 +18,7 @@ import { Theme } from "@mui/material";
import { findRunningScript } from "../../Script/ScriptHelpers"; import { findRunningScript } from "../../Script/ScriptHelpers";
import { Player } from "../../Player"; import { Player } from "../../Player";
import { debounce } from "lodash"; import { debounce } from "lodash";
import { WorkerScriptStartStopEventEmitter } from "../../Netscript/WorkerScriptStartStopEventEmitter";
let layerCounter = 0; let layerCounter = 0;
@ -128,6 +129,23 @@ function LogWindow(props: IProps): React.ReactElement {
setRerender((old) => !old); setRerender((old) => !old);
} }
useEffect(
() =>
WorkerScriptStartStopEventEmitter.subscribe(() => {
setTimeout(() => {
const server = GetServer(script.server);
if (server === null) return;
const exisitingScript = findRunningScript(script.filename, script.args, server);
if (exisitingScript) {
exisitingScript.logs = script.logs.concat(exisitingScript.logs)
setScript(exisitingScript)
}
rerender();
}, 100)
}),
[],
);
useEffect(() => { useEffect(() => {
updateLayer(); updateLayer();
const id = setInterval(rerender, 1000); const id = setInterval(rerender, 1000);

@ -1,303 +0,0 @@
module.exports = {
plugins: [
"stylelint-order" /*,
"stylelint-scss" */,
],
rules: {
"at-rule-blacklist": [],
// "at-rule-empty-line-before": [
// "always",
// {
// except: [
// "inside-block", "blockless-after-same-name-blockless"
// ],
// ignore: [
// "after-comment"
// ]
// }
// ],
"at-rule-name-case": "lower",
"at-rule-name-newline-after": "always-multi-line",
"at-rule-name-space-after": "always",
// "at-rule-no-vendor-prefix": true,
"at-rule-semicolon-newline-after": "always",
"at-rule-semicolon-space-before": "never",
// "at-rule-whitelist": [
// "content",
// "else",
// "function",
// "if",
// "import",
// "include",
// "keyframes",
// "mixin",
// "return"
// ],
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-no-empty": true,
// "block-opening-brace-newline-after": "always",
// "block-opening-brace-newline-before": "never-single-line",
// "block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
// "color-named": "never",
//"color-no-hex": true,
"color-no-invalid-hex": true,
// "comment-empty-line-before": "always",
"comment-no-empty": true,
"comment-whitespace-inside": "always",
"comment-word-blacklist": [],
"custom-media-pattern": ".+",
"custom-property-empty-line-before": "never",
"custom-property-pattern": "my-.+",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
// "declaration-block-no-duplicate-properties": true,
"declaration-block-no-redundant-longhand-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
// "declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-before": "never",
// "declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
// "declaration-empty-line-before": "never",
//"declaration-no-important": true,
"declaration-property-unit-blacklist": {},
"declaration-property-unit-whitelist": {},
"declaration-property-value-blacklist": {},
"declaration-property-value-whitelist": {},
// "font-family-name-quotes": "always-where-recommended",
"font-family-no-duplicate-names": true,
"font-family-no-missing-generic-family-keyword": true,
// "font-weight-notation": "numeric",
"function-blacklist": [],
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-newline-before": "never-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 1,
"function-name-case": "lower",
"function-parentheses-newline-inside": "never-multi-line",
"function-parentheses-space-inside": "never",
"function-url-no-scheme-relative": true,
"function-url-quotes": "always",
"function-url-scheme-blacklist": [],
"function-url-scheme-whitelist": [],
// "function-whitelist": [
// "box-shadow-args",
// "map-get",
// "rgba",
// "skew",
// "var"
// ],
"keyframe-declaration-no-important": true,
"length-zero-no-unit": true,
"max-empty-lines": 1,
"max-line-length": 160,
"max-nesting-depth": 99,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-blacklist": [],
"media-feature-name-case": "lower",
"media-feature-name-no-unknown": true,
"media-feature-name-no-vendor-prefix": true,
"media-feature-name-whitelist": [],
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-newline-before": "never-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
// "no-descending-specificity": true,
"no-duplicate-at-import-rules": true,
// "no-duplicate-selectors": true,
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"no-unknown-animations": true,
"number-leading-zero": "always",
"number-max-precision": [4, { ignoreUnits: ["%"] }],
// "number-no-trailing-zeros": true,
"order/order": [
[
"dollar-variables",
"at-variables",
"custom-properties",
{
type: "at-rule",
name: "extend",
},
{
type: "at-rule",
name: "include",
},
"declarations",
"rules",
"at-rules",
"less-mixins",
],
{
unspecified: "bottom",
},
],
// "order/properties-order": [
// []
// ],
// "order/properties-alphabetical-order": true,
"property-blacklist": ["grid-area", "grid-template", "grid-column", "grid-row"],
"property-case": "lower",
"property-no-unknown": true,
// "property-no-vendor-prefix": true,
/*"property-whitelist": [
"/animation$/",
"/box-shadow$/",
"/keyframes$/",
"/transform$/",
"display",
"font-size"
], */
// "rule-empty-line-before": ["always", { except: [ "after-single-line-comment" ] }],
/*"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
"scss/at-else-empty-line-before": "never",
"scss/at-else-if-parentheses-space-before": "always",
"scss/at-extend-no-missing-placeholder": true,
"scss/at-function-named-arguments": "never",
"scss/at-function-parentheses-space-before": "never",
"scss/at-function-pattern": /.+/,
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
"scss/at-import-no-partial-leading-underscore": true,
"scss/at-import-partial-extension-blacklist": [
[]
],
"scss/at-import-partial-extension-whitelist": [
[]
],
"scss/at-mixin-argumentless-call-parentheses": "always",
"scss/at-mixin-named-arguments": "never",
"scss/at-mixin-parentheses-space-before": "never",
"scss/at-mixin-pattern": /.+/,
"scss/at-rule-no-unknown": [
true,
{
ignoreAtRules: []
}
],
"scss/dollar-variable-colon-newline-after": "always-multi-line",
"scss/dollar-variable-colon-space-after": "always-single-line",
"scss/dollar-variable-colon-space-before": "never",
"scss/dollar-variable-default": [
true,
{
ignore: "local"
}
],
"scss/dollar-variable-empty-line-before": "never",
"scss/dollar-variable-no-missing-interpolation": true,
"scss/dollar-variable-pattern": /.+/,
"scss/percent-placeholder-pattern": /.+/,
"scss/double-slash-comment-inline": [
"always",
{
ignore: [
"stylelint-commands"
]
}
],
"scss/double-slash-comment-whitespace-inside": "always",
"scss/declaration-nested-properties": "never",
"scss/media-feature-value-dollar-variable": "always",
"scss/operator-no-newline-after": true,
"scss/operator-no-newline-before": true,
"scss/operator-no-unspaced": true,
"scss/partial-no-import": true,
"scss/selector-no-redundant-nesting-selector": true,*/
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-blacklist": [],
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-attribute-operator-whitelist": ["="],
"selector-attribute-quotes": "always",
"selector-class-pattern": ".+",
//"selector-combinator-blacklist": [],
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
//"selector-combinator-whitelist": [],
"selector-descendant-combinator-no-non-space": true,
"selector-id-pattern": ".+",
"selector-list-comma-newline-after": "always-multi-line",
"selector-list-comma-newline-before": "never-multi-line",
"selector-list-comma-space-after": "always-single-line",
"selector-list-comma-space-before": "never",
"selector-max-attribute": 99,
"selector-max-class": 99,
"selector-max-combinators": 99,
"selector-max-compound-selectors": 99,
"selector-max-empty-lines": 1,
"selector-max-id": 1,
//"selector-max-specificity": "0,0,0",
"selector-max-type": 99,
"selector-max-universal": 1,
"selector-nested-pattern": ".+",
"selector-no-qualifying-type": [
true,
{
ignore: ["attribute", "class"],
},
],
"selector-no-vendor-prefix": true,
"selector-pseudo-class-blacklist": [],
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-class-whitelist": [
"active",
"after",
"before",
"checked",
"disabled",
"focus",
"hover",
"link",
"not",
"last-child",
"root",
"target",
"visited",
],
//"selector-pseudo-element-blacklist": [],
"selector-pseudo-element-case": "lower",
// "selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
//"selector-pseudo-element-whitelist": [],
"selector-type-case": "lower",
"selector-type-no-unknown": true,
// "shorthand-property-no-redundant-values": true,
// "sh-waqar/declaration-use-variable": [
// [
// "color",
// "background-color",
// "font-family"
// ]
// ],
// "string-quotes": "double",
"time-min-milliseconds": 50,
"unit-blacklist": [],
"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": ["deg", "fr", "px", "rem", "ms", "s", "vw", "%"],
// "value-keyword-case": "lower",
"value-list-max-empty-lines": 0,
"value-no-vendor-prefix": true,
},
};

@ -1,91 +0,0 @@
/**
* Webpack configuration for building unit tests
*/
/* eslint-disable @typescript-eslint/no-var-requires */
var path = require("path");
var webpack = require("webpack");
module.exports = () => {
const statsConfig = {
builtAt: true,
children: false,
chunks: false,
chunkGroups: false,
chunkModules: false,
chunkOrigins: false,
colors: true,
entrypoints: true,
};
return {
plugins: [
new webpack.DefinePlugin({
"process.env.NODE_ENV": '"development"',
}),
new webpack.ProvidePlugin({
// Automtically detect jQuery and $ as free var in modules
// and inject the jquery library
// This is required by many jquery plugins
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack
jquery: "jquery",
jQuery: "jquery",
$: "jquery",
}),
],
entry: "./test/index.js",
target: "web",
devtool: "source-map",
output: {
path: path.resolve(__dirname, "./"),
filename: "test/test.bundle.js",
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
},
{
test: /\.(jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
{
test: /\.s?css$/,
loader: "null-loader",
},
],
},
optimization: {
removeAvailableModules: true,
removeEmptyChunks: true,
mergeDuplicateChunks: true,
flagIncludedChunks: true,
occurrenceOrder: true,
sideEffects: true,
providedExports: true,
usedExports: true,
concatenateModules: false,
namedModules: false,
namedChunks: false,
minimize: false,
portableRecords: true,
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: `tests/vendor`,
chunks: "all",
},
},
},
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".jsx"],
},
stats: statsConfig,
};
};