@vijayhardaha/dev-config 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vijayhardaha/dev-config",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Reusable development configurations for Next.js + TypeScript projects",
5
5
  "author": "Vijay Hardaha",
6
6
  "license": "MIT",
@@ -62,11 +62,12 @@
62
62
  "eslint": "^9",
63
63
  "eslint-config-next": "^15",
64
64
  "eslint-config-prettier": "^10",
65
+ "eslint-import-resolver-typescript": "^4",
65
66
  "eslint-plugin-import": "^2",
66
67
  "eslint-plugin-jsx-a11y": "^6",
67
68
  "eslint-plugin-prettier": "^5",
68
- "eslint-plugin-react": "^7",
69
69
  "eslint-plugin-react-hooks": "^7",
70
+ "eslint-plugin-react": "^7",
70
71
  "globals": "^17",
71
72
  "prettier": "^3",
72
73
  "stylelint": "^17",
@@ -109,6 +110,9 @@
109
110
  "eslint-config-prettier": {
110
111
  "optional": false
111
112
  },
113
+ "eslint-import-resolver-typescript": {
114
+ "optional": true
115
+ },
112
116
  "eslint-plugin-import": {
113
117
  "optional": true
114
118
  },
@@ -155,6 +159,7 @@
155
159
  "@typescript-eslint/parser": "^8.57.2",
156
160
  "eslint": "^9.39.4",
157
161
  "eslint-config-prettier": "^10.1.8",
162
+ "eslint-import-resolver-typescript": "^4.4.4",
158
163
  "eslint-plugin-import": "^2.32.0",
159
164
  "eslint-plugin-prettier": "^5.5.5",
160
165
  "globals": "^17.4.0",
@@ -43,8 +43,13 @@ export const createConfig = (options = {}) => {
43
43
  // Apply to JavaScript files without TypeScript
44
44
  files: files.withoutTs,
45
45
 
46
+ // ---- Language Options ----
46
47
  languageOptions: commonLanguageOptions,
47
48
 
49
+ // ---- Settings ----
50
+ settings: { ...(importOrder && { 'import/resolver': { typescript: {} } }) },
51
+
52
+ // ---- Rules ----
48
53
  rules: {
49
54
  // ---- Unused Variables Rule ----
50
55
  // Report unused variables for JavaScript files
@@ -53,6 +53,7 @@ export const createConfig = (options = {}) => {
53
53
  // Apply to TypeScript files
54
54
  files: files.withTs,
55
55
 
56
+ // ---- Language Options ----
56
57
  languageOptions: {
57
58
  ...commonLanguageOptions,
58
59
  ...commonParser,
@@ -61,9 +62,13 @@ export const createConfig = (options = {}) => {
61
62
  parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir: process.cwd() },
62
63
  },
63
64
 
64
- // ---- React Settings ----
65
- ...(react && { settings: { react: { version: 'detect' } } }),
65
+ // ---- Settings ----
66
+ settings: {
67
+ ...(react && { react: { version: 'detect' } }),
68
+ ...(importOrder && { 'import/resolver': { typescript: {} } }),
69
+ },
66
70
 
71
+ // ---- Rules ----
67
72
  rules: {
68
73
  // ---- React Rules ----
69
74
  // Disable React import requirement (Next.js handles this)
@@ -50,6 +50,7 @@ export const createConfig = (options = {}) => {
50
50
  // Apply to TypeScript files
51
51
  files: files.withTs,
52
52
 
53
+ // ---- Language Options ----
53
54
  languageOptions: {
54
55
  ...commonLanguageOptions,
55
56
  ...commonParser,
@@ -58,9 +59,10 @@ export const createConfig = (options = {}) => {
58
59
  parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir: process.cwd() },
59
60
  },
60
61
 
61
- // ---- React Settings ----
62
- settings: { react: { version: 'detect' } },
62
+ // ---- Settings ----
63
+ settings: { react: { version: 'detect' }, ...(importOrder && { 'import/resolver': { typescript: {} } }) },
63
64
 
65
+ // ---- Rules ----
64
66
  rules: {
65
67
  // ---- React Rules ----
66
68
  // Disable React import requirement (Next.js handles this)
@@ -45,6 +45,7 @@ export const createConfig = (options = {}) => {
45
45
  // Apply to TypeScript files
46
46
  files: files.withTs,
47
47
 
48
+ // ---- Language Options ----
48
49
  languageOptions: {
49
50
  ...commonLanguageOptions,
50
51
  ...commonParser,
@@ -53,6 +54,10 @@ export const createConfig = (options = {}) => {
53
54
  parserOptions: { tsconfigRootDir: process.cwd() },
54
55
  },
55
56
 
57
+ // ---- Settings ----
58
+ settings: { ...(importOrder && { 'import/resolver': { typescript: {} } }) },
59
+
60
+ // ---- Rules ----
56
61
  rules: commonRules({ prettier, importOrder }),
57
62
  },
58
63
  ]);
@@ -37,7 +37,7 @@ export function createSitemapConfig(options = {}) {
37
37
 
38
38
  // ---- Transform Function ----
39
39
  // Add last modified timestamp to each entry
40
- transform: (_config, path) => {
40
+ transform: async (_config, path) => {
41
41
  return { loc: path, changefreq: _config.changefreq, priority: _config.priority, lastmod: lastModified };
42
42
  },
43
43