Skip to content

Commit e2ee202

Browse files
fix: improve some rules (#102)
1 parent e2403b0 commit e2ee202

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

configs/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ const unicornRules = {
10161016
// No need
10171017
// "unicorn/prevent-abbreviations": "error",
10181018

1019-
"unicorn/relative-url-style": "error",
1019+
"unicorn/relative-url-style": ["error", "always"],
10201020

10211021
// No need
10221022
// "unicorn/require-array-join-separator": "error",

configs/markdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ async function getMarkdownRecommendedConfig() {
3838
},
3939
},
4040
rules: {
41+
"id-length": "off",
42+
4143
strict: "off",
4244

4345
// For different examples
@@ -70,7 +72,7 @@ async function getMarkdownRecommendedConfig() {
7072
"n/no-unpublished-import": "off",
7173

7274
// Allow to use any ES builtins in documentation
73-
"m/no-unsupported-features/es-builtins": "off",
75+
"n/no-unsupported-features/es-builtins": "off",
7476

7577
// Allow to use any ES syntax in documentation
7678
"n/no-unsupported-features/es-syntax": "off",

validation/my-ts-code.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const isFunction = typeof readFileSync === "function";
2424

2525
getSomething(isFunction);
2626

27-
const myPath: PathLike = new URL("file.txt", import.meta.url);
28-
const myPath2: PathOrFileDescriptor = new URL("file.text", import.meta.url);
27+
const myPath: PathLike = new URL("./file.txt", import.meta.url);
28+
const myPath2: PathOrFileDescriptor = new URL("./file.text", import.meta.url);
2929
const myTime: TimeLike = new Date();
3030

3131
getSomething(myPath);

validation/universal/code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function getRandomNumbers() {
3232
let content;
3333

3434
try {
35-
content = await readFile(new URL("file.txt", import.meta.url));
35+
content = await readFile(new URL("./file.txt", import.meta.url));
3636
} catch (err) {
3737
throw new Error("Error fetching data", { cause: err });
3838
}

0 commit comments

Comments
 (0)