Skip to content

Commit 1717188

Browse files
committed
fix: shebang stuff
1 parent 45ffe83 commit 1717188

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

eslint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ const nodeRuleset = merge(...node, {
3030
},
3131
});
3232

33+
const nodeBinRuleset = {
34+
files: [`**/bin/*{js,mjs,cjs,ts,mts,cts}`],
35+
rules: {
36+
'n/shebang': [0],
37+
},
38+
};
39+
3340
const typeScriptRuleset = merge(...typescript, {
3441
files: [`**/*${commonFiles}`],
3542
ignores: [`packages/discord.js/**/*.{js,mjs,cjs}`],
@@ -104,6 +111,7 @@ export default defineConfig(
104111
},
105112
commonRuleset,
106113
nodeRuleset,
114+
nodeBinRuleset,
107115
typeScriptRuleset,
108116
{
109117
files: ['**/*{ts,mts,cts,tsx}'],

packages/create-discord-bot/bin/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import { styleText } from 'node:util';
24
import { Option, program } from 'commander';
35
import prompts from 'prompts';

packages/docgen/bin/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* eslint-disable n/shebang */
2+
33
import { createCommand } from 'commander';
44
import packageFile from '../package.json';
55
import { build } from '../src/index.js';

packages/scripts/bin/generateSplitDocumentation.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* eslint-disable n/shebang */
2+
33
import { readFile } from 'node:fs/promises';
44
import { createCommand } from 'commander';
55
import packageFile from '../package.json';
@@ -19,11 +19,8 @@ void generateSplitDocumentation(
1919
opts.all
2020
? {}
2121
: {
22-
fetchPackageVersions: async (_) => {
23-
return ['main'];
24-
},
25-
fetchPackageVersionDocs: async (_, __) => {
26-
return JSON.parse(await readFile(`${process.cwd()}/docs/docs.api.json`, 'utf8'));
27-
},
22+
fetchPackageVersions: async (_) => ['main'],
23+
fetchPackageVersionDocs: async (_, __) =>
24+
JSON.parse(await readFile(`${process.cwd()}/docs/docs.api.json`, 'utf8')),
2825
},
2926
).then(() => console.log('Generated split documentation.'));

0 commit comments

Comments
 (0)