Skip to content

Commit

Permalink
Add linting with oxlint and dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Feb 13, 2024
1 parent ea8da3d commit 3f4d1fd
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 130 deletions.
27 changes: 17 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 2.1.0 / 01 Oct 2022

Features:
* Support more chapter formats.

- Support more chapter formats.

## 2.0.1 / 21 Sep 2022

Bugfixes:
* Accept `/c/` vanity URLs.
* Fix crash when `items` is completely missing from Google response.
* Do not store `blockedIn` if it is empty.

- Accept `/c/` vanity URLs.
- Fix crash when `items` is completely missing from Google response.
- Do not store `blockedIn` if it is empty.

## 2.0.0 / 23 May 2022

Features:
* **breaking:** Add native ES module export.
* **breaking:** Require Node.js 14+.
* Strip " - Topic" from generated YouTube channel titles.
* When searching for a video URL, look up only that video. This saves a lot of quota.
* Search results and import previews use the original YouTube title.

- **breaking:** Add native ES module export.
- **breaking:** Require Node.js 14+.
- Strip " - Topic" from generated YouTube channel titles.
- When searching for a video URL, look up only that video. This saves a lot of quota.
- Search results and import previews use the original YouTube title.

Internal:
* Rewrite it in typescript.

- Rewrite it in typescript.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
üWave YouTube Media Source
==========================
# üWave YouTube Media Source

A üWave media source for searching through and importing videos from YouTube.

Expand All @@ -15,7 +14,7 @@ npm install --save u-wave-source-youtube
import uwave from 'u-wave-core';
import youTubeSource from 'u-wave-source-youtube';

const uw = uwave({ /* your config */ });
const uw = uwave({/* your config */});

uw.source('youtube', youTubeSource, {
// Get an API key as described here:
Expand All @@ -25,8 +24,8 @@ uw.source('youtube', youTubeSource, {
// See https://developers.google.com/youtube/v3/docs/search/list#parameters
// for available options.
search: {
safeSearch: 'moderate'
}
safeSearch: 'moderate',
},
});
```

Expand Down
25 changes: 25 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"typescript": {
"typeLiteral.separatorKind": "comma",
"quoteStyle": "preferSingle",
"jsx.quoteStyle": "preferDouble"
},
"json": {
},
"markdown": {
},
"includes": [
"src/**/*.{ts,tsx,js,jsx,cjs,mjs}",
"test/**/*.{ts,tsx,js,jsx,cjs,mjs}",
"./*.{md,json}"
],
"excludes": [
"**/node_modules",
"**/*-lock.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.88.7.wasm",
"https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/markdown-0.16.3.wasm"
]
}
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
"@types/http-errors": "^2.0.0",
"@types/node-fetch": "^2.5.4",
"@types/qs": "^6.9.4",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.21.2",
"dprint": "^0.45.0",
"nock": "^13.0.3",
"oxlint": "^0.2.8",
"tsup": "^8.0.1",
"typescript": "^5.0.2"
},
Expand All @@ -45,8 +42,9 @@
"scripts": {
"build": "tsup src/index.ts --format esm --dts",
"prepare": "npm run build",
"lint": "oxlint src && dprint check",
"tests-only": "node test/test.js",
"test": "npm run build && npm run tests-only"
"test": "npm run build && npm run tests-only && npm run lint"
},
"typings": "./dist/index.d.ts"
}

0 comments on commit 3f4d1fd

Please sign in to comment.