Skip to content

Commit

Permalink
fix(config-nx-scopes): replace import with require (#3865) (#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Jan 22, 2024
1 parent 7886d8b commit 3ede3e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions @commitlint/config-nx-scopes/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {RuleConfigSeverity} from '@commitlint/types';
const {RuleConfigSeverity} = require('@commitlint/types');
const {
getProjects: getNXProjects,
} = require('nx/src/generators/utils/project-configuration');
Expand All @@ -7,7 +7,8 @@ const {FsTree} = require('nx/src/generators/tree');
module.exports = {
utils: {getProjects},
rules: {
'scope-enum': (ctx) => Promise.resolve([RuleConfigSeverity.Error, 'always', getProjects(ctx)]),
'scope-enum': (ctx) =>
Promise.resolve([RuleConfigSeverity.Error, 'always', getProjects(ctx)]),
},
};

Expand Down

0 comments on commit 3ede3e0

Please sign in to comment.