@abinnovision/eslint-config-react 1.2.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 +11 -0
- package/README.md +1 -12
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +36 -15
- package/dist/index.mjs +25 -0
- package/package.json +36 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
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
|
+
|
|
3
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
|
|
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.d.mts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
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,62 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abinnovision/eslint-config-react",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
9
|
+
"name": "AB INNOVISION GmbH",
|
|
10
10
|
"email": "info@abinnovision.com",
|
|
11
11
|
"url": "https://abinnovision.com/"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
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": "
|
|
21
|
-
"lint:check": "eslint 'src/**/*.{ts,js}'",
|
|
22
|
-
"lint:fix": "eslint --fix 'src/**/*.{ts,js}'",
|
|
27
|
+
"build": "tsup src/index.ts --dts --format esm,cjs --clean",
|
|
23
28
|
"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}'"
|
|
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}'"
|
|
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
|
+
]
|
|
25
41
|
},
|
|
42
|
+
"prettier": "@abinnovision/prettier-config",
|
|
26
43
|
"dependencies": {
|
|
27
|
-
"eslint-config-alloy": "^5.1.2"
|
|
44
|
+
"eslint-config-alloy": "^5.1.2",
|
|
45
|
+
"eslint-plugin-react": "^7.0.0"
|
|
28
46
|
},
|
|
29
47
|
"devDependencies": {
|
|
30
|
-
"@abinnovision/
|
|
31
|
-
"@
|
|
32
|
-
"@abinnovision/prettier-config": "^1.1.0",
|
|
33
|
-
"@types/eslint": "^8.21.1",
|
|
48
|
+
"@abinnovision/prettier-config": "^2.0.0",
|
|
49
|
+
"@types/eslint": "^8.44.6",
|
|
34
50
|
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
35
51
|
"@typescript-eslint/parser": "^6.9.0",
|
|
36
52
|
"eslint": "^8.52.0",
|
|
53
|
+
"globals": "^13.23.0",
|
|
54
|
+
"tsup": "^7.2.0",
|
|
37
55
|
"typescript": "^5.2.2"
|
|
38
56
|
},
|
|
39
57
|
"peerDependencies": {
|
|
40
|
-
"eslint": "^8.24.0"
|
|
41
|
-
"eslint-plugin-react": "^7.0.0"
|
|
58
|
+
"eslint": "^8.24.0"
|
|
42
59
|
},
|
|
43
|
-
"
|
|
44
|
-
"extends": [
|
|
45
|
-
"@abinnovision/eslint-config-base",
|
|
46
|
-
"@abinnovision/eslint-config-typescript"
|
|
47
|
-
],
|
|
48
|
-
"parserOptions": {
|
|
49
|
-
"project": "./tsconfig.json"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"prettier": "@abinnovision/prettier-config",
|
|
53
|
-
"lint-staged": {
|
|
54
|
-
"src/**/*.{ts,js}": [
|
|
55
|
-
"prettier --write",
|
|
56
|
-
"eslint --fix"
|
|
57
|
-
],
|
|
58
|
-
"**/*.{md,json,json5,yaml,yml}": [
|
|
59
|
-
"prettier --write"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
60
|
+
"packageManager": "yarn@3.4.1"
|
|
62
61
|
}
|