@robot-inventor/eslint-config 11.0.1 → 11.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/index.d.ts +8 -5
- package/dist/index.js +19 -2
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
3
|
-
declare const
|
|
4
|
-
declare const
|
|
5
|
-
|
|
1
|
+
import { type Config } from "eslint/config";
|
|
2
|
+
declare const eslintConfigNoJSDoc: Config[];
|
|
3
|
+
declare const eslintConfig: Config[];
|
|
4
|
+
declare const eslintReactConfig: Config[];
|
|
5
|
+
declare const eslintReactConfigNoJSDoc: Config[];
|
|
6
|
+
declare const eslintNextConfig: Config[];
|
|
7
|
+
declare const eslintNextConfigNoJSDoc: Config[];
|
|
8
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc, eslintNextConfig, eslintNextConfigNoJSDoc };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { flatConfigs as importXFlatConfigs } from "eslint-plugin-import-x";
|
|
2
1
|
import { defineConfig } from "eslint/config";
|
|
2
|
+
import { flatConfigs as importXFlatConfigs } from "eslint-plugin-import-x";
|
|
3
|
+
import { configs as nextEslintConfigs, rules as nextEslintRules } from "@next/eslint-plugin-next";
|
|
3
4
|
import eslint from "@eslint/js";
|
|
4
5
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
5
6
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
@@ -130,4 +131,20 @@ const eslintReactConfigBase = defineConfig(reactHooks.configs.flat["recommended-
|
|
|
130
131
|
});
|
|
131
132
|
const eslintReactConfig = defineConfig(...eslintConfig, ...eslintReactConfigBase);
|
|
132
133
|
const eslintReactConfigNoJSDoc = defineConfig(...eslintConfigNoJSDoc, ...eslintReactConfigBase);
|
|
133
|
-
|
|
134
|
+
const nextPlugin = {
|
|
135
|
+
rules: nextEslintRules
|
|
136
|
+
};
|
|
137
|
+
const nextRules = {
|
|
138
|
+
...nextEslintConfigs.recommended.rules,
|
|
139
|
+
...nextEslintConfigs["core-web-vitals"].rules
|
|
140
|
+
};
|
|
141
|
+
const eslintNextConfigBase = defineConfig({
|
|
142
|
+
// Ref: https://github.com/vercel/next.js/discussions/49337#discussioncomment-6009130
|
|
143
|
+
plugins: {
|
|
144
|
+
"@next/next": nextPlugin
|
|
145
|
+
},
|
|
146
|
+
rules: nextRules
|
|
147
|
+
});
|
|
148
|
+
const eslintNextConfig = defineConfig(...eslintReactConfig, ...eslintNextConfigBase);
|
|
149
|
+
const eslintNextConfigNoJSDoc = defineConfig(...eslintReactConfigNoJSDoc, ...eslintNextConfigBase);
|
|
150
|
+
export { eslintConfigNoJSDoc, eslintConfig, eslintReactConfig, eslintReactConfigNoJSDoc, eslintNextConfig, eslintNextConfigNoJSDoc };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robot-inventor/eslint-config",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "My ESLint config preset",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc",
|
|
12
|
-
"lint": "eslint
|
|
12
|
+
"lint": "eslint \"./src/**/*.ts\"",
|
|
13
13
|
"format": "prettier --write ./**/*.ts",
|
|
14
14
|
"format:check": "prettier --check ./**/*.ts",
|
|
15
15
|
"ci:version": "changeset version",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@eslint/js": "^9.0.0",
|
|
37
|
+
"@next/eslint-plugin-next": "^16.1.1",
|
|
37
38
|
"eslint": "^9.17.0",
|
|
38
39
|
"eslint-config-prettier": "^10.0.0",
|
|
39
40
|
"eslint-import-resolver-typescript": "^4.0.0",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"@eslint-types/jsdoc": "^48.2.2",
|
|
51
52
|
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
52
53
|
"@robot-inventor/tsconfig-base": "^6.0.0",
|
|
54
|
+
"jiti": "^2.6.1",
|
|
53
55
|
"prettier": "^3.6.2",
|
|
54
56
|
"typescript": "^5.4.4"
|
|
55
57
|
},
|