@szum-tech/eslint-config 2.1.4 → 2.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.
package/README.md CHANGED
@@ -46,20 +46,19 @@ use, because the configuration dynamically adapts to the needs of the project.
46
46
  ## 📖 Table of Contents
47
47
 
48
48
  <!-- TOC -->
49
-
50
- - [@szum-tech/eslint-config](#szum-techeslint-config)
51
- - [📚 Features](#-features)
52
- - [📖 Table of Contents](#-table-of-contents)
53
- - [🎯 Getting Started](#-getting-started)
54
- - [⚙️ Installation](#-installation)
55
- - [Configuration](#configuration)
56
- - [💻 Scripts](#-scripts)
57
- - [🚀 Minimal GitHub ESlint check workflow](#-minimal-github-eslint-check-workflow)
58
- - [🛠️ Developer Info](#-developer-info)
59
- - [Dependencies](#dependencies)
60
- - [Changelog](#changelog)
61
- - [📜 License](#-license)
62
- <!-- TOC -->
49
+ * [@szum-tech/eslint-config](#szum-techeslint-config)
50
+ * [📚 Features](#-features)
51
+ * [📖 Table of Contents](#-table-of-contents)
52
+ * [🎯 Getting Started](#-getting-started)
53
+ * [⚙️ Installation](#-installation)
54
+ * [Configuration](#configuration)
55
+ * [💻 Scripts](#-scripts)
56
+ * [🚀 Minimal GitHub ESlint check workflow](#-minimal-github-eslint-check-workflow)
57
+ * [🛠️ Developer Info](#-developer-info)
58
+ * [Dependencies](#dependencies)
59
+ * [📒 Changelog](#-changelog)
60
+ * [📜 License](#-license)
61
+ <!-- TOC -->
63
62
 
64
63
  ## 🎯 Getting Started
65
64
 
@@ -228,7 +227,7 @@ jobs:
228
227
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Feslint-config/typescript-eslint)
229
228
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Feslint-config/eslint-import-resolver-typescript)
230
229
 
231
- ## Changelog
230
+ ## 📒 Changelog
232
231
 
233
232
  The [changelog](https://github.com/JanSzewczyk/eslint-config/blob/main/CHANGELOG.md) is regularly updated to reflect
234
233
  what's changed in each new release.
package/dist/index.cjs CHANGED
@@ -49,13 +49,26 @@ var nextPlugin__default = /*#__PURE__*/_interopDefault(nextPlugin);
49
49
  var vitestPlugin__default = /*#__PURE__*/_interopDefault(vitestPlugin);
50
50
 
51
51
  // src/index.js
52
- var ERROR = "error";
53
- var WARN = "warn";
54
- var OFF = "off";
52
+ var logger = console;
53
+ function isPackageInstalled(packageName) {
54
+ const currentDir = process.cwd();
55
+ const packageJsonPath = findPackageJson(currentDir);
56
+ try {
57
+ const packageJson = fs.readFileSync(packageJsonPath, "utf-8");
58
+ const parsedPackageJson = JSON.parse(packageJson);
59
+ const dependencies = parsedPackageJson.dependencies || {};
60
+ const devDependencies = parsedPackageJson.devDependencies || {};
61
+ return dependencies.hasOwnProperty(packageName) || devDependencies.hasOwnProperty(packageName);
62
+ } catch (error) {
63
+ logger.error("Error reading package.json file:", error);
64
+ process.exit(1);
65
+ }
66
+ }
67
+ var PACKAGE_JSON = "package.json";
55
68
  function findPackageJson(startDir) {
56
69
  let currentDir = startDir;
57
70
  while (true) {
58
- const packageJsonPath = path.join(currentDir, "package.json");
71
+ const packageJsonPath = path.join(currentDir, PACKAGE_JSON);
59
72
  if (fs.existsSync(packageJsonPath)) {
60
73
  return packageJsonPath;
61
74
  }
@@ -67,20 +80,6 @@ function findPackageJson(startDir) {
67
80
  }
68
81
  return null;
69
82
  }
70
- function isPackageInstalled(packageName) {
71
- const currentDir = process.cwd();
72
- const packageJsonPath = findPackageJson(currentDir);
73
- try {
74
- const packageJson = fs.readFileSync(packageJsonPath, "utf-8");
75
- const parsedPackageJson = JSON.parse(packageJson);
76
- const dependencies = parsedPackageJson.dependencies || {};
77
- const devDependencies = parsedPackageJson.devDependencies || {};
78
- return dependencies.hasOwnProperty(packageName) || devDependencies.hasOwnProperty(packageName);
79
- } catch (error) {
80
- console.error("Error reading package.json file:", error);
81
- process.exit(1);
82
- }
83
- }
84
83
  var hasTypeScript = isPackageInstalled("typescript");
85
84
  var hasTailwindcss = isPackageInstalled("tailwindcss");
86
85
  var hasReact = isPackageInstalled("react");
@@ -96,7 +95,6 @@ var vitestFiles = ["**/__tests__/**/*", "**/*.test.*"];
96
95
  var testFiles = ["**/tests/**", ...vitestFiles];
97
96
  var playwrightFiles = ["**/e2e/**", "**/*.e2e.*"];
98
97
  function showFeaturesTable() {
99
- console.log("Hello There!\nHere are the features detected in your project:");
100
98
  const tableData = [
101
99
  { Name: "TypeScript", Status: hasTypeScript ? "\u2714\uFE0F" : "\u274C" },
102
100
  { Name: "React", Status: hasReact ? "\u2714\uFE0F" : "\u274C" },
@@ -117,10 +115,19 @@ function showFeaturesTable() {
117
115
  return 0;
118
116
  }
119
117
  });
120
- console.table(tableData);
121
- console.log("Thank you for using @szum-tech/eslint-config!");
118
+ logger.log("Hello There!\nHere are the features detected in your project:");
119
+ logger.table(tableData);
120
+ logger.log(`Dear Developer
121
+ `);
122
+ logger.log("Thanks a lot for using '@szum-tech/eslint-config'");
123
+ logger.log("If you like it, leave a star \u2B50 \u{1F449} https://github.com/JanSzewczyk/handy-szumrak");
124
+ logger.log("And recommend to others\n");
125
+ logger.log(`May the SZUMRAK be with You \u{1F680}\u{1F680}\u{1F680}`);
122
126
  }
123
127
  showFeaturesTable();
128
+ var ERROR = "error";
129
+ var WARN = "warn";
130
+ var OFF = "off";
124
131
  var config = [
125
132
  {
126
133
  name: "eslint/ignores",
@@ -132,7 +139,8 @@ var config = [
132
139
  "**/playwright-report/**",
133
140
  "**/server-build/**",
134
141
  "**/dist/**",
135
- "**/.next/**"
142
+ "**/.next/**",
143
+ "**/storybook-static/**"
136
144
  ]
137
145
  },
138
146
  {
@@ -170,7 +178,7 @@ var config = [
170
178
  "no-unused-vars": [
171
179
  WARN,
172
180
  {
173
- args: "after-used",
181
+ args: "all",
174
182
  argsIgnorePattern: "^_",
175
183
  ignoreRestSiblings: true,
176
184
  varsIgnorePattern: "^ignored"
package/dist/index.js CHANGED
@@ -14,13 +14,26 @@ import nextPlugin from '@next/eslint-plugin-next';
14
14
  import vitestPlugin from '@vitest/eslint-plugin';
15
15
 
16
16
  // src/index.js
17
- var ERROR = "error";
18
- var WARN = "warn";
19
- var OFF = "off";
17
+ var logger = console;
18
+ function isPackageInstalled(packageName) {
19
+ const currentDir = process.cwd();
20
+ const packageJsonPath = findPackageJson(currentDir);
21
+ try {
22
+ const packageJson = readFileSync(packageJsonPath, "utf-8");
23
+ const parsedPackageJson = JSON.parse(packageJson);
24
+ const dependencies = parsedPackageJson.dependencies || {};
25
+ const devDependencies = parsedPackageJson.devDependencies || {};
26
+ return dependencies.hasOwnProperty(packageName) || devDependencies.hasOwnProperty(packageName);
27
+ } catch (error) {
28
+ logger.error("Error reading package.json file:", error);
29
+ process.exit(1);
30
+ }
31
+ }
32
+ var PACKAGE_JSON = "package.json";
20
33
  function findPackageJson(startDir) {
21
34
  let currentDir = startDir;
22
35
  while (true) {
23
- const packageJsonPath = join(currentDir, "package.json");
36
+ const packageJsonPath = join(currentDir, PACKAGE_JSON);
24
37
  if (existsSync(packageJsonPath)) {
25
38
  return packageJsonPath;
26
39
  }
@@ -32,20 +45,6 @@ function findPackageJson(startDir) {
32
45
  }
33
46
  return null;
34
47
  }
35
- function isPackageInstalled(packageName) {
36
- const currentDir = process.cwd();
37
- const packageJsonPath = findPackageJson(currentDir);
38
- try {
39
- const packageJson = readFileSync(packageJsonPath, "utf-8");
40
- const parsedPackageJson = JSON.parse(packageJson);
41
- const dependencies = parsedPackageJson.dependencies || {};
42
- const devDependencies = parsedPackageJson.devDependencies || {};
43
- return dependencies.hasOwnProperty(packageName) || devDependencies.hasOwnProperty(packageName);
44
- } catch (error) {
45
- console.error("Error reading package.json file:", error);
46
- process.exit(1);
47
- }
48
- }
49
48
  var hasTypeScript = isPackageInstalled("typescript");
50
49
  var hasTailwindcss = isPackageInstalled("tailwindcss");
51
50
  var hasReact = isPackageInstalled("react");
@@ -61,7 +60,6 @@ var vitestFiles = ["**/__tests__/**/*", "**/*.test.*"];
61
60
  var testFiles = ["**/tests/**", ...vitestFiles];
62
61
  var playwrightFiles = ["**/e2e/**", "**/*.e2e.*"];
63
62
  function showFeaturesTable() {
64
- console.log("Hello There!\nHere are the features detected in your project:");
65
63
  const tableData = [
66
64
  { Name: "TypeScript", Status: hasTypeScript ? "\u2714\uFE0F" : "\u274C" },
67
65
  { Name: "React", Status: hasReact ? "\u2714\uFE0F" : "\u274C" },
@@ -82,10 +80,19 @@ function showFeaturesTable() {
82
80
  return 0;
83
81
  }
84
82
  });
85
- console.table(tableData);
86
- console.log("Thank you for using @szum-tech/eslint-config!");
83
+ logger.log("Hello There!\nHere are the features detected in your project:");
84
+ logger.table(tableData);
85
+ logger.log(`Dear Developer
86
+ `);
87
+ logger.log("Thanks a lot for using '@szum-tech/eslint-config'");
88
+ logger.log("If you like it, leave a star \u2B50 \u{1F449} https://github.com/JanSzewczyk/handy-szumrak");
89
+ logger.log("And recommend to others\n");
90
+ logger.log(`May the SZUMRAK be with You \u{1F680}\u{1F680}\u{1F680}`);
87
91
  }
88
92
  showFeaturesTable();
93
+ var ERROR = "error";
94
+ var WARN = "warn";
95
+ var OFF = "off";
89
96
  var config = [
90
97
  {
91
98
  name: "eslint/ignores",
@@ -97,7 +104,8 @@ var config = [
97
104
  "**/playwright-report/**",
98
105
  "**/server-build/**",
99
106
  "**/dist/**",
100
- "**/.next/**"
107
+ "**/.next/**",
108
+ "**/storybook-static/**"
101
109
  ]
102
110
  },
103
111
  {
@@ -135,7 +143,7 @@ var config = [
135
143
  "no-unused-vars": [
136
144
  WARN,
137
145
  {
138
- args: "after-used",
146
+ args: "all",
139
147
  argsIgnorePattern: "^_",
140
148
  ignoreRestSiblings: true,
141
149
  varsIgnorePattern: "^ignored"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@szum-tech/eslint-config",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "ESLint configuration for TypeScript projects",
5
5
  "keywords": [
6
6
  "eslint",
@@ -35,45 +35,38 @@
35
35
  "prettier:write": "prettier --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@next/eslint-plugin-next": "^15.1.3",
39
- "@vitest/eslint-plugin": "^1.1.22",
40
- "eslint-import-resolver-typescript": "^3.7.0",
38
+ "@next/eslint-plugin-next": "^15.2.0",
39
+ "@vitest/eslint-plugin": "^1.1.36",
40
+ "eslint-import-resolver-typescript": "^3.8.3",
41
41
  "eslint-plugin-import": "^2.31.0",
42
42
  "eslint-plugin-jest-dom": "^5.4.0",
43
- "eslint-plugin-playwright": "^2.0.1",
44
- "eslint-plugin-react": "^7.37.3",
45
- "eslint-plugin-react-hooks": "^5.1.0",
46
- "eslint-plugin-storybook": "^0.11.0",
47
- "eslint-plugin-tailwindcss": "^3.17.5",
43
+ "eslint-plugin-playwright": "^2.2.0",
44
+ "eslint-plugin-react": "^7.37.4",
45
+ "eslint-plugin-react-hooks": "^5.2.0",
46
+ "eslint-plugin-storybook": "^0.11.3",
47
+ "eslint-plugin-tailwindcss": "^3.18.0",
48
48
  "eslint-plugin-testing-library": "^7.1.1",
49
- "globals": "^15.14.0",
50
- "typescript-eslint": "^8.19.0"
49
+ "globals": "^16.0.0",
50
+ "typescript-eslint": "^8.26.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@microsoft/eslint-formatter-sarif": "^3.1.0",
54
- "@szum-tech/prettier-config": "^1.4.5",
55
- "@szum-tech/semantic-release-config": "^2.2.1",
56
- "eslint": "^9.17.0",
57
- "prettier": "^3.4.2",
58
- "semantic-release": "^24.2.0",
59
- "tsup": "^8.3.5",
60
- "typescript": "^5.7.2"
53
+ "@szum-tech/prettier-config": "^1.6.1",
54
+ "@szum-tech/semantic-release-config": "^2.3.0",
55
+ "eslint": "^9.21.0",
56
+ "prettier": "^3.5.3",
57
+ "semantic-release": "^24.2.3",
58
+ "tsup": "^8.4.0",
59
+ "typescript": "^5.8.2"
61
60
  },
62
61
  "peerDependencies": {
63
- "eslint": "^9.17.0",
64
- "eslint-import-resolver-typescript": "^3.7.0",
65
- "eslint-plugin-import": "^2.31.0",
66
- "eslint-plugin-jest-dom": "^5.4.0",
67
- "eslint-plugin-playwright": "^2.0.1",
68
- "eslint-plugin-react": "^7.37.3",
69
- "eslint-plugin-react-hooks": "^5.1.0",
70
- "eslint-plugin-storybook": "^0.11.0",
71
- "eslint-plugin-tailwindcss": "^3.17.5",
72
- "eslint-plugin-testing-library": "^7.1.1",
73
- "globals": "^15.14.0",
74
- "typescript-eslint": "^8.19.0"
62
+ "eslint": ">=9.21.0"
75
63
  },
76
64
  "publishConfig": {
77
65
  "access": "public"
66
+ },
67
+ "overrides": {
68
+ "eslint-plugin-storybook": {
69
+ "typescript": ">=5.8.2"
70
+ }
78
71
  }
79
72
  }