@robot-inventor/eslint-config 6.0.19 → 6.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/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +28 -1
- package/dist/cjs/package.json +4 -3
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +26 -1
- package/dist/esm/package.json +4 -3
- package/package.json +4 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
declare const eslintConfigNoJSDoc: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
2
2
|
declare const eslintConfig: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
3
|
-
|
|
3
|
+
declare const eslintReactConfig: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
4
|
+
declare const eslintReactConfigNoJSDoc: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
5
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,13 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.eslintConfig = exports.eslintConfigNoJSDoc = void 0;
|
|
6
|
+
exports.eslintReactConfigNoJSDoc = exports.eslintReactConfig = exports.eslintConfig = exports.eslintConfigNoJSDoc = void 0;
|
|
7
7
|
const typescript_eslint_1 = require("typescript-eslint");
|
|
8
8
|
const js_1 = __importDefault(require("@eslint/js"));
|
|
9
9
|
// eslint-disable-next-line import-x/default
|
|
10
10
|
const eslint_config_prettier_1 = __importDefault(require("eslint-config-prettier"));
|
|
11
11
|
const eslint_plugin_import_x_1 = __importDefault(require("eslint-plugin-import-x"));
|
|
12
12
|
const eslint_plugin_jsdoc_1 = __importDefault(require("eslint-plugin-jsdoc"));
|
|
13
|
+
const eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
|
|
13
14
|
const eslintRules = {
|
|
14
15
|
curly: ["error", "multi-line"],
|
|
15
16
|
"no-magic-numbers": [
|
|
@@ -104,3 +105,29 @@ const JSDocRule = (0, typescript_eslint_1.config)({
|
|
|
104
105
|
});
|
|
105
106
|
const eslintConfig = (0, typescript_eslint_1.config)(...eslintConfigNoJSDoc, ...JSDocRule);
|
|
106
107
|
exports.eslintConfig = eslintConfig;
|
|
108
|
+
const eslintReactConfigBase = (0, typescript_eslint_1.config)({
|
|
109
|
+
files: ["**/*.tsx"],
|
|
110
|
+
// @ts-expect-error `flat` always exists
|
|
111
|
+
...eslint_plugin_react_1.default.configs.flat["recommended"],
|
|
112
|
+
rules: {
|
|
113
|
+
"jsdoc/check-tag-names": [
|
|
114
|
+
"error",
|
|
115
|
+
{
|
|
116
|
+
definedTags: ["jsxImportSource"]
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"react/self-closing-comp": [
|
|
120
|
+
"error",
|
|
121
|
+
{
|
|
122
|
+
component: true,
|
|
123
|
+
html: true
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"react/jsx-boolean-value": ["error", "never"],
|
|
127
|
+
"react/jsx-curly-brace-presence": ["error", "never"]
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const eslintReactConfig = (0, typescript_eslint_1.config)(...eslintConfig, ...eslintReactConfigBase);
|
|
131
|
+
exports.eslintReactConfig = eslintReactConfig;
|
|
132
|
+
const eslintReactConfigNoJSDoc = (0, typescript_eslint_1.config)(...eslintConfigNoJSDoc, ...eslintReactConfigBase);
|
|
133
|
+
exports.eslintReactConfigNoJSDoc = eslintReactConfigNoJSDoc;
|
package/dist/cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
"@types/eslint__js": "^8.42.3",
|
|
36
36
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
37
37
|
"@typescript-eslint/parser": "^8.0.1",
|
|
38
|
+
"eslint": "^9.17.0",
|
|
38
39
|
"eslint-config-prettier": "^9.1.0",
|
|
39
40
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
40
41
|
"eslint-plugin-import-x": "^4.0.0",
|
|
41
42
|
"eslint-plugin-jsdoc": "^50.0.0",
|
|
43
|
+
"eslint-plugin-react": "^7.37.3",
|
|
42
44
|
"typescript-eslint": "^8.0.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
@@ -46,10 +48,9 @@
|
|
|
46
48
|
"@changesets/cli": "^2.27.1",
|
|
47
49
|
"@eslint-types/jsdoc": "^48.2.2",
|
|
48
50
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
49
|
-
"@robot-inventor/tsconfig-base": "^
|
|
51
|
+
"@robot-inventor/tsconfig-base": "^5.0.0",
|
|
50
52
|
"@types/eslint": "^9.6.1",
|
|
51
53
|
"@types/eslint__eslintrc": "^2.1.2",
|
|
52
|
-
"eslint": "^9.9.0",
|
|
53
54
|
"jiti": "^2.0.0",
|
|
54
55
|
"tsconfig-to-dual-package": "^1.2.0",
|
|
55
56
|
"typescript": "^5.4.4"
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
declare const eslintConfigNoJSDoc: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
2
|
declare const eslintConfig: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
3
|
-
|
|
3
|
+
declare const eslintReactConfig: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
4
|
+
declare const eslintReactConfigNoJSDoc: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
5
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import eslint from "@eslint/js";
|
|
|
4
4
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
5
5
|
import importX from "eslint-plugin-import-x";
|
|
6
6
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
7
|
+
import react from "eslint-plugin-react";
|
|
7
8
|
const eslintRules = {
|
|
8
9
|
curly: ["error", "multi-line"],
|
|
9
10
|
"no-magic-numbers": [
|
|
@@ -96,4 +97,28 @@ const JSDocRule = config({
|
|
|
96
97
|
}
|
|
97
98
|
});
|
|
98
99
|
const eslintConfig = config(...eslintConfigNoJSDoc, ...JSDocRule);
|
|
99
|
-
|
|
100
|
+
const eslintReactConfigBase = config({
|
|
101
|
+
files: ["**/*.tsx"],
|
|
102
|
+
// @ts-expect-error `flat` always exists
|
|
103
|
+
...react.configs.flat["recommended"],
|
|
104
|
+
rules: {
|
|
105
|
+
"jsdoc/check-tag-names": [
|
|
106
|
+
"error",
|
|
107
|
+
{
|
|
108
|
+
definedTags: ["jsxImportSource"]
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"react/self-closing-comp": [
|
|
112
|
+
"error",
|
|
113
|
+
{
|
|
114
|
+
component: true,
|
|
115
|
+
html: true
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"react/jsx-boolean-value": ["error", "never"],
|
|
119
|
+
"react/jsx-curly-brace-presence": ["error", "never"]
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const eslintReactConfig = config(...eslintConfig, ...eslintReactConfigBase);
|
|
123
|
+
const eslintReactConfigNoJSDoc = config(...eslintConfigNoJSDoc, ...eslintReactConfigBase);
|
|
124
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
package/dist/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
"@types/eslint__js": "^8.42.3",
|
|
36
36
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
37
37
|
"@typescript-eslint/parser": "^8.0.1",
|
|
38
|
+
"eslint": "^9.17.0",
|
|
38
39
|
"eslint-config-prettier": "^9.1.0",
|
|
39
40
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
40
41
|
"eslint-plugin-import-x": "^4.0.0",
|
|
41
42
|
"eslint-plugin-jsdoc": "^50.0.0",
|
|
43
|
+
"eslint-plugin-react": "^7.37.3",
|
|
42
44
|
"typescript-eslint": "^8.0.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
@@ -46,10 +48,9 @@
|
|
|
46
48
|
"@changesets/cli": "^2.27.1",
|
|
47
49
|
"@eslint-types/jsdoc": "^48.2.2",
|
|
48
50
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
49
|
-
"@robot-inventor/tsconfig-base": "^
|
|
51
|
+
"@robot-inventor/tsconfig-base": "^5.0.0",
|
|
50
52
|
"@types/eslint": "^9.6.1",
|
|
51
53
|
"@types/eslint__eslintrc": "^2.1.2",
|
|
52
|
-
"eslint": "^9.9.0",
|
|
53
54
|
"jiti": "^2.0.0",
|
|
54
55
|
"tsconfig-to-dual-package": "^1.2.0",
|
|
55
56
|
"typescript": "^5.4.4"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -46,10 +46,12 @@
|
|
|
46
46
|
"@types/eslint__js": "^8.42.3",
|
|
47
47
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
48
48
|
"@typescript-eslint/parser": "^8.0.1",
|
|
49
|
+
"eslint": "^9.17.0",
|
|
49
50
|
"eslint-config-prettier": "^9.1.0",
|
|
50
51
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
51
52
|
"eslint-plugin-import-x": "^4.0.0",
|
|
52
53
|
"eslint-plugin-jsdoc": "^50.0.0",
|
|
54
|
+
"eslint-plugin-react": "^7.37.3",
|
|
53
55
|
"typescript-eslint": "^8.0.0"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
@@ -57,10 +59,9 @@
|
|
|
57
59
|
"@changesets/cli": "^2.27.1",
|
|
58
60
|
"@eslint-types/jsdoc": "^48.2.2",
|
|
59
61
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
60
|
-
"@robot-inventor/tsconfig-base": "^
|
|
62
|
+
"@robot-inventor/tsconfig-base": "^5.0.0",
|
|
61
63
|
"@types/eslint": "^9.6.1",
|
|
62
64
|
"@types/eslint__eslintrc": "^2.1.2",
|
|
63
|
-
"eslint": "^9.9.0",
|
|
64
65
|
"jiti": "^2.0.0",
|
|
65
66
|
"tsconfig-to-dual-package": "^1.2.0",
|
|
66
67
|
"typescript": "^5.4.4"
|