Skip to content

Commit 81d9ed1

Browse files
refactor: remove index file (#88)
Co-authored-by: Almanov Nikita <[email protected]>
1 parent 33e9e1e commit 81d9ed1

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
paths:
8-
- src/index.ts
8+
- src/**/*.ts
99
push:
1010
branches:
1111
- main
1212
paths:
13-
- src/index.ts
13+
- src/**/*.ts
1414

1515
permissions:
1616
actions: read

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default {
22
'*': 'prettier --write',
3-
'src/index.ts': 'eslint --fix',
3+
'src/**/*.ts': 'eslint --fix',
44
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"type": "module",
3737
"types": "index.d.ts",
3838
"imports": {
39-
"#src": "./src/index.ts"
39+
"#app": "./src/app.ts"
4040
},
4141
"exports": {
4242
".": "./index.js"

rollup.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,25 @@ import typescript from '@rollup/plugin-typescript';
88
const sourceFolder = 'src';
99

1010
const fileFormat = 'es';
11-
const fileName = 'index';
11+
const entryFileName = 'app';
12+
const outputFileName = 'index';
1213

13-
const declarationFile = `${fileName}.d.ts`;
14-
const indexFile = `${fileName}.ts`;
15-
const outputFile = `${fileName}.js`;
14+
const declarationFile = `${outputFileName}.d.ts`;
15+
const entryFile = `${entryFileName}.ts`;
16+
const outputFile = `${outputFileName}.js`;
1617

1718
export default defineConfig([
1819
{
1920
plugins: [typescript(), minify()],
20-
input: `${sourceFolder}/${indexFile}`,
21+
input: `${sourceFolder}/${entryFile}`,
2122
output: {
2223
file: outputFile,
2324
format: fileFormat,
2425
},
2526
},
2627
{
2728
plugins: [dts()],
28-
input: `${sourceFolder}/${indexFile}`,
29+
input: `${sourceFolder}/${entryFile}`,
2930
output: {
3031
file: declarationFile,
3132
format: fileFormat,

specs/define-config.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, expectTypeOf, test as spec } from 'vitest';
22

33
import type { UserConfig } from '@commitlint/types';
44

5-
import { defineConfig } from '#src';
5+
import { defineConfig } from '#app';
66

77
describe('Commitlint Config', () => {
88
spec('empty config', async () => {

src/index.ts renamed to src/app.ts

File renamed without changes.

0 commit comments

Comments
 (0)