@abinnovision/eslint-config-react 1.2.0 → 2.1.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [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
+
5
+
6
+ ### Features
7
+
8
+ * migrate to esm ([#278](https://github.com/abinnovision/js-commons/issues/278)) ([fed850d](https://github.com/abinnovision/js-commons/commit/fed850d979f7ba83fae75adadcfd0024f2acd242))
9
+
10
+ ## [2.0.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.2.0...eslint-config-react-v2.0.0) (2023-11-03)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * will drop support for legacy eslint configs
16
+
17
+ ### Features
18
+
19
+ * migrate to eslint flat config ([#93](https://github.com/abinnovision/js-commons/issues/93)) ([7568ba1](https://github.com/abinnovision/js-commons/commit/7568ba1782f912357e18619ab3e4e56a0c738a1c))
20
+
3
21
  ## [1.2.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.1.0...eslint-config-react-v1.2.0) (2023-10-28)
4
22
 
5
23
 
package/README.md CHANGED
@@ -10,16 +10,5 @@ with some additional goodies on top.
10
10
  ## Installation
11
11
 
12
12
  ```shell
13
- yarn add --dev \
14
- # This config itself.
15
- @abinnovision/eslint-config-react \
16
- # Required configs/plugins by this config.
17
- eslint eslint-plugin-react
13
+ yarn add --dev @abinnovision/eslint-config-react
18
14
  ```
19
-
20
- ## Dependencies
21
-
22
- This config requires the following dependencies (defined as peer dependencies):
23
-
24
- - [eslint](https://www.npmjs.com/package/eslint)
25
- - [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react)
package/dist/index.cjs ADDED
@@ -0,0 +1,49 @@
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;
@@ -0,0 +1,11 @@
1
+ declare const config: {
2
+ files: string[];
3
+ plugins: {
4
+ react: Plugin;
5
+ };
6
+ rules: {
7
+ [x: string]: any;
8
+ };
9
+ }[];
10
+
11
+ export { config as default };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,11 @@
1
- import type { Linter } from "eslint";
2
- import type { ESLintRules } from "eslint/rules";
3
- declare const config: Linter.BaseConfig<ESLintRules>;
4
- export = config;
1
+ declare const config: {
2
+ files: string[];
3
+ plugins: {
4
+ react: Plugin;
5
+ };
6
+ rules: {
7
+ [x: string]: any;
8
+ };
9
+ }[];
10
+
11
+ export { config as default };
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
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
12
18
  };
13
- var AlloyReact = require("eslint-config-alloy/react");
14
- var config = {
15
- plugins: ["react"],
16
- rules: __assign({}, AlloyReact.rules),
17
- };
18
- module.exports = config;
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
1
  {
2
2
  "name": "@abinnovision/eslint-config-react",
3
- "packageManager": "yarn@3.4.1",
4
- "version": "1.2.0",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
3
+ "version": "2.1.0",
4
+ "type": "module",
5
+ "repository": {
6
+ "url": "https://github.com/abinnovision/js-commons"
7
+ },
7
8
  "license": "Apache-2.0",
8
9
  "author": {
9
- "name": "AB INNOVISION UG (limited liability)",
10
+ "name": "AB INNOVISION GmbH",
10
11
  "email": "info@abinnovision.com",
11
12
  "url": "https://abinnovision.com/"
12
13
  },
13
- "repository": {
14
- "url": "https://github.com/abinnovision/js-commons"
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.cjs",
18
+ "types": "./dist/index.d.ts"
19
+ }
15
20
  },
21
+ "main": "./dist/index.cjs",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
16
24
  "files": [
17
25
  "dist/"
18
26
  ],
19
27
  "scripts": {
20
- "build": "tsc",
21
- "lint:check": "eslint 'src/**/*.{ts,js}'",
22
- "lint:fix": "eslint --fix 'src/**/*.{ts,js}'",
28
+ "build": "tsup src/index.ts --dts --format esm,cjs --clean",
23
29
  "format:check": "prettier --check 'src/**/*.{ts,js}' '**/*.{md,json,json5,yaml,yml}'",
24
- "format:fix": "prettier --write 'src/**/*.{ts,js}' '**/*.{md,json,json5,yaml,yml}'"
25
- },
26
- "dependencies": {
27
- "eslint-config-alloy": "^5.1.2"
28
- },
29
- "devDependencies": {
30
- "@abinnovision/eslint-config-base": "^1.2.0",
31
- "@abinnovision/eslint-config-typescript": "^1.2.0",
32
- "@abinnovision/prettier-config": "^1.1.0",
33
- "@types/eslint": "^8.21.1",
34
- "@typescript-eslint/eslint-plugin": "^6.9.0",
35
- "@typescript-eslint/parser": "^6.9.0",
36
- "eslint": "^8.52.0",
37
- "typescript": "^5.2.2"
38
- },
39
- "peerDependencies": {
40
- "eslint": "^8.24.0",
41
- "eslint-plugin-react": "^7.0.0"
42
- },
43
- "eslintConfig": {
44
- "extends": [
45
- "@abinnovision/eslint-config-base",
46
- "@abinnovision/eslint-config-typescript"
47
- ],
48
- "parserOptions": {
49
- "project": "./tsconfig.json"
50
- }
30
+ "format:fix": "prettier --write 'src/**/*.{ts,js}' '**/*.{md,json,json5,yaml,yml}'",
31
+ "lint:check": "eslint 'src/**/*.{ts,js}'",
32
+ "lint:fix": "eslint --fix 'src/**/*.{ts,js}'"
51
33
  },
52
- "prettier": "@abinnovision/prettier-config",
53
34
  "lint-staged": {
54
35
  "src/**/*.{ts,js}": [
55
36
  "prettier --write",
56
37
  "eslint --fix"
57
38
  ],
58
- "**/*.{md,json,json5,yaml,yml}": [
39
+ "{**/*,*}.{md,json,json5,yaml,yml}": [
59
40
  "prettier --write"
60
41
  ]
61
- }
42
+ },
43
+ "prettier": "@abinnovision/prettier-config",
44
+ "dependencies": {
45
+ "eslint-config-alloy": "^5.1.2",
46
+ "eslint-plugin-react": "^7.35.0"
47
+ },
48
+ "devDependencies": {
49
+ "@abinnovision/prettier-config": "^2.1.0",
50
+ "@types/eslint": "^9.6.0",
51
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
52
+ "@typescript-eslint/parser": "^6.21.0",
53
+ "eslint": "^9.8.0",
54
+ "globals": "^15.9.0",
55
+ "tsup": "^8.2.4",
56
+ "typescript": "^5.5.4"
57
+ },
58
+ "peerDependencies": {
59
+ "eslint": "^8.24.0 || ^9.0.0"
60
+ },
61
+ "packageManager": "yarn@3.4.1"
62
62
  }