Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into update-from-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnversluis committed Sep 20, 2024
2 parents 0e33096 + a569db9 commit c507cde
Show file tree
Hide file tree
Showing 10 changed files with 1,509 additions and 1,598 deletions.
932 changes: 466 additions & 466 deletions README.md

Large diffs are not rendered by default.

86 changes: 0 additions & 86 deletions eslint.config.js

This file was deleted.

28 changes: 28 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
}
},
{
ignores: [
'lib/**/*',
'src/parser/*/peg_parser.ts',
]
}
);
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
"@babel/plugin-proposal-object-rest-spread": "^7.17.3",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@eslint/js": "^9.8.0",
"@eslint/core": "^0.6.0",
"@eslint/js": "^9.11.0",
"@parcel/packager-ts": "2.12.0",
"@parcel/transformer-typescript-types": "2.12.0",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.12",
"@types/lodash.get": "^4.4.7",
"@types/node": "^22.1.0",
Expand All @@ -41,14 +43,14 @@
"codemirror": "^6.0.1",
"detect-newline": "^4.0.1",
"esbuild": "^0.23.1",
"eslint": "^9.9.0",
"eslint": "^9.11.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^28.8.0",
"husky": "^9.1.5",
"jest": "^29.7.0",
"jsdoc-babel": "^0.5.0",
"jsdoc-to-markdown": "^8.0.3",
"jsdoc-to-markdown": "^9.0.1",
"parcel": "^2.4.1",
"parcel-transformer-hbs": "^1.0.4",
"peggy": "^4.0.2",
Expand All @@ -63,8 +65,8 @@
"ts-pegjs": "^4.2.1",
"tsc": "^2.0.4",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.2.0"
"typescript": "^5.6.2",
"typescript-eslint": "^8.6.0"
},
"scripts": {
"build": "yarn build:code-generate && yarn build:sources && yarn build:bundle && yarn build:check-types",
Expand Down
2 changes: 1 addition & 1 deletion script/debug_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async function run() {
const editorNode = textarea.nextSibling;
if (!editorNode) return;

// @ts-ignore
// @ts-expect-error There is no way to validate that the CodeMirror object is present
const editor = editorNode.CodeMirror;
editor.setValue(grammar);
}, parserSource);
Expand Down
6 changes: 4 additions & 2 deletions src/parser/chord_pro/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ export function breakChordLyricsPairOnSoftLineBreak(
chords: string,
lyrics: string,
): Array<SerializedChordLyricsPair | SerializedSoftLineBreak> {
const pairs = applySoftLineBreaks(lyrics || '');
let [first, ...rest] = pairs as Array<SerializedChordLyricsPair | SerializedSoftLineBreak>;
const pairs =
applySoftLineBreaks(lyrics || '') as Array<SerializedChordLyricsPair | SerializedSoftLineBreak>;
const [_first, ...rest] = pairs;
let first = pairs[0];
let addedLeadingChord: SerializedChordLyricsPair | null = null;

if (chords !== '') {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/chords_over_words/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ChordProperties = Omit<Chord, 'type'>;

function chordProperties(chord: Chord): ChordProperties {
// Disable no-unused-vars until destructuredObjectIgnorePattern is available
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { type: _type, ...properties } = chord;
return properties;
}
Expand Down
Loading

0 comments on commit c507cde

Please sign in to comment.