Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: config validation #2412

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3f6d95c
feat: basic user config validation
armano2 Jan 10, 2021
786e400
fix: simplify config resolution and fix issue #327
armano2 Jan 10, 2021
6f00690
fix: remove no longer needed function
armano2 Jan 10, 2021
a7f92d8
fix: disable some unwanted validations
armano2 Jan 10, 2021
ea26a8e
fix: improve config validation
armano2 Jan 10, 2021
fdf9ed1
fix: remove redundant validation
armano2 Jan 10, 2021
787fff4
fix: use reduceRight instead of reverse
armano2 Jan 10, 2021
f30080d
fix: rollback some code
armano2 Jan 10, 2021
737704e
fix: drop invalid type casts
armano2 Jan 10, 2021
0a131f7
fix: rollback unnecessary changes
armano2 Jan 10, 2021
f6aab6b
Merge branch 'master' into refactor/load
armano2 Jan 11, 2021
a76e70e
fix: rollback config validation
armano2 Jan 15, 2021
25b98f8
fix: add missing type-guards and restore order
armano2 Jan 15, 2021
f1ce3c5
fix: one more order change
armano2 Jan 15, 2021
8a2169f
fix: add one more missing type guard
armano2 Jan 15, 2021
207e756
fix: remove unused types reference
armano2 Jan 15, 2021
2441177
fix: add additional unit tests
armano2 Jan 16, 2021
b76b844
fix: add additional regression tests
armano2 Jan 16, 2021
c5663fa
fix: remove more unnecessary code changes
armano2 Jan 16, 2021
f35b1c6
fix: correct order of merging plugins
armano2 Jan 16, 2021
124760b
fix: add missing type check
armano2 Jan 16, 2021
c38923e
fix: remove invalid type check
armano2 Jan 17, 2021
ee0650d
fix: remove redundant code
armano2 Jan 17, 2021
5b5285b
feat: implement config validation
armano2 Jan 17, 2021
4d572d4
Merge branch 'master' into feat/validate-configs
armano2 Jan 20, 2021
0c1b6f0
Merge branch 'master' into feat/validate-configs
armano2 Jan 21, 2021
8bfb303
Merge branch 'master' into feat/validate-configs
armano2 Jan 30, 2021
ec96a13
Merge branch 'master' into feat/validate-configs
armano2 Nov 16, 2021
9c70aa8
Merge remote-tracking branch 'origin/master' into feat/validate-configs
armano2 Nov 28, 2021
90bf68b
fix: allow to use function as a rule
armano2 Nov 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: drop invalid type casts
  • Loading branch information
armano2 committed Jan 10, 2021
commit 737704e9b0664745e47de4d3f9e5ea3e0b202f91
2 changes: 1 addition & 1 deletion @commitlint/load/src/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default async function load(
}

// Resolve extends key
const extended = resolveExtends(config as any, {
const extended = resolveExtends(config, {
prefix: 'commitlint-config',
cwd: base,
parserPreset: config.parserPreset,
Expand Down
3 changes: 1 addition & 2 deletions @commitlint/load/src/utils/pick-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {UserConfig} from '@commitlint/types';
import pick from 'lodash/pick';

export const pickConfig = (input: unknown): UserConfig =>
export const pickConfig = (input: unknown): Record<string, unknown> =>
pick(
input,
'extends',
Expand Down