@scayle/eslint-config-storefront 4.4.1 → 4.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @aboutyou/eslint-config-sfc
2
2
 
3
+ ## 4.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Re-enable the Typescript ESLint plugin for non-nuxt packages.
8
+
9
+ ## 4.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Enable the `import/no-extraneous-dependencies` rule, with severity set to "warn".
14
+
3
15
  ## 4.4.1
4
16
 
5
17
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 SCAYLE GmbH
3
+ Copyright (c) 2025 SCAYLE GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -15,6 +15,7 @@ import {
15
15
  yaml,
16
16
  } from '@antfu/eslint-config'
17
17
  import gitignore from 'eslint-config-flat-gitignore'
18
+ import tseslint from 'typescript-eslint'
18
19
  import { sonarjs } from './sonarjs.mjs'
19
20
  import { promise } from './promise.mjs'
20
21
  import { sanitized } from './sanitized.mjs'
@@ -51,6 +52,27 @@ export const eslintConfigStorefront = function(config = {
51
52
  javascript(),
52
53
  typescript(config.typescript),
53
54
  jsdoc(),
55
+ tseslint.configs.recommended,
56
+ [{
57
+ rules: {
58
+ '@typescript-eslint/no-explicit-any': 'warn',
59
+ '@typescript-eslint/no-empty-object-type': ['error', {
60
+ 'allowInterfaces': 'always',
61
+ }],
62
+ '@typescript-eslint/no-unused-vars': [
63
+ 'error',
64
+ {
65
+ 'args': 'all',
66
+ 'argsIgnorePattern': '^_',
67
+ 'caughtErrors': 'all',
68
+ 'caughtErrorsIgnorePattern': '^_',
69
+ 'destructuredArrayIgnorePattern': '^_',
70
+ 'varsIgnorePattern': '^_',
71
+ 'ignoreRestSiblings': true,
72
+ },
73
+ ],
74
+ },
75
+ }],
54
76
  )
55
77
  : {}
56
78
 
@@ -70,6 +92,9 @@ export const eslintConfigStorefront = function(config = {
70
92
  rules: {
71
93
  // https://eslint.org/docs/latest/rules/curly
72
94
  'curly': ['error', 'all'],
95
+ 'import/no-extraneous-dependencies': ['warn', {
96
+ 'includeTypes': true,
97
+ }],
73
98
  },
74
99
  },
75
100
  {
@@ -80,6 +105,32 @@ export const eslintConfigStorefront = function(config = {
80
105
  },
81
106
  ignores: ['**/fixtures/**/*'],
82
107
  },
108
+ // Disable TypeScript ESLint rules for JSON files
109
+ {
110
+ files: ['**/*.json'],
111
+ rules: {
112
+ '@typescript-eslint/ban-ts-comment': 'off',
113
+ '@typescript-eslint/no-array-constructor': 'off',
114
+ '@typescript-eslint/no-duplicate-enum-values': 'off',
115
+ '@typescript-eslint/no-empty-object-type': 'off',
116
+ '@typescript-eslint/no-explicit-any': 'off',
117
+ '@typescript-eslint/no-extra-non-null-assertion': 'off',
118
+ '@typescript-eslint/no-misused-new': 'off',
119
+ '@typescript-eslint/no-namespace': 'off',
120
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
121
+ '@typescript-eslint/no-require-imports': 'off',
122
+ '@typescript-eslint/no-this-alias': 'off',
123
+ '@typescript-eslint/no-unnecessary-type-constraint': 'off',
124
+ '@typescript-eslint/no-unsafe-declaration-merging': 'off',
125
+ '@typescript-eslint/no-unsafe-function-type': 'off',
126
+ '@typescript-eslint/no-unused-expressions': 'off',
127
+ '@typescript-eslint/no-unused-vars': 'off',
128
+ '@typescript-eslint/no-wrapper-object-types': 'off',
129
+ '@typescript-eslint/prefer-as-const': 'off',
130
+ '@typescript-eslint/prefer-namespace-keyword': 'off',
131
+ '@typescript-eslint/triple-slash-reference': 'off',
132
+ },
133
+ },
83
134
  // Specific rules handling for test files
84
135
  {
85
136
  // See https://github.com/antfu/eslint-config/blob/main/src/globs.ts#L34
@@ -88,6 +139,9 @@ export const eslintConfigStorefront = function(config = {
88
139
  'no-console': 'off',
89
140
  },
90
141
  },
142
+ {
143
+ ignores: ['**/*.jsonc'],
144
+ },
91
145
  ]
92
146
 
93
147
  return flatConfigComposer.append(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/eslint-config-storefront",
3
- "version": "4.4.1",
3
+ "version": "4.5.1",
4
4
  "description": "SCAYLE Commerce Engine specific eslint configuration",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -8,6 +8,12 @@
8
8
  "access": "public",
9
9
  "registry": "https://registry.npmjs.org/"
10
10
  },
11
+ "repository": {
12
+ "url": "git+https://github.com/scayle/eslint-config-storefront.git"
13
+ },
14
+ "keywords": [
15
+ "eslint"
16
+ ],
11
17
  "type": "module",
12
18
  "exports": {
13
19
  ".": "./index.mjs",
@@ -26,28 +32,29 @@
26
32
  "scripts": {
27
33
  "format": "dprint check",
28
34
  "format:fix": "dprint fmt",
29
- "lint": "eslint . --format gitlab",
35
+ "lint": "eslint .",
36
+ "lint:ci": "eslint . --format gitlab",
30
37
  "lint:fix": "eslint . --fix",
31
38
  "package:lint": "publint"
32
39
  },
33
40
  "peerDependencies": {
34
- "eslint": "^9.0.0",
35
- "typescript": "^5.4.0"
41
+ "eslint": ">=9.0.0",
42
+ "typescript": ">=5.4.0"
36
43
  },
37
44
  "dependencies": {
38
45
  "local-pkg": "^1.0.0",
39
- "@antfu/eslint-config": "^3.11.2",
46
+ "@antfu/eslint-config": "^4.0.0",
40
47
  "@eslint/eslintrc": "^3.2.0",
41
- "eslint-flat-config-utils": "^1.0.0",
42
- "eslint-config-flat-gitignore": "^1.0.0",
48
+ "eslint-flat-config-utils": "^2.0.0",
49
+ "eslint-config-flat-gitignore": "^2.0.0",
43
50
  "eslint-plugin-no-unsanitized": "^4.1.2",
44
51
  "eslint-plugin-promise": "^7.2.1",
45
52
  "eslint-plugin-sonarjs": "^3.0.1"
46
53
  },
47
54
  "devDependencies": {
48
- "dprint": "0.48.0",
49
- "eslint": "9.17.0",
50
- "eslint-formatter-gitlab": "5.1.0",
55
+ "dprint": "0.49.1",
56
+ "eslint": "9.26.0",
57
+ "eslint-formatter-gitlab": "6.0.0",
51
58
  "publint": "0.2.12"
52
59
  }
53
60
  }