Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Upgrade to webpack 5 #81

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 80 additions & 83 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,80 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"globals": {
"__dirname": true
},
"extends": [
"standard"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
// Allow dangling commas,
"comma-dangle": "off",
"indent": [
"error",
2,
{
// Handle conflict with react/jsx-indent-props
"ignoredNodes": [
"JSXAttribute",
"JSXSpreadAttribute"
],
// Indent `case` clauses in `switch` statements
"SwitchCase": 1
}
],
// Props on multiple lines must be at the same indent as the first one
"react/jsx-indent-props": [
"error",
"first"
],
// Props all go on 1 line or if it is too long then 1 per line
"react/jsx-max-props-per-line": [
"error",
{
"maximum": 1,
"when": "multiline"
}
],
// Require jsx props be alphabetical order
"react/jsx-sort-props": [
"error"
],
// Prevents false no-unused-vars flag for jsx pragma
"react/jsx-uses-react": "error",
// Prevents false no-unused-vars flag for using component vars in jsx
"react/jsx-uses-vars": "error",
// Require semicolons
"semi": [
"error",
"always"
],
// Use `myFunction()` instead of `myFunction ()`
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
]
},
"settings": {
"react": {
// Matches the pragma in babel config
"pragma": "h"
}
}
}
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"globals": {
"__dirname": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
// Allow dangling commas,
"comma-dangle": "off",
"indent": [
"error",
2,
{
// Handle conflict with react/jsx-indent-props
"ignoredNodes": [
"JSXAttribute",
"JSXSpreadAttribute"
],
// Indent `case` clauses in `switch` statements
"SwitchCase": 1
}
],
// Props on multiple lines must be at the same indent as the first one
"react/jsx-indent-props": [
"error",
"first"
],
// Props all go on 1 line or if it is too long then 1 per line
"react/jsx-max-props-per-line": [
"error",
{
"maximum": 1,
"when": "multiline"
}
],
// Require jsx props be alphabetical order
"react/jsx-sort-props": [
"error"
],
// Prevents false no-unused-vars flag for jsx pragma
"react/jsx-uses-react": "error",
// Prevents false no-unused-vars flag for using component vars in jsx
"react/jsx-uses-vars": "error",
// Require semicolons
"semi": [
"error",
"always"
],
// Use `myFunction()` instead of `myFunction ()`
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
]
},
"settings": {
"react": {
// Matches the pragma in babel config
"pragma": "h"
}
}
}
2 changes: 1 addition & 1 deletion dist/bookmarklet.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/f-twelve.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/f-twelve.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/f-twelve.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ var _xhrHook = _interopRequireDefault(require("./utilities/xhrHook"));

var _consoleHook = _interopRequireDefault(require("./utilities/consoleHook"));

/**
* Main F-Twelve API
/**
* Main F-Twelve API
*/
// Render the app right away so it is functional even if it's not attached
var el = document.createElement('div');
Expand Down
4 changes: 2 additions & 2 deletions lib/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var _useNetworkData = _interopRequireDefault(require("./useNetworkData"));

var _useResizer3 = _interopRequireDefault(require("./useResizer"));

/**
* Root app view
/**
* Root app view
*/
var _default = function _default() {
var ref = (0, _preact.createRef)();
Expand Down
208 changes: 104 additions & 104 deletions lib/components/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,104 +1,104 @@
:local {
.app {
color: #333;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
font-family: verdana, sans-serif;
font-size: 12px;
z-index: 2147483647;
display: flex;
flex-direction: column;
height: 0;
}

.app dl {
margin: 5px 0;
display: flex;
flex-flow: row wrap;
}

.app dt {
font-weight: bold;
padding-right: 5px;
vertical-align: top;
-ms-user-select: none;
user-select: none;
flex: 0 0 auto;
}

.app dt::after {
content: ":";
}

.app dd {
font-family: monospace;
margin: 0;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1 1;
}

.icon > svg {
width: 40px;
height: 28px;
}

.icon {
cursor: pointer;
margin-left: 1px;
position: absolute;
bottom: -3px;
box-shadow: 3px 1px 5px #aaa;
height: 28px;
}

.icon:hover {
margin-bottom: 3px;
}

.open .icon {
bottom: unset;
top: -3px;
box-shadow: none;
}

.open .icon:hover {
margin-top: 3px;
}

.tab {
cursor: pointer;
padding: 4px 14px;
border-bottom: 2px solid transparent;
}

.tab:hover {
background-color: #eaeaea;
}

.activeTab {
border-color: #5c9a43;
}

.tabBar {
background-color: #f3f3f3;
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
padding-left: 45px;
display: flex;
}

.content {
position: relative;
background-color: #fff;
top: 0;
flex: 1 1 auto;
overflow-y: auto;
overflow-x: hidden;
display: block;
}

}
:local {
.app {
color: #333;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
font-family: verdana, sans-serif;
font-size: 12px;
z-index: 2147483647;
display: flex;
flex-direction: column;
height: 0;
}
.app dl {
margin: 5px 0;
display: flex;
flex-flow: row wrap;
}
.app dt {
font-weight: bold;
padding-right: 5px;
vertical-align: top;
-ms-user-select: none;
user-select: none;
flex: 0 0 auto;
}
.app dt::after {
content: ":";
}
.app dd {
font-family: monospace;
margin: 0;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1 1;
}
.icon > svg {
width: 40px;
height: 28px;
}
.icon {
cursor: pointer;
margin-left: 1px;
position: absolute;
bottom: -3px;
box-shadow: 3px 1px 5px #aaa;
height: 28px;
}
.icon:hover {
margin-bottom: 3px;
}
.open .icon {
bottom: unset;
top: -3px;
box-shadow: none;
}
.open .icon:hover {
margin-top: 3px;
}
.tab {
cursor: pointer;
padding: 4px 14px;
border-bottom: 2px solid transparent;
}
.tab:hover {
background-color: #eaeaea;
}
.activeTab {
border-color: #5c9a43;
}
.tabBar {
background-color: #f3f3f3;
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
padding-left: 45px;
display: flex;
}
.content {
position: relative;
background-color: #fff;
top: 0;
flex: 1 1 auto;
overflow-y: auto;
overflow-x: hidden;
display: block;
}
}
Loading