@abinnovision/eslint-config-react 2.1.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 +31 -0
- package/README.md +46 -7
- package/package.json +22 -19
- package/dist/index.cjs +0 -49
- package/dist/index.d.cts +0 -11
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
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
|
+
|
|
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)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* add eslint-plugin-react-hooks with recommended config ([#339](https://github.com/abinnovision/js-commons/issues/339)) ([6d0a2e0](https://github.com/abinnovision/js-commons/commit/6d0a2e0dd68c7a91d3b7a8c3b116ee31c3d7871e))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* automatically detect the react version ([#352](https://github.com/abinnovision/js-commons/issues/352)) ([2e3ea1a](https://github.com/abinnovision/js-commons/commit/2e3ea1aa6b3797606e2303f4b10fc28a75440ab3))
|
|
30
|
+
* migrate to Linter.Config type ([#340](https://github.com/abinnovision/js-commons/issues/340)) ([30a1c19](https://github.com/abinnovision/js-commons/commit/30a1c19c3a2f4c2b94e6086486951145b399e15d))
|
|
31
|
+
* only support eslint v9 ([#345](https://github.com/abinnovision/js-commons/issues/345)) ([7425fdc](https://github.com/abinnovision/js-commons/commit/7425fdc9c2d8912988697ab07b9a8f42d96786d4))
|
|
32
|
+
* use spaces for markdown files ([#349](https://github.com/abinnovision/js-commons/issues/349)) ([eeb8b33](https://github.com/abinnovision/js-commons/commit/eeb8b335916602b55ca02cfdea352bc296fa7ffb))
|
|
33
|
+
|
|
3
34
|
## [2.1.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v2.0.0...eslint-config-react-v2.1.0) (2024-08-05)
|
|
4
35
|
|
|
5
36
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,53 @@
|
|
|
1
1
|
# @abinnovision/eslint-config-react
|
|
2
2
|
|
|
3
|
-
ESLint
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ESLint config**. This config is based on
|
|
7
|
-
the [AlloyTeam ESLint Config](https://github.com/AlloyTeam/eslint-config-alloy)
|
|
8
|
-
with 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": "
|
|
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": "
|
|
11
|
-
"email": "info@
|
|
12
|
-
"url": "https://
|
|
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,21 +47,19 @@
|
|
|
42
47
|
},
|
|
43
48
|
"prettier": "@abinnovision/prettier-config",
|
|
44
49
|
"dependencies": {
|
|
45
|
-
"eslint-
|
|
46
|
-
"eslint-plugin-
|
|
50
|
+
"@eslint-react/eslint-plugin": "^2.0.0",
|
|
51
|
+
"eslint-plugin-better-tailwindcss": "^3.0.0",
|
|
52
|
+
"eslint-plugin-react-hooks": "^7.0.0"
|
|
47
53
|
},
|
|
48
54
|
"devDependencies": {
|
|
49
|
-
"@abinnovision/
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"tsup": "^8.2.4",
|
|
56
|
-
"typescript": "^5.5.4"
|
|
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"
|
|
57
61
|
},
|
|
58
62
|
"peerDependencies": {
|
|
59
|
-
"eslint": "^
|
|
60
|
-
}
|
|
61
|
-
"packageManager": "yarn@3.4.1"
|
|
63
|
+
"eslint": "^9.0.0"
|
|
64
|
+
}
|
|
62
65
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,49 +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 config = [
|
|
39
|
-
{
|
|
40
|
-
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
41
|
-
plugins: {
|
|
42
|
-
react: import_eslint_plugin_react.default
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
...import_react.default.rules ?? {}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
var src_default = config;
|
package/dist/index.d.cts
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
import AlloyReact from "eslint-config-alloy/react.js";
|
|
3
|
-
import eslintPluginReact from "eslint-plugin-react";
|
|
4
|
-
var config = [
|
|
5
|
-
{
|
|
6
|
-
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
7
|
-
plugins: {
|
|
8
|
-
react: eslintPluginReact
|
|
9
|
-
},
|
|
10
|
-
rules: {
|
|
11
|
-
...AlloyReact.rules ?? {}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
];
|
|
15
|
-
var src_default = config;
|
|
16
|
-
export {
|
|
17
|
-
src_default as default
|
|
18
|
-
};
|