-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/3768: Consider ESM when selecting cosmiconfig loaders (#3776)
* feat(load): use cosmiconfig-typescript-loader v5 to remove ts-node dependency for @commitlint/load * fix(load): add support for async loaders for ESM applications * chore(load): simplify loader selection for js/cjs files * docs: remove node version restriction from mjs config
- Loading branch information
1 parent
f9361f6
commit 68f4f09
Showing
32 changed files
with
223 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
formatter: '@commitlint/format' | ||
rules: | ||
zero: [0, 'never'] | ||
one: [1, 'always'] | ||
two: [2, 'never'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"formatter": "@commitlint/format", | ||
"rules": { | ||
"zero": [0, "never"], | ||
"one": [1, "always"], | ||
"two": [2, "never"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
formatter: '@commitlint/format' | ||
rules: | ||
zero: [0, 'never'] | ||
one: [1, 'always'] | ||
two: [2, 'never'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
formatter: '@commitlint/format' | ||
rules: | ||
zero: [0, 'never'] | ||
one: [1, 'always'] | ||
two: [2, 'never'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
8 changes: 8 additions & 0 deletions
8
@commitlint/load/fixtures/basic-config/esm/commitlint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
8 changes: 8 additions & 0 deletions
8
@commitlint/load/fixtures/basic-config/esm/commitlint.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
formatter: '@commitlint/format', | ||
rules: { | ||
zero: [0, 'never'], | ||
one: [1, 'always'], | ||
two: [2, 'never'], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "load-test-js" | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
@commitlint/load/fixtures/extends-config/esm/commitlint.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
extends: ['./first-extended'], | ||
rules: { | ||
zero: [0, 'never'], | ||
}, | ||
}; |
6 changes: 6 additions & 0 deletions
6
@commitlint/load/fixtures/extends-config/esm/commitlint.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
extends: ['./first-extended'], | ||
rules: { | ||
zero: [0, 'never'], | ||
}, | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "load-test-js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters