chore: lint
This commit is contained in:
parent
3217f7d986
commit
3973293961
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["plugin:prettier/recommended"],
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 6,
|
|
||||||
"sourceType": "module"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,4 +31,4 @@ node_modules
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
gh-pages
|
gh-pages
|
||||||
feedback.md
|
feedback*.md
|
||||||
|
|||||||
3
demo.js
3
demo.js
@ -200,6 +200,7 @@ const HOLIDAYS = [
|
|||||||
const mutablity = new Gantt('#mutability', tasks, {
|
const mutablity = new Gantt('#mutability', tasks, {
|
||||||
holidays: null,
|
holidays: null,
|
||||||
scroll_to: daysSince(-7),
|
scroll_to: daysSince(-7),
|
||||||
|
popup: () => false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const sideheader = new Gantt('#sideheader', tasks, {
|
const sideheader = new Gantt('#sideheader', tasks, {
|
||||||
@ -326,7 +327,6 @@ for (let [chart, details, after] of UPDATES) {
|
|||||||
let el = document.getElementById(id);
|
let el = document.getElementById(id);
|
||||||
|
|
||||||
el.onchange = (e) => {
|
el.onchange = (e) => {
|
||||||
console.log('changed', e.currentTarget.id, e.currentTarget.value);
|
|
||||||
let label = details[id];
|
let label = details[id];
|
||||||
let val;
|
let val;
|
||||||
if (e.currentTarget.type === 'checkbox') {
|
if (e.currentTarget.type === 'checkbox') {
|
||||||
@ -353,7 +353,6 @@ for (let [chart, details, after] of UPDATES) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof label === 'function') {
|
if (typeof label === 'function') {
|
||||||
console.log('ha', label(val, chart.options));
|
|
||||||
chart.update_options(label(val, chart.options));
|
chart.update_options(label(val, chart.options));
|
||||||
} else {
|
} else {
|
||||||
chart.update_options({
|
chart.update_options({
|
||||||
|
|||||||
19
eslint.config.mjs
Normal file
19
eslint.config.mjs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import path from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
import js from "@eslint/js";
|
||||||
|
import { FlatCompat } from "@eslint/eslintrc";
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
recommendedConfig: js.configs.recommended,
|
||||||
|
allConfig: js.configs.all
|
||||||
|
});
|
||||||
|
|
||||||
|
export default [...compat.extends("plugin:prettier/recommended"), {
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 6,
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
}];
|
||||||
@ -349,6 +349,7 @@
|
|||||||
id: 'Task 1',
|
id: 'Task 1',
|
||||||
progress: random(),
|
progress: random(),
|
||||||
important: true,
|
important: true,
|
||||||
|
dependencies: 'Task 0',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
start: daysSince(4),
|
start: daysSince(4),
|
||||||
@ -658,10 +659,6 @@
|
|||||||
let store = chart.options.scroll_to;
|
let store = chart.options.scroll_to;
|
||||||
let scroll = chart.$container.scrollLeft;
|
let scroll = chart.$container.scrollLeft;
|
||||||
if (typeof label === 'function') {
|
if (typeof label === 'function') {
|
||||||
console.log('k', {
|
|
||||||
...label(val),
|
|
||||||
scroll_to: null,
|
|
||||||
});
|
|
||||||
chart.update_options({
|
chart.update_options({
|
||||||
...label(val),
|
...label(val),
|
||||||
scroll_to: null,
|
scroll_to: null,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user