@robot-inventor/eslint-config 10.1.5 → 10.2.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/index.d.ts +5 -5
- package/dist/index.js +11 -8
- package/package.json +2 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const eslintConfigNoJSDoc:
|
|
3
|
-
declare const eslintConfig:
|
|
4
|
-
declare const eslintReactConfig:
|
|
5
|
-
declare const eslintReactConfigNoJSDoc:
|
|
1
|
+
import type { Linter } from "eslint";
|
|
2
|
+
declare const eslintConfigNoJSDoc: Linter.Config<Linter.RulesRecord>[];
|
|
3
|
+
declare const eslintConfig: Linter.Config<Linter.RulesRecord>[];
|
|
4
|
+
declare const eslintReactConfig: Linter.Config<Linter.RulesRecord>[];
|
|
5
|
+
declare const eslintReactConfigNoJSDoc: Linter.Config<Linter.RulesRecord>[];
|
|
6
6
|
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { config, configs as tseslintConfigs } from "typescript-eslint";
|
|
2
1
|
import { flatConfigs as importXFlatConfigs } from "eslint-plugin-import-x";
|
|
2
|
+
import { defineConfig } from "eslint/config";
|
|
3
3
|
import eslint from "@eslint/js";
|
|
4
4
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
5
5
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
6
6
|
import react from "eslint-plugin-react";
|
|
7
|
-
// eslint-disable-next-line import-x/max-dependencies
|
|
8
7
|
import reactCompiler from "eslint-plugin-react-compiler";
|
|
8
|
+
// eslint-disable-next-line import-x/max-dependencies
|
|
9
|
+
import { configs as tseslintConfigs } from "typescript-eslint";
|
|
9
10
|
const eslintRules = {
|
|
10
11
|
curly: ["error", "multi-line"],
|
|
11
12
|
"no-magic-numbers": [
|
|
@@ -68,7 +69,9 @@ const jsdocRules = {
|
|
|
68
69
|
}
|
|
69
70
|
]
|
|
70
71
|
};
|
|
71
|
-
const eslintConfigNoJSDoc =
|
|
72
|
+
const eslintConfigNoJSDoc = defineConfig(eslint.configs.all, jsdoc.configs["flat/recommended-typescript-error"], eslintConfigPrettier, ...tseslintConfigs.strictTypeChecked, ...tseslintConfigs.stylisticTypeChecked, ...(Array.isArray(importXFlatConfigs.recommended)
|
|
73
|
+
? importXFlatConfigs.recommended
|
|
74
|
+
: [importXFlatConfigs.recommended]), ...(Array.isArray(importXFlatConfigs.typescript) ? importXFlatConfigs.typescript : [importXFlatConfigs.typescript]), {
|
|
72
75
|
languageOptions: {
|
|
73
76
|
parserOptions: {
|
|
74
77
|
projectService: true
|
|
@@ -92,13 +95,13 @@ const eslintConfigNoJSDoc = config(eslint.configs.all, jsdoc.configs["flat/recom
|
|
|
92
95
|
...importXRules
|
|
93
96
|
}
|
|
94
97
|
});
|
|
95
|
-
const JSDocRule =
|
|
98
|
+
const JSDocRule = defineConfig({
|
|
96
99
|
rules: {
|
|
97
100
|
...jsdocRules
|
|
98
101
|
}
|
|
99
102
|
});
|
|
100
|
-
const eslintConfig =
|
|
101
|
-
const eslintReactConfigBase =
|
|
103
|
+
const eslintConfig = defineConfig(...eslintConfigNoJSDoc, ...JSDocRule);
|
|
104
|
+
const eslintReactConfigBase = defineConfig({
|
|
102
105
|
files: ["**/*.tsx"],
|
|
103
106
|
...react.configs.flat["recommended"],
|
|
104
107
|
plugins: {
|
|
@@ -124,6 +127,6 @@ const eslintReactConfigBase = config({
|
|
|
124
127
|
"react-compiler/react-compiler": "error"
|
|
125
128
|
}
|
|
126
129
|
});
|
|
127
|
-
const eslintReactConfig =
|
|
128
|
-
const eslintReactConfigNoJSDoc =
|
|
130
|
+
const eslintReactConfig = defineConfig(...eslintConfig, ...eslintReactConfigBase);
|
|
131
|
+
const eslintReactConfigNoJSDoc = defineConfig(...eslintConfigNoJSDoc, ...eslintReactConfigBase);
|
|
129
132
|
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,15 +31,12 @@
|
|
|
31
31
|
"provenance": true
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
35
34
|
"@eslint/js": "^9.0.0",
|
|
36
|
-
"@types/eslint-config-prettier": "^6.11.3",
|
|
37
|
-
"@typescript-eslint/parser": "^8.0.1",
|
|
38
35
|
"eslint": "^9.17.0",
|
|
39
36
|
"eslint-config-prettier": "^10.0.0",
|
|
40
37
|
"eslint-import-resolver-typescript": "^4.0.0",
|
|
41
38
|
"eslint-plugin-import-x": "^4.0.0",
|
|
42
|
-
"eslint-plugin-jsdoc": "^
|
|
39
|
+
"eslint-plugin-jsdoc": "^59.0.0",
|
|
43
40
|
"eslint-plugin-react": "^7.37.3",
|
|
44
41
|
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
|
|
45
42
|
"typescript-eslint": "^8.26.0"
|
|
@@ -50,13 +47,6 @@
|
|
|
50
47
|
"@eslint-types/jsdoc": "^48.2.2",
|
|
51
48
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
52
49
|
"@robot-inventor/tsconfig-base": "^6.0.0",
|
|
53
|
-
"@types/eslint": "^9.6.1",
|
|
54
|
-
"@types/eslint__eslintrc": "^2.1.2",
|
|
55
50
|
"typescript": "^5.4.4"
|
|
56
|
-
},
|
|
57
|
-
"overrides": {
|
|
58
|
-
"eslint-import-resolver-typescript": {
|
|
59
|
-
"eslint-plugin-import": "npm:eslint-plugin-import-x@^4.0.0"
|
|
60
|
-
}
|
|
61
51
|
}
|
|
62
52
|
}
|