@croct/eslint-plugin 0.8.3 → 0.9.0

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/index.d.cts ADDED
@@ -0,0 +1,45 @@
1
+ import * as _eslint_core0 from "@eslint/core";
2
+ import * as eslint from "eslint";
3
+ import { ESLint } from "eslint";
4
+ import * as _typescript_eslint_utils_ts_eslint0 from "@typescript-eslint/utils/ts-eslint";
5
+
6
+ //#region src/rules/index.d.ts
7
+ declare const rules: {
8
+ 'argument-spacing': _typescript_eslint_utils_ts_eslint0.RuleModule<"missing", readonly unknown[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
9
+ name: string;
10
+ };
11
+ 'jsx-attribute-spacing': _typescript_eslint_utils_ts_eslint0.RuleModule<"missing", readonly unknown[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
12
+ name: string;
13
+ };
14
+ 'complex-expression-spacing': _typescript_eslint_utils_ts_eslint0.RuleModule<"missing", readonly unknown[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
15
+ name: string;
16
+ };
17
+ 'newline-per-chained-call': _typescript_eslint_utils_ts_eslint0.RuleModule<"expectedLineBreak", {
18
+ ignoreChainDeeperThan: number;
19
+ }[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
20
+ name: string;
21
+ };
22
+ 'min-chained-call-depth': _typescript_eslint_utils_ts_eslint0.RuleModule<"unexpectedLineBreak", {
23
+ maxLineLength: number;
24
+ ignoreChainDeeperThan: number;
25
+ }[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
26
+ name: string;
27
+ };
28
+ 'parameter-destructuring': _typescript_eslint_utils_ts_eslint0.RuleModule<"unexpectedDestructuring", readonly unknown[], unknown, _typescript_eslint_utils_ts_eslint0.RuleListener> & {
29
+ name: string;
30
+ };
31
+ };
32
+ //#endregion
33
+ //#region src/index.d.ts
34
+ declare const plugin: {
35
+ rules: ESLint.Plugin["rules"];
36
+ configs: {};
37
+ };
38
+ declare const configs: {
39
+ readonly javascript: eslint.Linter.Config<_eslint_core0.RulesConfig>[];
40
+ readonly typescript: eslint.Linter.Config<_eslint_core0.RulesConfig>[];
41
+ readonly react: eslint.Linter.Config<_eslint_core0.RulesConfig>[];
42
+ readonly cypress: eslint.Linter.Config<_eslint_core0.RulesConfig>[];
43
+ };
44
+ //#endregion
45
+ export { configs, plugin, rules };
package/package.json CHANGED
@@ -1,29 +1,7 @@
1
1
  {
2
2
  "name": "@croct/eslint-plugin",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "ESLint rules and presets applied to all Croct JavaScript projects.",
5
- "license": "MIT",
6
- "author": {
7
- "name": "Croct",
8
- "email": "lib+coding-standard-js@croct.com",
9
- "url": "https://croct.com"
10
- },
11
- "main": "index.js",
12
- "types": "index.d.ts",
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/croct-tech/coding-standard-js.git"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/croct-tech/coding-standard-js/issues"
19
- },
20
- "homepage": "https://github.com/croct-tech/coding-standard-js",
21
- "scripts": {
22
- "lint": "eslint 'src/**/*.{ts,tsx}'",
23
- "test": "jest -c jest.config.js --coverage",
24
- "validate": "tsc --noEmit",
25
- "build": "tsc -p tsconfig.build.json"
26
- },
27
5
  "keywords": [
28
6
  "eslint",
29
7
  "eslint-plugin",
@@ -35,39 +13,80 @@
35
13
  "react",
36
14
  "cypress"
37
15
  ],
