@rebilly/eslint-config 4.32.3 → 4.32.4

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.
Files changed (2) hide show
  1. package/index.cjs +31 -0
  2. package/package.json +3 -1
package/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  const js = require('@eslint/js');
2
+ const importPlugin = require('eslint-plugin-import');
2
3
  const vitest = require('eslint-plugin-vitest');
3
4
  const globals = require('globals');
4
5
  const prettier = require('./prettier.cjs');
@@ -12,6 +13,25 @@ module.exports = [
12
13
  {
13
14
  plugins: {
14
15
  vitest,
16
+ import: importPlugin,
17
+ },
18
+ settings: {
19
+ 'import/resolver': {
20
+ node: {
21
+ extensions: [
22
+ '.js',
23
+ '.cjs',
24
+ '.mjs',
25
+ '.jsx',
26
+ '.ts',
27
+ '.tsx',
28
+ '.mts',
29
+ '.cts',
30
+ '.vue',
31
+ '.json',
32
+ ],
33
+ },
34
+ },
15
35
  },
16
36
  languageOptions: {
17
37
  ecmaVersion: 'latest',
@@ -22,6 +42,17 @@ module.exports = [
22
42
  },
23
43
  },
24
44
  rules: {
45
+ // Nx builds the project graph from package.json only
46
+ // (analyzeSourceFiles: false in nx.json), so imports must be declared.
47
+ 'import/no-extraneous-dependencies': [
48
+ 'error',
49
+ {
50
+ devDependencies: true,
51
+ optionalDependencies: true,
52
+ peerDependencies: true,
53
+ },
54
+ ],
55
+ 'import/no-relative-packages': 'error',
25
56
  'no-underscore-dangle': [
26
57
  'error',
27
58
  { allow: ['_links', '_embedded', '_dev'] },
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/Rebilly/rebilly.git"
8
8
  },
9
9
  "main": "index.cjs",
10
- "version": "4.32.3",
10
+ "version": "4.32.4",
11
11
  "files": [
12
12
  "index.cjs",
13
13
  "typescript.cjs",
@@ -26,6 +26,7 @@
26
26
  "@eslint/js": "^9.39.2",
27
27
  "eslint": "^9.39.2",
28
28
  "eslint-config-prettier": "^10.1.8",
29
+ "eslint-plugin-import": "^2.31.0",
29
30
  "eslint-plugin-vitest": "^0.5.4",
30
31
  "eslint-plugin-vue": "^10.6.2",
31
32
  "globals": "^17.0.0",
@@ -36,6 +37,7 @@
36
37
  "@eslint/js": "^9.39.2",
37
38
  "eslint": "^9.39.2",
38
39
  "eslint-config-prettier": "^10.1.8",
40
+ "eslint-plugin-import": "^2.31.0",
39
41
  "eslint-plugin-vitest": "^0.5.4",
40
42
  "eslint-plugin-vue": "^10.6.2",
41
43
  "globals": "^17.0.0",