@bedrockio/eslint-plugin 1.1.5 → 1.1.7
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/cjs/jest.js +1 -1
- package/dist/cjs/node-imports.js +18 -6
- package/package.json +3 -1
- package/src/jest.js +1 -0
- package/src/node-imports.js +21 -4
package/dist/cjs/jest.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
9
9
|
var _default = exports.default = {
|
|
10
10
|
..._eslintPluginJest.default.configs['flat/recommended'],
|
|
11
11
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
12
|
-
files: ['**/__tests__/**/*.{js,jsx,ts,tsx}', '**/__mocks__/**/*.{js,jsx,ts,tsx}', '**/*.test.js', '**/*.spec.js'],
|
|
12
|
+
files: ['test/**/*.{js,jsx,ts,tsx}', '**/__tests__/**/*.{js,jsx,ts,tsx}', '**/__mocks__/**/*.{js,jsx,ts,tsx}', '**/*.test.js', '**/*.spec.js'],
|
|
13
13
|
languageOptions: {
|
|
14
14
|
globals: _eslintPluginJest.default.environments.globals.globals
|
|
15
15
|
},
|
package/dist/cjs/node-imports.js
CHANGED
|
@@ -8,10 +8,12 @@ var plugin = _interopRequireWildcard(require("eslint-plugin-import"));
|
|
|
8
8
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
9
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
10
|
var _default = exports.default = {
|
|
11
|
+
...plugin.flatConfigs.recommended,
|
|
11
12
|
files: ['**/*.{js,jsx}'],
|
|
12
13
|
ignores: ['node_modules/**/*', 'dist/**/*', '**/*.d.ts'],
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
languageOptions: {
|
|
15
|
+
ecmaVersion: 'latest',
|
|
16
|
+
sourceType: 'module'
|
|
15
17
|
},
|
|
16
18
|
rules: {
|
|
17
19
|
'import/no-unresolved': 'warn',
|
|
@@ -19,17 +21,27 @@ var _default = exports.default = {
|
|
|
19
21
|
'import/order': ['warn', {
|
|
20
22
|
'newlines-between': 'always-and-inside-groups',
|
|
21
23
|
pathGroups: [{
|
|
22
|
-
pattern: '
|
|
23
|
-
group: 'internal'
|
|
24
|
+
pattern: '+(stores|helpers|layouts|@stores|@helpers|@layouts){,/**}',
|
|
25
|
+
group: 'internal',
|
|
26
|
+
position: 'before'
|
|
24
27
|
}, {
|
|
25
|
-
pattern: '
|
|
28
|
+
pattern: '+(screens|modals|components|@screens|@modals|@components){,/**}',
|
|
26
29
|
group: 'internal'
|
|
30
|
+
}, {
|
|
31
|
+
pattern: '+(utils|@utils){,/**}',
|
|
32
|
+
group: 'internal',
|
|
33
|
+
position: 'after'
|
|
34
|
+
}, {
|
|
35
|
+
pattern: '+(assets|@assets){,**}',
|
|
36
|
+
group: 'sibling',
|
|
37
|
+
position: 'after'
|
|
27
38
|
}],
|
|
28
|
-
groups: ['builtin', 'external', 'internal', ['parent', 'sibling'], 'index', 'object', 'type']
|
|
39
|
+
groups: ['builtin', 'unknown', 'external', 'internal', ['parent', 'sibling'], 'index', 'object', 'type']
|
|
29
40
|
}]
|
|
30
41
|
},
|
|
31
42
|
settings: {
|
|
32
43
|
'import/resolver': {
|
|
44
|
+
exports: true,
|
|
33
45
|
node: {
|
|
34
46
|
moduleDirectory: ['node_modules', 'src']
|
|
35
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrockio/eslint-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Common ESLint plugin for Bedrock projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@eslint/js": "^9.19.0",
|
|
24
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
25
|
+
"eslint-import-resolver-exports": "^1.0.0-beta.5",
|
|
24
26
|
"eslint-plugin-import": "^2.31.0",
|
|
25
27
|
"eslint-plugin-jest": "^28.11.0",
|
|
26
28
|
"eslint-plugin-mdx": "^3.1.5",
|
package/src/jest.js
CHANGED
package/src/node-imports.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as plugin from 'eslint-plugin-import';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
+
...plugin.flatConfigs.recommended,
|
|
4
5
|
files: ['**/*.{js,jsx}'],
|
|
5
6
|
ignores: ['node_modules/**/*', 'dist/**/*', '**/*.d.ts'],
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
languageOptions: {
|
|
8
|
+
ecmaVersion: 'latest',
|
|
9
|
+
sourceType: 'module',
|
|
8
10
|
},
|
|
9
11
|
rules: {
|
|
10
12
|
'import/no-unresolved': 'warn',
|
|
@@ -15,16 +17,30 @@ export default {
|
|
|
15
17
|
'newlines-between': 'always-and-inside-groups',
|
|
16
18
|
pathGroups: [
|
|
17
19
|
{
|
|
18
|
-
pattern:
|
|
20
|
+
pattern:
|
|
21
|
+
'+(stores|helpers|layouts|@stores|@helpers|@layouts){,/**}',
|
|
19
22
|
group: 'internal',
|
|
23
|
+
position: 'before',
|
|
20
24
|
},
|
|
21
25
|
{
|
|
22
|
-
pattern:
|
|
26
|
+
pattern:
|
|
27
|
+
'+(screens|modals|components|@screens|@modals|@components){,/**}',
|
|
23
28
|
group: 'internal',
|
|
24
29
|
},
|
|
30
|
+
{
|
|
31
|
+
pattern: '+(utils|@utils){,/**}',
|
|
32
|
+
group: 'internal',
|
|
33
|
+
position: 'after',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
pattern: '+(assets|@assets){,**}',
|
|
37
|
+
group: 'sibling',
|
|
38
|
+
position: 'after',
|
|
39
|
+
},
|
|
25
40
|
],
|
|
26
41
|
groups: [
|
|
27
42
|
'builtin',
|
|
43
|
+
'unknown',
|
|
28
44
|
'external',
|
|
29
45
|
'internal',
|
|
30
46
|
['parent', 'sibling'],
|
|
@@ -37,6 +53,7 @@ export default {
|
|
|
37
53
|
},
|
|
38
54
|
settings: {
|
|
39
55
|
'import/resolver': {
|
|
56
|
+
exports: true,
|
|
40
57
|
node: {
|
|
41
58
|
moduleDirectory: ['node_modules', 'src'],
|
|
42
59
|
},
|