Skip to content

Commit 612ef5d

Browse files
refactor: cleanup module implementation
1 parent 9f5dda5 commit 612ef5d

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

commitlint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export default {
2-
extends: ['@team23/commitlint-config'],
3-
};
1+
import config from './index.js';
2+
3+
export default config;

src/main.js renamed to index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import config from '@commitlint/config-conventional';
33
// add 'sec' and 'release' types
44
const types = config.rules['type-enum'][2].concat(['sec', 'release']);
55

6-
const Configuration = {
6+
export default {
77
extends: ['@commitlint/config-conventional'],
88
// Own rules
99
rules: {
@@ -15,5 +15,3 @@ const Configuration = {
1515
'type-enum': [2, 'always', types],
1616
},
1717
};
18-
19-
export default Configuration;

package.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
22
"name": "@team23/commitlint-config",
3+
"type": "module",
34
"version": "1.0.2",
45
"description": "Standard shareable config for commitlint",
6+
"main": "index.js",
7+
"files": [
8+
"index.js"
9+
],
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/team23/commitlint-config"
13+
},
514
"keywords": [
615
"commitlint",
716
"config",
@@ -11,20 +20,6 @@
1120
],
1221
"author": "TEAM23",
1322
"license": "MIT",
14-
"repository": {
15-
"type": "git",
16-
"url": "https://github.com/team23/commitlint-config"
17-
},
18-
"main": "src/main.js",
19-
"files": [
20-
"src/main.js"
21-
],
22-
"exports": {
23-
".": {
24-
"import": "./src/main.js"
25-
}
26-
},
27-
"type": "module",
2823
"dependencies": {
2924
"@commitlint/config-conventional": "19.8.1"
3025
},

0 commit comments

Comments
 (0)