16
+ "homepage": "https://github.com/croct-tech/coding-standard-js",
17
+ "bugs": {
18
+ "url": "https://github.com/croct-tech/coding-standard-js/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/croct-tech/coding-standard-js.git"
23
+ },
24
+ "license": "MIT",
25
+ "author": {
26
+ "name": "Croct",
27
+ "email": "lib+coding-standard-js@croct.com",
28
+ "url": "https://croct.com"
29
+ },
30
+ "main": "dist/index.cjs",
31
+ "types": "dist/index.d.cts",
32
+ "scripts": {
33
+ "build": "tsdown",
34
+ "lint": "eslint 'src/**/*.{ts,tsx}'",
35
+ "test": "jest -c jest.config.js --coverage",
36
+ "validate": "tsc --noEmit"
37
+ },
38
38
  "dependencies": {
39
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
40
- "@stylistic/eslint-plugin": "^5.7.0",
41
- "@typescript-eslint/utils": "^8.53.0",
42
- "eslint-plugin-cypress": "^5.2.1",
43
- "eslint-plugin-import-newlines": "^1.4.0",
44
- "eslint-plugin-import-x": "^4.16.1",
45
- "eslint-plugin-jest": "^29.12.1",
46
- "eslint-plugin-jest-dom": "^5.5.0",
47
- "eslint-plugin-jsx-a11y": "^6.10.2",
39
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
40
+ "@eslint/compat": "^2.0.2",
41
+ "@stylistic/eslint-plugin": "^5.9.0",
42
+ "@typescript-eslint/typescript-estree": "^8.56.1",
43
+ "@typescript-eslint/utils": "^8.56.1",
44
+ "eslint-plugin-cypress": "^6.1.0",
45
+ "eslint-plugin-eslint-plugin": "^7.3.1",
46
+ "eslint-plugin-import-newlines": "^2.0.0",
47
+ "eslint-plugin-jest": "^29.15.0",
48
48
  "eslint-plugin-newline-destructuring": "^1.2.2",
49
- "eslint-plugin-react": "^7.37.5",
50
- "eslint-plugin-react-hooks": "^5.2.0",
51
- "eslint-plugin-testing-library": "^7.15.4",
52
- "globals": "^17.0.0",
53
- "typescript-eslint": "^8.53.0"
49
+ "eslint-plugin-self": "^1.2.1",
50
+ "eslint-plugin-testing-library": "^7.16.0",
51
+ "globals": "^17.6.0",
52
+ "typescript-eslint": "^8.56.1"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@types/jest": "^30.0.0",
57
- "@types/semver": "^7.5.8",
58
- "@typescript-eslint/parser": "^8.53.0",
59
- "@typescript-eslint/rule-tester": "^8.53.0",
60
- "@typescript-eslint/types": "^8.53.0",
61
- "@typescript-eslint/typescript-estree": "^8.53.0",
62
- "eslint": "^9.28.0",
63
- "eslint-plugin-eslint-plugin": "^6.4.0",
64
- "eslint-plugin-self": "^1.2.1",
65
- "jest": "^30.0.0",
66
- "ts-jest": "^29.3.4",
67
- "typescript": "~5.9.0"
56
+ "@types/semver": "^7.7.1",
57
+ "@typescript-eslint/parser": "^8.56.1",
58
+ "@typescript-eslint/rule-tester": "^8.56.1",
59
+ "@typescript-eslint/types": "^8.56.1",
60
+ "eslint": "^10.0.2",
61
+ "eslint-plugin-import-x": "^4.16.2",
62
+ "eslint-plugin-jest-dom": "^5.5.0",
63
+ "eslint-plugin-jsx-a11y": "^6.10.2",
64
+ "eslint-plugin-react": "^7.37.5",
65
+ "eslint-plugin-react-hooks": "^7.0.1",
66
+ "jest": "^30.2.0",
67
+ "ts-jest": "^29.4.6",
68
+ "tsdown": "^0.21.0-beta.2",
69
+ "typescript": "~5.9.3"
68
70
  },
69
71
  "peerDependencies": {
70
72
  "@typescript-eslint/parser": ">= 8",
71
- "eslint": ">= 9"
73
+ "eslint": ">= 10"
74
+ },
75
+ "overrides": {
76
+ "eslint-plugin-jsx-a11y": {
77
+ "eslint": "$eslint"
78
+ },
79
+ "eslint-plugin-jest-dom": {
80
+ "eslint": "$eslint"
81
+ },
82
+ "eslint-plugin-react": {
83
+ "eslint": "$eslint"
84
+ },
85
+ "eslint-plugin-react-hooks": {
86
+ "eslint": "$eslint"
87
+ },
88
+ "eslint-plugin-import-x": {
89
+ "eslint": "$eslint"
90
+ }
72
91
  }
73
92
  }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createCypressConfig = createCypressConfig;
7
- const eslint_plugin_cypress_1 = __importDefault(require("eslint-plugin-cypress"));
8
- // Factory function to create Cypress config with the plugin reference
9
- function createCypressConfig(plugin, javascriptConfig) {
10
- return [
11
- ...javascriptConfig,
12
- {
13
- name: '@croct/cypress',
14
- plugins: {
15
- cypress: eslint_plugin_cypress_1.default,
16
- '@croct': plugin,
17
- },
18
- rules: {
19
- 'no-loop-func': 0,
20
- 'cypress/no-assigning-return-values': 'warn',
21
- 'cypress/no-unnecessary-waiting': 'error',
22
- 'cypress/assertion-before-screenshot': 'warn',
23
- 'cypress/no-async-tests': 'error',
24
- 'cypress/no-pause': 'error',
25
- '@typescript-eslint/no-namespace': 'off',
26
- },
27
- },
28
- ];
29
- }
package/configs/index.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.baseRules = exports.createJavaScriptConfig = exports.createTypescriptConfig = exports.createReactConfig = exports.createCypressConfig = void 0;
4
- var cypress_1 = require("./cypress");
5
- Object.defineProperty(exports, "createCypressConfig", { enumerable: true, get: function () { return cypress_1.createCypressConfig; } });
6
- var react_1 = require("./react");
7
- Object.defineProperty(exports, "createReactConfig", { enumerable: true, get: function () { return react_1.createReactConfig; } });
8
- var typescript_1 = require("./typescript");
9
- Object.defineProperty(exports, "createTypescriptConfig", { enumerable: true, get: function () { return typescript_1.createTypescriptConfig; } });
10
- var javascript_1 = require("./javascript");
11
- Object.defineProperty(exports, "createJavaScriptConfig", { enumerable: true, get: function () { return javascript_1.createJavaScriptConfig; } });
12
- Object.defineProperty(exports, "baseRules", { enumerable: true, get: function () { return javascript_1.baseRules; } });