add import linting + fix checks

This commit is contained in:
Felix Roos 2023-01-28 21:00:42 +01:00
parent ea2d8b2773
commit 902f722d4c
17 changed files with 317 additions and 173 deletions

View File

@ -9,8 +9,9 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [],
"plugins": ["import"],
"rules": {
"no-unused-vars": ["warn", { "destructuredArrayIgnorePattern": ".", "ignoreRestSiblings": false }]
"no-unused-vars": ["warn", { "destructuredArrayIgnorePattern": ".", "ignoreRestSiblings": false }],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}]
}
}

View File

@ -6,4 +6,6 @@
**/dist
packages/mini/krill-parser.js
packages/xen/tunejs.js
paper
paper
pnpm-lock.yaml
pnpm-workspace.yaml

View File

@ -46,12 +46,22 @@
"url": "https://github.com/tidalcycles/strudel/issues"
},
"homepage": "https://strudel.tidalcycles.org",
"dependencies": {
"dependency-tree": "^9.0.0",
"vitest": "^0.25.7",
"@strudel.cycles/core": "workspace:*",
"@strudel.cycles/mini": "workspace:*",
"@strudel.cycles/tonal": "workspace:*",
"@strudel.cycles/transpiler": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*",
"@strudel.cycles/xen": "workspace:*"
},
"devDependencies": {
"@vitest/ui": "^0.25.7",
"c8": "^7.12.0",
"canvas": "^2.11.0",
"dependency-tree": "^9.0.0",
"eslint": "^8.28.0",
"eslint-plugin-import": "^2.27.5",
"events": "^3.3.0",
"gh-pages": "^4.0.0",
"jsdoc": "^3.6.10",
@ -59,13 +69,6 @@
"jsdoc-to-markdown": "^7.1.1",
"lerna": "^4.0.0",
"prettier": "^2.8.1",
"rollup-plugin-visualizer": "^5.8.1",
"vitest": "^0.25.7",
"@strudel.cycles/core": "workspace:*",
"@strudel.cycles/transpiler": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*",
"@strudel.cycles/mini": "workspace:*",
"@strudel.cycles/tonal": "workspace:*",
"@strudel.cycles/xen": "workspace:*"
"rollup-plugin-visualizer": "^5.8.1"
}
}

View File

@ -11,5 +11,11 @@
},
"devDependencies": {
"vite": "^3.2.0"
},
"dependencies": {
"@strudel.cycles/core": "workspace:*",
"@strudel.cycles/mini": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*",
"@strudel.cycles/tonal": "workspace:*"
}
}

View File

@ -27,5 +27,8 @@
"dependencies": {
"fraction.js": "^4.2.0"
},
"gitHead": "0e26d4e741500f5bae35b023608f062a794905c2"
"gitHead": "0e26d4e741500f5bae35b023608f062a794905c2",
"devDependencies": {
"vitest": "^0.25.7"
}
}

View File

@ -26,7 +26,7 @@ export const backgroundImage = function (src, animateOptions = {}) {
({
style: () => (container.style = bg + ';' + value),
className: () => (container.className = value + ' ' + initialClassName),
}[option]());
})[option]();
};
const funcOptions = Object.entries(animateOptions).filter(([_, v]) => typeof v === 'function');
const stringOptions = Object.entries(animateOptions).filter(([_, v]) => typeof v === 'string');

View File

@ -37,6 +37,7 @@
"shift-traverser": "^1.0.0"
},
"devDependencies": {
"@strudel.cycles/mini": "workspace:*"
"@strudel.cycles/mini": "workspace:*",
"vitest": "^0.25.7"
}
}

View File

@ -31,6 +31,7 @@
"@strudel.cycles/tone": "workspace:*"
},
"devDependencies": {
"peggy": "^2.0.1"
"peggy": "^2.0.1",
"vitest": "^0.25.7"
}
}

View File

@ -29,5 +29,8 @@
"@tonaljs/tonal": "^4.7.2",
"chord-voicings": "^0.0.1",
"webmidi": "^3.0.21"
},
"devDependencies": {
"vitest": "^0.25.7"
}
}

View File

@ -24,5 +24,8 @@
"dependencies": {
"@strudel.cycles/core": "workspace:*",
"tone": "^14.7.77"
},
"devDependencies": {
"vitest": "^0.25.7"
}
}

View File

@ -28,5 +28,8 @@
"acorn": "^8.8.1",
"escodegen": "^2.0.0",
"estree-walker": "^3.0.1"
},
"devDependencies": {
"vitest": "^0.25.8"
}
}

View File

@ -23,6 +23,10 @@
"homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": {
"@strudel.cycles/core": "workspace:*",
"@strudel.cycles/webaudio": "workspace:*",
"WebDirt": "github:dktr0/WebDirt"
},
"devDependencies": {
"vitest": "^0.25.7"
}
}

View File

@ -25,5 +25,8 @@
"homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": {
"@strudel.cycles/core": "workspace:*"
},
"devDependencies": {
"vitest": "^0.25.7"
}
}

418
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,8 @@
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
"remark-toc": "^8.0.1",
"tailwindcss": "^3.2.4"
"tailwindcss": "^3.2.4",
"canvas": "^2.11.0"
},
"devDependencies": {
"html-escaper": "^3.0.3"

View File

@ -40,7 +40,7 @@ export const ALGOLIA = {
apiKey: 'XXXXXXXXXX',
};
export type Sidebar = Record<typeof KNOWN_LANGUAGE_CODES[number], Record<string, { text: string; link: string }[]>>;
export type Sidebar = Record<(typeof KNOWN_LANGUAGE_CODES)[number], Record<string, { text: string; link: string }[]>>;
export const SIDEBAR: Sidebar = {
en: {
Tutorial: [

View File

@ -6,5 +6,5 @@ export const langPathRegex = /\/([a-z]{2}-?[A-Z]{0,2})\//;
export function getLanguageFromURL(pathname: string) {
const langCodeMatch = pathname.match(langPathRegex);
const langCode = langCodeMatch ? langCodeMatch[1] : 'en';
return langCode as typeof KNOWN_LANGUAGE_CODES[number];
return langCode as (typeof KNOWN_LANGUAGE_CODES)[number];
}