@vijayhardaha/dev-config 1.0.2 → 1.0.4
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
package/src/eslint/next.js
CHANGED
|
@@ -13,7 +13,7 @@ import { defineConfig } from 'eslint/config';
|
|
|
13
13
|
|
|
14
14
|
import { setup, commonIgnores, commonParser, commonRules, commonLanguageOptions, files } from './common.js';
|
|
15
15
|
|
|
16
|
-
const { compat
|
|
16
|
+
const { compat } = setup();
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates an ESLint configuration object for Next.js projects with TypeScript
|
|
@@ -58,7 +58,7 @@ export const createConfig = (options = {}) => {
|
|
|
58
58
|
...commonParser,
|
|
59
59
|
// ---- Parser Options ----
|
|
60
60
|
// Configure TypeScript parser with React JSX support
|
|
61
|
-
parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir:
|
|
61
|
+
parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir: process.cwd() },
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
// ---- React Settings ----
|
package/src/eslint/react.js
CHANGED
|
@@ -13,7 +13,7 @@ import { defineConfig } from 'eslint/config';
|
|
|
13
13
|
|
|
14
14
|
import { setup, commonIgnores, commonParser, commonRules, commonLanguageOptions, files } from './common.js';
|
|
15
15
|
|
|
16
|
-
const { compat
|
|
16
|
+
const { compat } = setup();
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates an ESLint configuration object for React projects with TypeScript
|
|
@@ -55,7 +55,7 @@ export const createConfig = (options = {}) => {
|
|
|
55
55
|
...commonParser,
|
|
56
56
|
// ---- Parser Options ----
|
|
57
57
|
// Configure TypeScript parser with React JSX support
|
|
58
|
-
parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir:
|
|
58
|
+
parserOptions: { ecmaFeatures: { jsx: true }, tsconfigRootDir: process.cwd() },
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
// ---- React Settings ----
|
package/src/eslint/typescript.js
CHANGED
|
@@ -13,7 +13,7 @@ import { defineConfig } from 'eslint/config';
|
|
|
13
13
|
|
|
14
14
|
import { setup, commonIgnores, commonParser, commonRules, commonLanguageOptions, files } from './common.js';
|
|
15
15
|
|
|
16
|
-
const { compat
|
|
16
|
+
const { compat } = setup();
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates an ESLint configuration object for TypeScript projects.
|
|
@@ -50,7 +50,7 @@ export const createConfig = (options = {}) => {
|
|
|
50
50
|
...commonParser,
|
|
51
51
|
// ---- Parser Options ----
|
|
52
52
|
// Configure TypeScript parser
|
|
53
|
-
parserOptions: { tsconfigRootDir:
|
|
53
|
+
parserOptions: { tsconfigRootDir: process.cwd() },
|
|
54
54
|
},
|
|
55
55
|
|
|
56
56
|
rules: commonRules({ prettier, importOrder }),
|
|
@@ -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
|
|