Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More consistent formatting across the codebase. #372

Merged
merged 6 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ root = true

[*]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Expand Down
2 changes: 1 addition & 1 deletion apps/convert/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function update () {

output.tBodies[0].innerHTML = ret;
}
};
}

let urlParams = getURLParams();

Expand Down
2 changes: 1 addition & 1 deletion apps/picker-mavo/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ abbr {
}

.color-slider::-moz-range-track {
background: none;
background: none;
}

.color-slider-label {
Expand Down
4 changes: 2 additions & 2 deletions apps/picker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ abbr {
}

.color-slider::-moz-range-track {
background: none;
background: none;
}

.color-slider-label {
Expand Down Expand Up @@ -228,4 +228,4 @@ details {
color: inherit;
background: none;
border: none;
}
}
8 changes: 4 additions & 4 deletions assets/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ if (current) {
function idify (str) {
// from Mavo.Functions.idify()
return str
.normalize("NFD").replace(/[\u0300-\u036f]/g, "") // Convert accented letters to ASCII
.replace(/[^\w\s-]/g, "") // Remove remaining non-ASCII characters
.trim().replace(/\s+/g, "-") // Convert whitespace to hyphens
.toLowerCase();
.normalize("NFD").replace(/[\u0300-\u036f]/g, "") // Convert accented letters to ASCII
.replace(/[^\w\s-]/g, "") // Remove remaining non-ASCII characters
.trim().replace(/\s+/g, "-") // Convert whitespace to hyphens
.toLowerCase();
}

function makePageToc (pageToc) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (!Color.DEBUGGING) {
"color-green-blue-light": greenBlue(.5).set({"lch.l": 94}),
"color-blue-red-light": blueRed(.5).set({"lch.l": 94}),
};
window.vars = vars;
window.vars = vars;
$.create("style", {
inside: document.head,
textContent: `:root {
Expand Down
2 changes: 1 addition & 1 deletion notebook/color-notebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export default class Notebook {
let offset = nodeAtOffset.offsetTop - result.offsetTop
// Prevent overly tall results (e.g. long arrays of colors)
// to make the entire code area super tall
- Math.max(0, result.offsetHeight - 30);
- Math.max(0, result.offsetHeight - 30);

if (offset > 5) {
result.style.marginTop = offset + "px";
Expand Down
172 changes: 143 additions & 29 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"scripts": {
"test": "npx htest ./test",
"dtslint": "dtslint types",
"dtslint": "dtslint --expectOnly types",
"lint": "eslint . --fix --ext .js --ext .ts --ext .js --ext .cjs",
"build:css": "npx postcss \"**/*.postcss\" --base . --dir . --ext .css --config postcss.config.cjs",
"build:html": "npx @11ty/eleventy --config=.eleventy.cjs",
Expand Down Expand Up @@ -76,7 +76,7 @@
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@typescript-eslint/parser": "^5.59.1",
jgerigmeyer marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/parser": "latest",
"acorn": "latest",
"core-js": "^3.30.1",
"eslint": "latest",
Expand Down
12 changes: 6 additions & 6 deletions rollup.legacy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const legacyPlugins = [

export default defaultConfig.map(config =>
Object.assign(config, {
output: config.output.map(bundle => ({
...bundle,
file: bundle.file.replace(/\.(?:min\.)?\w+$/, ".legacy$&"),
})),
plugins: [...(config.plugins || []), ...legacyPlugins]
})
output: config.output.map(bundle => ({
...bundle,
file: bundle.file.replace(/\.(?:min\.)?\w+$/, ".legacy$&"),
})),
plugins: [...(config.plugins || []), ...legacyPlugins]
})
);