@robot-inventor/eslint-config 9.0.0 → 10.0.1
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/index.d.ts +6 -0
- package/dist/{esm/index.js → index.js} +0 -2
- package/package.json +3 -14
- package/dist/cjs/index.d.ts +0 -5
- package/dist/cjs/index.js +0 -140
- package/dist/cjs/package.json +0 -63
- package/dist/esm/index.d.ts +0 -5
- package/dist/esm/package.json +0 -63
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ConfigArray } from "typescript-eslint";
|
|
2
|
+
declare const eslintConfigNoJSDoc: ConfigArray;
|
|
3
|
+
declare const eslintConfig: ConfigArray;
|
|
4
|
+
declare const eslintReactConfig: ConfigArray;
|
|
5
|
+
declare const eslintReactConfigNoJSDoc: ConfigArray;
|
|
6
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
|
@@ -4,7 +4,6 @@ import eslintConfigPrettier from "eslint-config-prettier";
|
|
|
4
4
|
import importX from "eslint-plugin-import-x";
|
|
5
5
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
6
6
|
import react from "eslint-plugin-react";
|
|
7
|
-
// @ts-expect-error `eslint-plugin-react-compiler` doesn't have type definitions.
|
|
8
7
|
// eslint-disable-next-line import-x/max-dependencies
|
|
9
8
|
import reactCompiler from "eslint-plugin-react-compiler";
|
|
10
9
|
const eslintRules = {
|
|
@@ -104,7 +103,6 @@ const eslintReactConfigBase = config({
|
|
|
104
103
|
...react.configs.flat["recommended"],
|
|
105
104
|
plugins: {
|
|
106
105
|
...react.configs.flat["recommended"]?.plugins,
|
|
107
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
108
106
|
"react-compiler": reactCompiler
|
|
109
107
|
},
|
|
110
108
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"import": {
|
|
13
|
-
"default": "./dist/esm/index.js"
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"default": "./dist/cjs/index.js"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
10
|
"scripts": {
|
|
21
|
-
"build": "tsc
|
|
11
|
+
"build": "tsc",
|
|
22
12
|
"lint": "npx eslint ./src/**/*.ts",
|
|
23
13
|
"ci:version": "changeset version",
|
|
24
14
|
"ci:publish": "npm run build && changeset publish"
|
|
@@ -47,7 +37,7 @@
|
|
|
47
37
|
"@typescript-eslint/parser": "^8.0.1",
|
|
48
38
|
"eslint": "^9.17.0",
|
|
49
39
|
"eslint-config-prettier": "^10.0.0",
|
|
50
|
-
"eslint-import-resolver-typescript": "^
|
|
40
|
+
"eslint-import-resolver-typescript": "^4.0.0",
|
|
51
41
|
"eslint-plugin-import-x": "^4.0.0",
|
|
52
42
|
"eslint-plugin-jsdoc": "^50.0.0",
|
|
53
43
|
"eslint-plugin-react": "^7.37.3",
|
|
@@ -63,7 +53,6 @@
|
|
|
63
53
|
"@types/eslint": "^9.6.1",
|
|
64
54
|
"@types/eslint__eslintrc": "^2.1.2",
|
|
65
55
|
"jiti": "^2.0.0",
|
|
66
|
-
"tsconfig-to-dual-package": "^1.2.0",
|
|
67
56
|
"typescript": "^5.4.4"
|
|
68
57
|
},
|
|
69
58
|
"overrides": {
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const eslintConfigNoJSDoc: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
2
|
-
declare const eslintConfig: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
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
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.eslintReactConfigNoJSDoc = exports.eslintReactConfig = exports.eslintConfig = exports.eslintConfigNoJSDoc = void 0;
|
|
7
|
-
const typescript_eslint_1 = require("typescript-eslint");
|
|
8
|
-
const js_1 = __importDefault(require("@eslint/js"));
|
|
9
|
-
const eslint_config_prettier_1 = __importDefault(require("eslint-config-prettier"));
|
|
10
|
-
const eslint_plugin_import_x_1 = __importDefault(require("eslint-plugin-import-x"));
|
|
11
|
-
const eslint_plugin_jsdoc_1 = __importDefault(require("eslint-plugin-jsdoc"));
|
|
12
|
-
const eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
|
|
13
|
-
// @ts-expect-error `eslint-plugin-react-compiler` doesn't have type definitions.
|
|
14
|
-
// eslint-disable-next-line import-x/max-dependencies
|
|
15
|
-
const eslint_plugin_react_compiler_1 = __importDefault(require("eslint-plugin-react-compiler"));
|
|
16
|
-
const eslintRules = {
|
|
17
|
-
curly: ["error", "multi-line"],
|
|
18
|
-
"no-magic-numbers": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
ignoreArrayIndexes: true
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"no-ternary": "off",
|
|
25
|
-
"no-void": [
|
|
26
|
-
"error",
|
|
27
|
-
{
|
|
28
|
-
allowAsStatement: true
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"one-var": ["error", "never"],
|
|
32
|
-
"no-plusplus": "off",
|
|
33
|
-
"no-new": "off"
|
|
34
|
-
};
|
|
35
|
-
const tseslintRules = {
|
|
36
|
-
"@typescript-eslint/explicit-function-return-type": "error",
|
|
37
|
-
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
38
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
39
|
-
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
40
|
-
"@typescript-eslint/consistent-type-exports": "error",
|
|
41
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
42
|
-
"@typescript-eslint/array-type": [
|
|
43
|
-
"error",
|
|
44
|
-
{
|
|
45
|
-
default: "array-simple"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
};
|
|
49
|
-
const importXRules = {
|
|
50
|
-
"import-x/no-deprecated": "error",
|
|
51
|
-
"import-x/no-extraneous-dependencies": "error",
|
|
52
|
-
"import-x/no-absolute-path": "error",
|
|
53
|
-
"import-x/no-cycle": "error",
|
|
54
|
-
"import-x/no-self-import": "error",
|
|
55
|
-
"import-x/no-useless-path-segments": "error",
|
|
56
|
-
"import-x/exports-last": "error",
|
|
57
|
-
"import-x/first": "error",
|
|
58
|
-
"import-x/group-exports": "error",
|
|
59
|
-
"import-x/max-dependencies": "error",
|
|
60
|
-
"import-x/newline-after-import": "error",
|
|
61
|
-
"import-x/no-unassigned-import": "error"
|
|
62
|
-
};
|
|
63
|
-
const jsdocRules = {
|
|
64
|
-
"jsdoc/require-jsdoc": [
|
|
65
|
-
"error",
|
|
66
|
-
{
|
|
67
|
-
require: {
|
|
68
|
-
ArrowFunctionExpression: true,
|
|
69
|
-
ClassDeclaration: true,
|
|
70
|
-
ClassExpression: true,
|
|
71
|
-
FunctionDeclaration: true,
|
|
72
|
-
FunctionExpression: true,
|
|
73
|
-
MethodDefinition: true
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
};
|
|
78
|
-
const eslintConfigNoJSDoc = (0, typescript_eslint_1.config)(js_1.default.configs.all, eslint_plugin_jsdoc_1.default.configs["flat/recommended-typescript-error"], eslint_config_prettier_1.default, ...typescript_eslint_1.configs.strictTypeChecked, ...typescript_eslint_1.configs.stylisticTypeChecked, eslint_plugin_import_x_1.default.flatConfigs.recommended, eslint_plugin_import_x_1.default.flatConfigs.typescript, {
|
|
79
|
-
languageOptions: {
|
|
80
|
-
parserOptions: {
|
|
81
|
-
projectService: true
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
plugins: {
|
|
85
|
-
jsdoc: eslint_plugin_jsdoc_1.default
|
|
86
|
-
},
|
|
87
|
-
linterOptions: {
|
|
88
|
-
reportUnusedDisableDirectives: "error"
|
|
89
|
-
},
|
|
90
|
-
settings: {
|
|
91
|
-
"import-x/resolver": {
|
|
92
|
-
typescript: true,
|
|
93
|
-
node: true
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
rules: {
|
|
97
|
-
...eslintRules,
|
|
98
|
-
...tseslintRules,
|
|
99
|
-
...importXRules
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
exports.eslintConfigNoJSDoc = eslintConfigNoJSDoc;
|
|
103
|
-
const JSDocRule = (0, typescript_eslint_1.config)({
|
|
104
|
-
rules: {
|
|
105
|
-
...jsdocRules
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const eslintConfig = (0, typescript_eslint_1.config)(...eslintConfigNoJSDoc, ...JSDocRule);
|
|
109
|
-
exports.eslintConfig = eslintConfig;
|
|
110
|
-
const eslintReactConfigBase = (0, typescript_eslint_1.config)({
|
|
111
|
-
files: ["**/*.tsx"],
|
|
112
|
-
...eslint_plugin_react_1.default.configs.flat["recommended"],
|
|
113
|
-
plugins: {
|
|
114
|
-
...eslint_plugin_react_1.default.configs.flat["recommended"]?.plugins,
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
116
|
-
"react-compiler": eslint_plugin_react_compiler_1.default
|
|
117
|
-
},
|
|
118
|
-
rules: {
|
|
119
|
-
"jsdoc/check-tag-names": [
|
|
120
|
-
"error",
|
|
121
|
-
{
|
|
122
|
-
definedTags: ["jsxImportSource"]
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"react/self-closing-comp": [
|
|
126
|
-
"error",
|
|
127
|
-
{
|
|
128
|
-
component: true,
|
|
129
|
-
html: true
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"react/jsx-boolean-value": ["error", "never"],
|
|
133
|
-
"react/jsx-curly-brace-presence": ["error", "never"],
|
|
134
|
-
"react-compiler/react-compiler": "error"
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
const eslintReactConfig = (0, typescript_eslint_1.config)(...eslintConfig, ...eslintReactConfigBase);
|
|
138
|
-
exports.eslintReactConfig = eslintReactConfig;
|
|
139
|
-
const eslintReactConfigNoJSDoc = (0, typescript_eslint_1.config)(...eslintConfigNoJSDoc, ...eslintReactConfigBase);
|
|
140
|
-
exports.eslintReactConfigNoJSDoc = eslintReactConfigNoJSDoc;
|
package/dist/cjs/package.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "9.0.0",
|
|
4
|
-
"description": "My ESLint config preset",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package",
|
|
11
|
-
"lint": "npx eslint ./src/**/*.ts",
|
|
12
|
-
"ci:version": "changeset version",
|
|
13
|
-
"ci:publish": "npm run build && changeset publish"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/Robot-Inventor/eslint-config.git"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"eslint"
|
|
21
|
-
],
|
|
22
|
-
"author": "Robot-Inventor",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://github.com/Robot-Inventor/eslint-config/issues"
|
|
26
|
-
},
|
|
27
|
-
"homepage": "https://github.com/Robot-Inventor/eslint-config#readme",
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public",
|
|
30
|
-
"provenance": true
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
34
|
-
"@eslint/js": "^9.0.0",
|
|
35
|
-
"@types/eslint-config-prettier": "^6.11.3",
|
|
36
|
-
"@typescript-eslint/parser": "^8.0.1",
|
|
37
|
-
"eslint": "^9.17.0",
|
|
38
|
-
"eslint-config-prettier": "^10.0.0",
|
|
39
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
|
40
|
-
"eslint-plugin-import-x": "^4.0.0",
|
|
41
|
-
"eslint-plugin-jsdoc": "^50.0.0",
|
|
42
|
-
"eslint-plugin-react": "^7.37.3",
|
|
43
|
-
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
|
|
44
|
-
"typescript-eslint": "^8.26.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@changesets/changelog-github": "^0.5.0",
|
|
48
|
-
"@changesets/cli": "^2.27.1",
|
|
49
|
-
"@eslint-types/jsdoc": "^48.2.2",
|
|
50
|
-
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
51
|
-
"@robot-inventor/tsconfig-base": "^6.0.0",
|
|
52
|
-
"@types/eslint": "^9.6.1",
|
|
53
|
-
"@types/eslint__eslintrc": "^2.1.2",
|
|
54
|
-
"jiti": "^2.0.0",
|
|
55
|
-
"tsconfig-to-dual-package": "^1.2.0",
|
|
56
|
-
"typescript": "^5.4.4"
|
|
57
|
-
},
|
|
58
|
-
"overrides": {
|
|
59
|
-
"eslint-import-resolver-typescript": {
|
|
60
|
-
"eslint-plugin-import": "npm:eslint-plugin-import-x@^4.0.0"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
package/dist/esm/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const eslintConfigNoJSDoc: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
|
-
declare const eslintConfig: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
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/package.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "9.0.0",
|
|
4
|
-
"description": "My ESLint config preset",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package",
|
|
11
|
-
"lint": "npx eslint ./src/**/*.ts",
|
|
12
|
-
"ci:version": "changeset version",
|
|
13
|
-
"ci:publish": "npm run build && changeset publish"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/Robot-Inventor/eslint-config.git"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"eslint"
|
|
21
|
-
],
|
|
22
|
-
"author": "Robot-Inventor",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://github.com/Robot-Inventor/eslint-config/issues"
|
|
26
|
-
},
|
|
27
|
-
"homepage": "https://github.com/Robot-Inventor/eslint-config#readme",
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public",
|
|
30
|
-
"provenance": true
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
34
|
-
"@eslint/js": "^9.0.0",
|
|
35
|
-
"@types/eslint-config-prettier": "^6.11.3",
|
|
36
|
-
"@typescript-eslint/parser": "^8.0.1",
|
|
37
|
-
"eslint": "^9.17.0",
|
|
38
|
-
"eslint-config-prettier": "^10.0.0",
|
|
39
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
|
40
|
-
"eslint-plugin-import-x": "^4.0.0",
|
|
41
|
-
"eslint-plugin-jsdoc": "^50.0.0",
|
|
42
|
-
"eslint-plugin-react": "^7.37.3",
|
|
43
|
-
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
|
|
44
|
-
"typescript-eslint": "^8.26.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@changesets/changelog-github": "^0.5.0",
|
|
48
|
-
"@changesets/cli": "^2.27.1",
|
|
49
|
-
"@eslint-types/jsdoc": "^48.2.2",
|
|
50
|
-
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
51
|
-
"@robot-inventor/tsconfig-base": "^6.0.0",
|
|
52
|
-
"@types/eslint": "^9.6.1",
|
|
53
|
-
"@types/eslint__eslintrc": "^2.1.2",
|
|
54
|
-
"jiti": "^2.0.0",
|
|
55
|
-
"tsconfig-to-dual-package": "^1.2.0",
|
|
56
|
-
"typescript": "^5.4.4"
|
|
57
|
-
},
|
|
58
|
-
"overrides": {
|
|
59
|
-
"eslint-import-resolver-typescript": {
|
|
60
|
-
"eslint-plugin-import": "npm:eslint-plugin-import-x@^4.0.0"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|