Skip to content

Commit 7cae621

Browse files
fix: NRP-2803 circular dependencies (#114)
* chore:move cn function to a separate file ideally index.ts files should be plain barrel exports * fix: cn function path everywhere to be a direct import barrel imports should not be used internally by the library * chore: add alias for shadcn * chore: use shadcn alias at components that cause circular dependencies * feat: add eslint Basic ESLint config to check for cycle dependencies, we can expand later as required * feat: introduce husky for pre-commit hooks * chore: trigger pre-release
1 parent 830dfd7 commit 7cae621

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4972
-1685
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint

eslint.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { fixupPluginRules } from "@eslint/compat";
2+
import tsParser from "@typescript-eslint/parser";
3+
import importPlugin from "eslint-plugin-import";
4+
5+
export default [
6+
{
7+
files: ["**/*.ts", "**/*.tsx"],
8+
languageOptions: {
9+
parser: tsParser,
10+
parserOptions: {
11+
project: "./tsconfig.json",
12+
sourceType: "module",
13+
ecmaVersion: "latest",
14+
},
15+
},
16+
plugins: {
17+
import: fixupPluginRules(importPlugin),
18+
},
19+
settings: {
20+
"import/parsers": {
21+
"@typescript-eslint/parser": [".ts", ".tsx"],
22+
},
23+
"import/resolver": {
24+
typescript: {
25+
alwaysTryTypes: true,
26+
project: "./tsconfig.json",
27+
},
28+
node: true,
29+
},
30+
},
31+
rules: {
32+
"import/no-cycle": ["error", { maxDepth: Infinity }],
33+
},
34+
},
35+
];

0 commit comments

Comments
 (0)