@dword-design/base 12.0.6 → 12.0.8
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.
|
@@ -3,20 +3,17 @@ import packageName from 'depcheck-package-name';
|
|
|
3
3
|
export default function () {
|
|
4
4
|
return this.config.eslintConfig || endent`
|
|
5
5
|
${this.packageConfig.name === '@dword-design/eslint-config' ? endent`
|
|
6
|
-
import { defineConfig } from '${packageName`eslint`}/config';
|
|
6
|
+
import { defineConfig, globalIgnores } from '${packageName`eslint`}/config';
|
|
7
7
|
|
|
8
8
|
import config from './src/index.js';
|
|
9
9
|
` : endent`
|
|
10
10
|
import config from '${packageName`@dword-design/eslint-config`}';
|
|
11
|
-
import { defineConfig } from '${packageName`eslint`}/config';
|
|
11
|
+
import { defineConfig, globalIgnores } from '${packageName`eslint`}/config';
|
|
12
12
|
`}
|
|
13
13
|
|
|
14
14
|
export default defineConfig([
|
|
15
|
+
globalIgnores(['eslint.config.js']),
|
|
15
16
|
config,
|
|
16
|
-
{
|
|
17
|
-
files: ['eslint.config.js'],
|
|
18
|
-
rules: { 'import/no-extraneous-dependencies': 'off' },
|
|
19
|
-
},
|
|
20
17
|
]);\n
|
|
21
18
|
`;
|
|
22
19
|
}
|
package/dist/index.js
CHANGED
|
@@ -43,14 +43,14 @@ const mergeConfigs = (...configs) => {
|
|
|
43
43
|
return result;
|
|
44
44
|
};
|
|
45
45
|
class Base {
|
|
46
|
-
constructor(config) {
|
|
46
|
+
constructor(config = null) {
|
|
47
47
|
var _this$config$commands;
|
|
48
48
|
const jitiInstance = jiti(process.cwd(), {
|
|
49
49
|
esmResolve: true,
|
|
50
50
|
interopDefault: true,
|
|
51
51
|
transform: jitiBabelTransform
|
|
52
52
|
});
|
|
53
|
-
if (config ===
|
|
53
|
+
if (config === null) {
|
|
54
54
|
config = {
|
|
55
55
|
name: packageName`@dword-design/base-config-node`
|
|
56
56
|
};
|