@bedrockio/eslint-plugin 1.1.4 → 1.1.6

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.
@@ -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
- plugins: {
14
- import: plugin
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: 'utils',
23
- group: 'internal'
24
+ pattern: '+(stores|helpers|layouts|@stores|@helpers|@layouts){,/**}',
25
+ group: 'internal',
26
+ position: 'before'
24
27
  }, {
25
- pattern: 'utils/**',
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.4",
3
+ "version": "1.1.6",
4
4
  "description": "Common ESLint plugin for Bedrock projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,12 +13,16 @@
13
13
  "eslintplugin",
14
14
  "eslint-plugin"
15
15
  ],
16
+ "main": "./dist/cjs/index.js",
17
+ "module": "./src/index.js",
16
18
  "exports": {
17
19
  "import": "./src/index.js",
18
20
  "require": "./dist/cjs/index.js"
19
21
  },
20
22
  "dependencies": {
21
23
  "@eslint/js": "^9.19.0",
24
+ "eslint-import-resolver-alias": "^1.1.2",
25
+ "eslint-import-resolver-exports": "^1.0.0-beta.5",
22
26
  "eslint-plugin-import": "^2.31.0",
23
27
  "eslint-plugin-jest": "^28.11.0",
24
28
  "eslint-plugin-mdx": "^3.1.5",
@@ -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
- plugins: {
7
- import: plugin,
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: 'utils',
20
+ pattern:
21
+ '+(stores|helpers|layouts|@stores|@helpers|@layouts){,/**}',
19
22
  group: 'internal',
23
+ position: 'before',
20
24
  },
21
25
  {
22
- pattern: 'utils/**',
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
  },