@abinnovision/eslint-config-react 2.2.0 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v2.2.0...eslint-config-react-v3.0.0) (2025-11-08)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * refactor eslint config for React and add Tailwind CSS flavour
9
+
10
+ ### Features
11
+
12
+ * refactor eslint config for React and add Tailwind CSS flavour ([94aee60](https://github.com/abinnovision/js-commons/commit/94aee60116b769e147fd18422c0858bcbe7f02f3))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * migrate eslint configs to use defineConfig ([#541](https://github.com/abinnovision/js-commons/issues/541)) ([eb24dca](https://github.com/abinnovision/js-commons/commit/eb24dca423b594711b727da84f4c4026f781c9e4))
18
+
3
19
  ## [2.2.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v2.1.0...eslint-config-react-v2.2.0) (2024-10-16)
4
20
 
5
21
 
package/README.md CHANGED
@@ -1,14 +1,53 @@
1
1
  # @abinnovision/eslint-config-react
2
2
 
3
- ESLint config specifically for React related projects. This config **must be
4
- used in conjunction with the
5
- [@abinnovision/eslint-config-base](https://github.com/abinnovision/js-commons/tree/master/packages/eslint-config-base)
6
- ESLint config**. This config is based on the
7
- [AlloyTeam ESLint Config](https://github.com/AlloyTeam/eslint-config-alloy) with
8
- some additional goodies on top.
3
+ ESLint configuration for React applications. Built on
4
+ [@eslint-react/eslint-plugin](https://eslint-react.xyz) and
5
+ [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks).
9
6
 
10
7
  ## Installation
11
8
 
12
9
  ```shell
13
- yarn add --dev @abinnovision/eslint-config-react
10
+ yarn add --dev @abinnovision/eslint-config-react @abinnovision/eslint-config-base eslint
14
11
  ```
12
+
13
+ ## Usage
14
+
15
+ ```javascript
16
+ // eslint.config.js
17
+ import { base } from "@abinnovision/eslint-config-base";
18
+ import { react } from "@abinnovision/eslint-config-react";
19
+ import { defineConfig } from "eslint/config";
20
+
21
+ export default defineConfig([{ extends: [base] }, { extends: [react] }]);
22
+ ```
23
+
24
+ ## Flavours
25
+
26
+ Specialized configurations for specific React use cases.
27
+
28
+ ### Tailwind CSS
29
+
30
+ For React applications using Tailwind CSS. Enforces class ordering,
31
+ detects conflicts, and validates Tailwind usage.
32
+
33
+ ```javascript
34
+ import { base } from "@abinnovision/eslint-config-base";
35
+ import { react, tailwind } from "@abinnovision/eslint-config-react";
36
+ import { defineConfig } from "eslint/config";
37
+
38
+ export default defineConfig([
39
+ { extends: [base] },
40
+ { extends: [react] },
41
+ { extends: [tailwind] },
42
+ ]);
43
+ ```
44
+
45
+ ## Related Packages
46
+
47
+ - [@abinnovision/eslint-config-base](../eslint-config-base) - Base
48
+ configuration
49
+ - [@abinnovision/prettier-config](../prettier-config) - Code formatting
50
+
51
+ ## License
52
+
53
+ Apache-2.0
package/package.json CHANGED
@@ -1,21 +1,26 @@
1
1
  {
2
2
  "name": "@abinnovision/eslint-config-react",
3
- "version": "2.2.0",
3
+ "version": "3.0.0",
4
+ "publishConfig": {
5
+ "npm": true,
6
+ "ghpr": true,
7
+ "npmAccess": "public"
8
+ },
4
9
  "type": "module",
5
10
  "repository": {
6
11
  "url": "https://github.com/abinnovision/js-commons"
7
12
  },
8
13
  "license": "Apache-2.0",
9
14
  "author": {
10
- "name": "AB INNOVISION GmbH",
11
- "email": "info@abinnovision.com",
12
- "url": "https://abinnovision.com/"
15
+ "name": "abi group GmbH",
16
+ "email": "info@abigroup.io",
17
+ "url": "https://abigroup.io/"
13
18
  },
14
19
  "exports": {
15
20
  ".": {
21
+ "types": "./dist/index.d.ts",
16
22
  "import": "./dist/index.js",
17
- "require": "./dist/index.cjs",
18
- "types": "./dist/index.d.ts"
23
+ "require": "./dist/index.cjs"
19
24
  }
20
25
  },
21
26
  "main": "./dist/index.cjs",
@@ -42,19 +47,17 @@
42
47
  },
43
48
  "prettier": "@abinnovision/prettier-config",
44
49
  "dependencies": {
45
- "eslint-config-alloy": "^5.1.2",
46
- "eslint-plugin-react": "^7.37.1",
47
- "eslint-plugin-react-hooks": "^5.0.0"
50
+ "@eslint-react/eslint-plugin": "^2.0.0",
51
+ "eslint-plugin-better-tailwindcss": "^3.0.0",
52
+ "eslint-plugin-react-hooks": "^7.0.0"
48
53
  },
49
54
  "devDependencies": {
50
- "@abinnovision/prettier-config": "^2.1.3",
51
- "@types/eslint": "^9.6.1",
52
- "@typescript-eslint/eslint-plugin": "^8.8.1",
53
- "@typescript-eslint/parser": "^8.8.1",
54
- "eslint": "^9.12.0",
55
- "globals": "^15.11.0",
56
- "tsup": "^8.3.0",
57
- "typescript": "^5.6.3"
55
+ "@abinnovision/eslint-config-base": "^3.0.0",
56
+ "@abinnovision/prettier-config": "^2.1.4",
57
+ "eslint": "^9.39.1",
58
+ "prettier": "^3.6.2",
59
+ "tsup": "^8.3.6",
60
+ "typescript": "^5.9.3"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "eslint": "^9.0.0"
package/dist/index.cjs DELETED
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
33
- default: () => src_default
34
- });
35
- module.exports = __toCommonJS(src_exports);
36
- var import_react = __toESM(require("eslint-config-alloy/react.js"), 1);
37
- var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
38
- var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
39
- var config = [
40
- {
41
- files: ["**/*.{js,jsx,ts,tsx}"],
42
- plugins: {
43
- react: import_eslint_plugin_react.default,
44
- "react-hooks": import_eslint_plugin_react_hooks.default
45
- },
46
- settings: {
47
- react: {
48
- version: "detect"
49
- }
50
- },
51
- rules: {
52
- ...import_react.default.rules ?? {},
53
- /**
54
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
55
- * configuration.
56
- *
57
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
58
- */
59
- "react-hooks/rules-of-hooks": "error",
60
- "react-hooks/exhaustive-deps": "warn"
61
- }
62
- }
63
- ];
64
- var src_default = config;
package/dist/index.d.cts DELETED
@@ -1,24 +0,0 @@
1
- declare const config: {
2
- files: string[];
3
- plugins: {
4
- react: Plugin;
5
- "react-hooks": Plugin;
6
- };
7
- settings: {
8
- react: {
9
- version: string;
10
- };
11
- };
12
- rules: {
13
- /**
14
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
15
- * configuration.
16
- *
17
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
18
- */
19
- "react-hooks/rules-of-hooks": "error";
20
- "react-hooks/exhaustive-deps": "warn";
21
- };
22
- }[];
23
-
24
- export { config as default };
package/dist/index.d.ts DELETED
@@ -1,24 +0,0 @@
1
- declare const config: {
2
- files: string[];
3
- plugins: {
4
- react: Plugin;
5
- "react-hooks": Plugin;
6
- };
7
- settings: {
8
- react: {
9
- version: string;
10
- };
11
- };
12
- rules: {
13
- /**
14
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
15
- * configuration.
16
- *
17
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
18
- */
19
- "react-hooks/rules-of-hooks": "error";
20
- "react-hooks/exhaustive-deps": "warn";
21
- };
22
- }[];
23
-
24
- export { config as default };
package/dist/index.js DELETED
@@ -1,33 +0,0 @@
1
- // src/index.ts
2
- import AlloyReact from "eslint-config-alloy/react.js";
3
- import eslintPluginReact from "eslint-plugin-react";
4
- import eslintPluginReactHooks from "eslint-plugin-react-hooks";
5
- var config = [
6
- {
7
- files: ["**/*.{js,jsx,ts,tsx}"],
8
- plugins: {
9
- react: eslintPluginReact,
10
- "react-hooks": eslintPluginReactHooks
11
- },
12
- settings: {
13
- react: {
14
- version: "detect"
15
- }
16
- },
17
- rules: {
18
- ...AlloyReact.rules ?? {},
19
- /**
20
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
21
- * configuration.
22
- *
23
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
24
- */
25
- "react-hooks/rules-of-hooks": "error",
26
- "react-hooks/exhaustive-deps": "warn"
27
- }
28
- }
29
- ];
30
- var src_default = config;
31
- export {
32
- src_default as default
33
- };