@szum-tech/eslint-config 2.1.4 → 2.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.
- package/README.md +14 -15
- package/dist/index.cjs +28 -21
- package/dist/index.js +28 -21
- package/package.json +17 -18
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|

|
|
229
228
|

|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
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,
|
|
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
|
-
|
|
121
|
-
|
|
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",
|
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
|
|
18
|
-
|
|
19
|
-
|
|
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,
|
|
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
|
-
|
|
86
|
-
|
|
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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@szum-tech/eslint-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "ESLint configuration for TypeScript projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -35,43 +35,42 @@
|
|
|
35
35
|
"prettier:write": "prettier --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@next/eslint-plugin-next": "^15.1.
|
|
39
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
38
|
+
"@next/eslint-plugin-next": "^15.1.6",
|
|
39
|
+
"@vitest/eslint-plugin": "^1.1.25",
|
|
40
40
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
41
41
|
"eslint-plugin-import": "^2.31.0",
|
|
42
42
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
43
|
-
"eslint-plugin-playwright": "^2.0
|
|
44
|
-
"eslint-plugin-react": "^7.37.
|
|
43
|
+
"eslint-plugin-playwright": "^2.2.0",
|
|
44
|
+
"eslint-plugin-react": "^7.37.4",
|
|
45
45
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
46
|
-
"eslint-plugin-storybook": "^0.11.
|
|
47
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
46
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
47
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
48
48
|
"eslint-plugin-testing-library": "^7.1.1",
|
|
49
49
|
"globals": "^15.14.0",
|
|
50
|
-
"typescript-eslint": "^8.
|
|
50
|
+
"typescript-eslint": "^8.21.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
|
54
53
|
"@szum-tech/prettier-config": "^1.4.5",
|
|
55
54
|
"@szum-tech/semantic-release-config": "^2.2.1",
|
|
56
|
-
"eslint": "^9.
|
|
55
|
+
"eslint": "^9.18.0",
|
|
57
56
|
"prettier": "^3.4.2",
|
|
58
|
-
"semantic-release": "^24.2.
|
|
57
|
+
"semantic-release": "^24.2.1",
|
|
59
58
|
"tsup": "^8.3.5",
|
|
60
|
-
"typescript": "^5.7.
|
|
59
|
+
"typescript": "^5.7.3"
|
|
61
60
|
},
|
|
62
61
|
"peerDependencies": {
|
|
63
|
-
"eslint": "^9.
|
|
62
|
+
"eslint": "^9.18.0",
|
|
64
63
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
65
64
|
"eslint-plugin-import": "^2.31.0",
|
|
66
65
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
67
|
-
"eslint-plugin-playwright": "^2.0
|
|
68
|
-
"eslint-plugin-react": "^7.37.
|
|
66
|
+
"eslint-plugin-playwright": "^2.2.0",
|
|
67
|
+
"eslint-plugin-react": "^7.37.4",
|
|
69
68
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
70
|
-
"eslint-plugin-storybook": "^0.11.
|
|
71
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
69
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
70
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
72
71
|
"eslint-plugin-testing-library": "^7.1.1",
|
|
73
72
|
"globals": "^15.14.0",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
73
|
+
"typescript-eslint": "^8.21.0"
|
|
75
74
|
},
|
|
76
75
|
"publishConfig": {
|
|
77
76
|
"access": "public"
|