Skip to content

Commit 11650c7

Browse files
committed
chore: fix linting and migrate to tsdown
1 parent 110abd8 commit 11650c7

37 files changed

+472
-447
lines changed

.vscode/settings.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
{
2-
"editor.detectIndentation": false,
3-
"editor.insertSpaces": true,
4-
"editor.tabSize": 2,
5-
2+
"prettier.enable": false,
3+
"editor.formatOnSave": false,
64
"editor.codeActionsOnSave": {
7-
"source.fixAll.eslint": "explicit"
5+
"source.fixAll.eslint": "explicit",
6+
"source.organizeImports": "never"
87
},
9-
10-
"eslint.useFlatConfig": true
11-
}
8+
"eslint.validate": [
9+
"javascript",
10+
"typescript",
11+
"markdown",
12+
"json",
13+
"jsonc",
14+
"yaml",
15+
"xml"
16+
]
17+
}

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors:
88
- name: LiterateInk
99
website: "https://literate.ink"
1010
email: contact@literate.ink
11-
repository-code: "https://github.com/LiterateInk/Unilim.JS"
11+
repository-code: "https://github.com/LiterateInk/Unilim.js"
1212
url: "https://unilim.docs.literate.ink/"
1313
repository-artifact: "https://www.npmjs.com/package/unilim"
1414
abstract: >-

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<img alt="Unilim: A purrfect API wrapper for Unilim" src="https://raw.githubusercontent.com/LiterateInk/Unilim.JS/main/.github/assets/banner.svg" width="100%" />
1+
<img alt="Unilim: A purrfect API wrapper for Unilim" src="https://raw.githubusercontent.com/LiterateInk/Unilim.js/main/.github/assets/banner.svg" width="100%" />
22

3-
*This library **is not** affiliated with [&nearr;&nbsp;University of Limoges](https://unilim.fr/) in any way.*
3+
_This library **is not** affiliated with [&nearr;&nbsp;University of Limoges](https://unilim.fr/) in any way._
44

55
## What is "Unilim" ?
66

@@ -28,9 +28,9 @@ bun add unilim
2828

2929
> TODO
3030
31-
You can find guides at [**&nearr;&nbsp;unilim.docs.literate.ink**](https://unilim.docs.literate.ink) and if it's not enough you can also take a look at the [**&nearr;&nbsp;examples** directory on the GitHub repository](https://github.com/LiterateInk/Unilim.JS/tree/main/examples) for inspiration.
31+
You can find guides at [**&nearr;&nbsp;unilim.docs.literate.ink**](https://unilim.docs.literate.ink) and if it's not enough you can also take a look at the [**&nearr;&nbsp;examples** directory on the GitHub repository](https://github.com/LiterateInk/Unilim.js/tree/main/examples) for inspiration.
3232

33-
If none of those are helpful, you can always [&nearr;&nbsp;open an issue](https://github.com/LiterateInk/Unilim.JS/issues) to ask for help or join the [&nearr;&nbsp;LiterateInk Discord server](https://literate.ink/discord).
33+
If none of those are helpful, you can always [&nearr;&nbsp;open an issue](https://github.com/LiterateInk/Unilim.js/issues) to ask for help or join the [&nearr;&nbsp;LiterateInk Discord server](https://literate.ink/discord).
3434

3535
## License
3636

bun.lock

Lines changed: 218 additions & 179 deletions
Large diffs are not rendered by default.

eslint.config.ts

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,2 @@
1-
import stylistic from "@stylistic/eslint-plugin";
2-
import typescript from "@typescript-eslint/parser";
3-
import perfectionist from "eslint-plugin-perfectionist";
4-
5-
export default [
6-
{ // Ignore the `dist` directory.
7-
ignores: [
8-
"dist/*"
9-
]
10-
},
11-
{ // Apply to `cjs`, `.mjs` and `.js` files.
12-
files: ["**/*.?([cm])js"]
13-
},
14-
{ // Apply to `.ts` files.
15-
files: ["**/*.ts"],
16-
languageOptions: {
17-
parser: typescript,
18-
parserOptions: {
19-
sourceType: "module"
20-
}
21-
}
22-
},
23-
{
24-
plugins: {
25-
"@stylistic": stylistic
26-
},
27-
rules: {
28-
"@stylistic/array-bracket-spacing": ["error", "never"],
29-
"@stylistic/arrow-parens": ["error", "always"],
30-
"@stylistic/arrow-spacing": "error",
31-
"@stylistic/block-spacing": ["error", "always"],
32-
"@stylistic/brace-style": ["error", "stroustrup"],
33-
"@stylistic/comma-dangle": ["error", "never"],
34-
"@stylistic/comma-spacing": ["error", { after: true, before: false }],
35-
"@stylistic/dot-location": ["error", "property"],
36-
"@stylistic/eol-last": ["error", "always"],
37-
"@stylistic/function-call-spacing": ["error", "never"],
38-
"@stylistic/indent": ["error", 2],
39-
"@stylistic/no-trailing-spaces": "error",
40-
"@stylistic/quotes": ["error", "double"],
41-
"@stylistic/semi": ["error", "always"]
42-
}
43-
},
44-
perfectionist.configs["recommended-alphabetical"]
45-
];
1+
import vexcited from "@vexcited/eslint-config";
2+
export default vexcited();

examples/_credentials.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { config } from "dotenv";
21
import { join } from "node:path";
2+
import { config } from "dotenv";
33

44
// Load the `.env` file configuration.
55
config({ path: join(__dirname, ".env") });

examples/biome/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { biome, cas } from "unilim";
22

33
import { credentials } from "../_credentials";
44

5-
void async function main () {
5+
void (async function main() {
66
// we authenticate to the CAS.
77
const cookie = await cas.login(credentials.username, credentials.password);
88

@@ -20,4 +20,4 @@ void async function main () {
2020

2121
// let's display the raw data, it's a lot of information!
2222
console.dir(profile, { depth: Infinity });
23-
}();
23+
}());

examples/cas/login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { cas } from "unilim";
22

33
import { credentials } from "../_credentials";
44

5-
void async function main () {
5+
void (async function main() {
66
// 1. we authenticate to the CAS.
77
const cookie = await cas.login(credentials.username, credentials.password);
88

@@ -13,4 +13,4 @@ void async function main () {
1313
// 3. we get the user information from the CAS (not from BIOME!)
1414
const user = await cas.user(token);
1515
console.log(`Hello, ${user.name} <${user.email}> !`);
16-
}();
16+
}());

examples/cas/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { cas } from "unilim";
22

33
import { credentials } from "../_credentials";
44

5-
void async function main () {
5+
void (async function main() {
66
// 1. we authenticate to the CAS.
77
const cookie = await cas.login(credentials.username, credentials.password);
88

99
// 2. we generate a ticket URL for an external service.
1010
const ticket = await cas.service(cookie, cas.EXTERNAL_SERVICES.COMMUNITIES_MOODLE);
1111

1212
console.log(ticket);
13-
}();
13+
}());

examples/iut/info/timetable/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import fs from "node:fs/promises";
22
import path from "node:path";
33
import { iut } from "unilim";
44

5-
void async function main () {
5+
void (async function main() {
66
const buffer = await fs.readFile(path.join(__dirname, "example.pdf"));
77
const timetable = await iut.info.timetable.getTimetableFromBuffer(buffer);
88

99
console.dir(timetable, { depth: Infinity });
10-
}();
10+
}());

0 commit comments

Comments
 (0)