@mkaradeniz/eslint-config 4.0.1 → 4.0.2
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/base.mjs +10 -2
- package/package.json +1 -1
package/base.mjs
CHANGED
|
@@ -14,7 +14,15 @@ import tseslint from 'typescript-eslint';
|
|
|
14
14
|
import { baseRules } from './rules/baseRules.mjs';
|
|
15
15
|
import { typescriptRules } from './rules/typescriptRules.mjs';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// Try to include .gitignore if it exists, otherwise continue without it
|
|
18
|
+
let gitignoreConfig = [];
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const gitignorePath = fileURLToPath(new URL('../../.gitignore', import.meta.url));
|
|
22
|
+
gitignoreConfig = [includeIgnoreFile(gitignorePath)];
|
|
23
|
+
} catch {
|
|
24
|
+
// Silently continue without .gitignore
|
|
25
|
+
}
|
|
18
26
|
|
|
19
27
|
export const baseConfig = [
|
|
20
28
|
{ ...baseRules },
|
|
@@ -100,6 +108,6 @@ export const baseConfig = [
|
|
|
100
108
|
},
|
|
101
109
|
},
|
|
102
110
|
// Ignore patterns
|
|
103
|
-
|
|
111
|
+
...gitignoreConfig,
|
|
104
112
|
{ ignores: ['.next/**/*', 'dist/**/*', 'node_modules/**/*', 'out/**/*'] },
|
|
105
113
|
];
|