@librestock/eslint-config 0.1.0 → 1.1.5

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/base.js +21 -9
  2. package/package.json +6 -3
package/base.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import js from '@eslint/js'
2
2
  import prettierConfig from 'eslint-config-prettier'
3
- import pluginImport from 'eslint-plugin-import'
3
+ import pluginImport from 'eslint-plugin-import-x'
4
4
  import pluginPromise from 'eslint-plugin-promise'
5
5
  import pluginUnicorn from 'eslint-plugin-unicorn'
6
6
  import globals from 'globals'
@@ -37,16 +37,28 @@ export default tseslint.config(
37
37
  // Import plugin configuration
38
38
  {
39
39
  plugins: {
40
- import: pluginImport,
40
+ 'import-x': pluginImport,
41
41
  },
42
42
  rules: {
43
- 'import/order': 'error',
44
- 'import/no-duplicates': 'error',
45
- 'import/no-cycle': 'error',
46
- 'import/no-self-import': 'error',
47
- 'import/first': 'error',
48
- 'import/newline-after-import': 'error',
49
- 'import/no-mutable-exports': 'error',
43
+ 'import-x/order': 'error',
44
+ 'import-x/no-duplicates': 'error',
45
+ 'import-x/no-cycle': 'error',
46
+ 'import-x/no-self-import': 'error',
47
+ 'import-x/first': 'error',
48
+ 'import-x/newline-after-import': 'error',
49
+ 'import-x/no-mutable-exports': 'error',
50
+ 'no-restricted-imports': [
51
+ 'error',
52
+ {
53
+ paths: [
54
+ {
55
+ name: '@librestock/types',
56
+ message:
57
+ 'Use explicit subpath imports, e.g. @librestock/types/<domain>.',
58
+ },
59
+ ],
60
+ },
61
+ ],
50
62
  },
51
63
  },
52
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@librestock/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "1.1.5",
4
4
  "description": "Shared ESLint configurations for LibreStock Inventory monorepo",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -15,6 +15,9 @@
15
15
  "./base": "./base.js",
16
16
  "./nestjs": "./nestjs.js"
17
17
  },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
18
21
  "files": [
19
22
  "*.js"
20
23
  ],
@@ -28,10 +31,10 @@
28
31
  "@typescript-eslint/eslint-plugin": "^8.50.1",
29
32
  "@typescript-eslint/parser": "^8.50.1",
30
33
  "eslint-config-prettier": "^10.1.8",
31
- "eslint-plugin-import": "^2.32.0",
34
+ "eslint-plugin-import-x": "^4.16.1",
32
35
  "eslint-plugin-promise": "^7.2.1",
33
36
  "eslint-plugin-unicorn": "^62.0.0",
34
37
  "globals": "^16.5.0",
35
38
  "typescript-eslint": "^8.50.1"
36
39
  }
37
- }
40
+ }