@dword-design/eslint-config 5.0.18 → 5.0.20
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/dist/create/index.js +3 -1
- package/package.json +3 -3
package/dist/create/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { compact, filter, join, map, omit } from '@dword-design/functions';
|
|
2
2
|
import confusingBrowserGlobals from 'confusing-browser-globals';
|
|
3
3
|
import packageName from 'depcheck-package-name';
|
|
4
|
+
import fs from 'fs-extra';
|
|
4
5
|
import loadPkg from 'load-pkg';
|
|
5
6
|
import { without } from 'lodash-es';
|
|
6
7
|
import restrictedImports from "./restricted-imports.js";
|
|
7
8
|
export default () => {
|
|
8
9
|
var _ref, _restrictedImports;
|
|
9
10
|
const packageConfig = loadPkg.sync() || {};
|
|
11
|
+
const baseConfig = fs.existsSync('.baserc.json') ? fs.readJsonSync('.baserc.json') : {};
|
|
10
12
|
const eslintRestrictedImports = (_ref = (_restrictedImports = restrictedImports, filter(importDef => importDef.alternative === undefined || importDef.alternative !== packageConfig.name)(_restrictedImports)), map(importDef => {
|
|
11
13
|
var _importDef, _ref2, _ref3;
|
|
12
14
|
return {
|
|
@@ -57,7 +59,7 @@ export default () => {
|
|
|
57
59
|
'import/no-commonjs': 'error',
|
|
58
60
|
'import/no-dynamic-require': 'off',
|
|
59
61
|
'import/no-extraneous-dependencies': ['error', {
|
|
60
|
-
devDependencies: ['**/*.spec.js', 'global-test-hooks.js']
|
|
62
|
+
devDependencies: ['**/*.spec.js', baseConfig.testRunner === 'playwright' ? 'playwright.config.js' : 'global-test-hooks.js']
|
|
61
63
|
}],
|
|
62
64
|
'import/order': 'off',
|
|
63
65
|
'import/prefer-default-export': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/eslint-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.20",
|
|
4
4
|
"repository": "dword-design/eslint-config",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"eslint-import-resolver-babel-module": "^5.3.0",
|
|
32
32
|
"eslint-import-resolver-exports": "^1.0.0-beta.5",
|
|
33
33
|
"eslint-plugin-github": "^5.0.0",
|
|
34
|
-
"eslint-plugin-import": "
|
|
34
|
+
"eslint-plugin-import": "npm:@dword-design/eslint-plugin-import@^0.1.0",
|
|
35
35
|
"eslint-plugin-json-format": "^2.0.1",
|
|
36
36
|
"eslint-plugin-prefer-arrow": "^1.1.6",
|
|
37
37
|
"eslint-plugin-prettier": "^5.1.3",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"eslint-plugin-sort-keys-fix": "^1.1.1",
|
|
41
41
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
42
42
|
"eslint-plugin-vue": "^9.10.0",
|
|
43
|
+
"fs-extra": "^11.3.0",
|
|
43
44
|
"jiti": "^1.18.2",
|
|
44
45
|
"load-pkg": "^4.0.0",
|
|
45
46
|
"lodash-es": "^4.17.21",
|
|
@@ -49,7 +50,6 @@
|
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@dword-design/base": "^11.0.1",
|
|
52
|
-
"deepmerge": "^4.2.2",
|
|
53
53
|
"eslint": "^8.35.0",
|
|
54
54
|
"execa": "^9.3.0",
|
|
55
55
|
"in-folder": "^1.0.3",
|