@abinnovision/eslint-config-react 1.1.0 → 2.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,35 +1,53 @@
1
1
  # Changelog
2
2
 
3
- ## [1.1.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.2...eslint-config-react-v1.1.0) (2023-04-21)
3
+ ## [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)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * will drop support for legacy eslint configs
9
+
10
+ ### Features
11
+
12
+ * migrate to eslint flat config ([#93](https://github.com/abinnovision/js-commons/issues/93)) ([7568ba1](https://github.com/abinnovision/js-commons/commit/7568ba1782f912357e18619ab3e4e56a0c738a1c))
13
+
14
+ ## [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
15
 
5
16
 
6
17
  ### Features
7
18
 
8
- * first implementation ([470e5d5](https://github.com/abinnovision/js-commons/commit/470e5d591bd711b5d793037c946bf56883d5acf3))
19
+ * update eslint-config-alloy to v5.0.0 ([6acd7da](https://github.com/abinnovision/js-commons/commit/6acd7dacca62218dc3b72611dae6b0154ba16388))
9
20
 
10
21
 
11
22
  ### Bug Fixes
12
23
 
13
- * add correct license to all packages ([af7343d](https://github.com/abinnovision/js-commons/commit/af7343dbdb93329a0321a369f81e9b37da9068fa))
14
- * emit declarations ([616f817](https://github.com/abinnovision/js-commons/commit/616f817ca7701e160325e1e81d633df345244cc3))
24
+ * align peer dependency versions ([#88](https://github.com/abinnovision/js-commons/issues/88)) ([62e752d](https://github.com/abinnovision/js-commons/commit/62e752d625fd3f454a50c58119f52fa4bbba297d))
15
25
 
16
- ## [1.0.2](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.1...eslint-config-react-v1.0.2) (2023-04-21)
26
+ ## [1.1.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.2...eslint-config-react-v1.1.0) (2023-04-21)
17
27
 
28
+ ### Features
29
+
30
+ - first implementation ([470e5d5](https://github.com/abinnovision/js-commons/commit/470e5d591bd711b5d793037c946bf56883d5acf3))
18
31
 
19
32
  ### Bug Fixes
20
33
 
21
- * emit declarations ([616f817](https://github.com/abinnovision/js-commons/commit/616f817ca7701e160325e1e81d633df345244cc3))
34
+ - add correct license to all packages ([af7343d](https://github.com/abinnovision/js-commons/commit/af7343dbdb93329a0321a369f81e9b37da9068fa))
35
+ - emit declarations ([616f817](https://github.com/abinnovision/js-commons/commit/616f817ca7701e160325e1e81d633df345244cc3))
22
36
 
23
- ## [1.0.1](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.0...eslint-config-react-v1.0.1) (2023-04-21)
37
+ ## [1.0.2](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.1...eslint-config-react-v1.0.2) (2023-04-21)
24
38
 
39
+ ### Bug Fixes
40
+
41
+ - emit declarations ([616f817](https://github.com/abinnovision/js-commons/commit/616f817ca7701e160325e1e81d633df345244cc3))
42
+
43
+ ## [1.0.1](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v1.0.0...eslint-config-react-v1.0.1) (2023-04-21)
25
44
 
26
45
  ### Bug Fixes
27
46
 
28
- * add correct license to all packages ([af7343d](https://github.com/abinnovision/js-commons/commit/af7343dbdb93329a0321a369f81e9b37da9068fa))
47
+ - add correct license to all packages ([af7343d](https://github.com/abinnovision/js-commons/commit/af7343dbdb93329a0321a369f81e9b37da9068fa))
29
48
 
30
49
  ## 1.0.0 (2023-02-23)
31
50
 
32
-
33
51
  ### Features
34
52
 
35
- * first implementation ([470e5d5](https://github.com/abinnovision/eslint-config/commit/470e5d591bd711b5d793037c946bf56883d5acf3))
53
+ - first implementation ([470e5d5](https://github.com/abinnovision/eslint-config/commit/470e5d591bd711b5d793037c946bf56883d5acf3))
package/README.md CHANGED
@@ -10,17 +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)
26
-
@@ -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,39 @@
1
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);
12
- };
13
- var AlloyReact = require("eslint-config-alloy/react");
14
- var config = {
15
- plugins: ["react"],
16
- rules: __assign({}, AlloyReact.rules),
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
17
15
  };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+
25
+ // src/index.ts
26
+ var AlloyReact = __toESM(require("eslint-config-alloy/react"));
27
+ var eslintPluginReact = __toESM(require("eslint-plugin-react"));
28
+ var config = [
29
+ {
30
+ files: ["**/*.{js,jsx,ts,tsx}"],
31
+ plugins: {
32
+ react: eslintPluginReact
33
+ },
34
+ rules: {
35
+ ...AlloyReact.rules ?? {}
36
+ }
37
+ }
38
+ ];
18
39
  module.exports = config;
package/dist/index.mjs ADDED
@@ -0,0 +1,25 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ // src/index.ts
7
+ import * as AlloyReact from "eslint-config-alloy/react";
8
+ import * as eslintPluginReact from "eslint-plugin-react";
9
+ var require_src = __commonJS({
10
+ "src/index.ts"(exports, module) {
11
+ var config = [
12
+ {
13
+ files: ["**/*.{js,jsx,ts,tsx}"],
14
+ plugins: {
15
+ react: eslintPluginReact
16
+ },
17
+ rules: {
18
+ ...AlloyReact.rules ?? {}
19
+ }
20
+ }
21
+ ];
22
+ module.exports = config;
23
+ }
24
+ });
25
+ export default require_src();
package/package.json CHANGED
@@ -1,35 +1,61 @@
1
1
  {
2
2
  "name": "@abinnovision/eslint-config-react",
3
- "packageManager": "yarn@3.4.1",
4
- "version": "1.1.0",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
3
+ "version": "2.0.0",
4
+ "repository": {
5
+ "url": "https://github.com/abinnovision/js-commons"
6
+ },
7
7
  "license": "Apache-2.0",
8
8
  "author": {
9
- "name": "AB INNOVISION UG (limited liability)",
9
+ "name": "AB INNOVISION GmbH",
10
10
  "email": "info@abinnovision.com",
11
11
  "url": "https://abinnovision.com/"
12
12
  },
13
- "repository": {
14
- "url": "https://github.com/abinnovision/js-commons"
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/index.mjs",
16
+ "require": "./dist/index.js",
17
+ "types": "./dist/index.d.ts"
18
+ }
15
19
  },
20
+ "main": "./dist/index.js",
21
+ "module": "./dist/index.mjs",
22
+ "types": "./dist/index.d.ts",
16
23
  "files": [
17
24
  "dist/"
18
25
  ],
19
26
  "scripts": {
20
- "build": "tsc"
27
+ "build": "tsup src/index.ts --dts --format esm,cjs --clean",
28
+ "format:check": "prettier --check 'src/**/*.{ts,js}' '**/*.{md,json,json5,yaml,yml}'",
29
+ "format:fix": "prettier --write 'src/**/*.{ts,js}' '**/*.{md,json,json5,yaml,yml}'",
30
+ "lint:check": "eslint 'src/**/*.{ts,js}'",
31
+ "lint:fix": "eslint --fix 'src/**/*.{ts,js}'"
21
32
  },
33
+ "lint-staged": {
34
+ "src/**/*.{ts,js}": [
35
+ "prettier --write",
36
+ "eslint --fix"
37
+ ],
38
+ "{**/*,*}.{md,json,json5,yaml,yml}": [
39
+ "prettier --write"
40
+ ]
41
+ },
42
+ "prettier": "@abinnovision/prettier-config",
22
43
  "dependencies": {
23
- "eslint-config-alloy": "^4.9.0"
44
+ "eslint-config-alloy": "^5.1.2",
45
+ "eslint-plugin-react": "^7.0.0"
24
46
  },
25
47
  "devDependencies": {
26
- "@types/eslint": "^8.21.1",
27
- "@types/node": "^18.14.1",
28
- "eslint": "^8.34.0",
29
- "typescript": "^5.0.2"
48
+ "@abinnovision/prettier-config": "^2.0.0",
49
+ "@types/eslint": "^8.44.6",
50
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
51
+ "@typescript-eslint/parser": "^6.9.0",
52
+ "eslint": "^8.52.0",
53
+ "globals": "^13.23.0",
54
+ "tsup": "^7.2.0",
55
+ "typescript": "^5.2.2"
30
56
  },
31
57
  "peerDependencies": {
32
- "eslint": "^8.0.0",
33
- "eslint-plugin-react": "^7.0.0"
34
- }
58
+ "eslint": "^8.24.0"
59
+ },
60
+ "packageManager": "yarn@3.4.1"
35
61
  }