@korioinc/next-configs 2.0.21 → 2.0.23
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/eslint/library.mjs +3 -2
- package/eslint/next.mjs +4 -3
- package/eslint/react-library.mjs +13 -4
- package/package.json +7 -3
package/eslint/library.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fixupConfigRules } from '@eslint/compat';
|
|
1
2
|
import pluginJs from '@eslint/js';
|
|
2
3
|
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
3
4
|
import typescriptParser from '@typescript-eslint/parser';
|
|
@@ -31,9 +32,9 @@ const config = [
|
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
pluginJs.configs.recommended, // ? https://github.com/eslint/eslint
|
|
34
|
-
importPlugin.flatConfigs.recommended, // ? https://github.com/import-js/eslint-plugin-import
|
|
35
|
+
...fixupConfigRules(importPlugin.flatConfigs.recommended), // ? https://github.com/import-js/eslint-plugin-import
|
|
35
36
|
...tseslint.configs.recommended, // ? https://github.com/typescript-eslint/typescript-eslint
|
|
36
|
-
pluginPromise.configs['flat/recommended'], // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
37
|
+
...fixupConfigRules(pluginPromise.configs['flat/recommended']), // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
37
38
|
eslintConfigPrettier, // ? https://github.com/prettier/eslint-config-prettier
|
|
38
39
|
{
|
|
39
40
|
rules: {
|
package/eslint/next.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fixupConfigRules } from '@eslint/compat';
|
|
1
2
|
import pluginJs from '@eslint/js';
|
|
2
3
|
import typescriptParser from '@typescript-eslint/parser';
|
|
3
4
|
|
|
@@ -15,8 +16,8 @@ import globals from 'globals';
|
|
|
15
16
|
|
|
16
17
|
/** @type {import('eslint').Linter.Config[]} */
|
|
17
18
|
const config = defineConfig([
|
|
18
|
-
...nextVitals,
|
|
19
|
-
...nextTs,
|
|
19
|
+
...fixupConfigRules(nextVitals),
|
|
20
|
+
...fixupConfigRules(nextTs),
|
|
20
21
|
{
|
|
21
22
|
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
|
|
22
23
|
},
|
|
@@ -45,7 +46,7 @@ const config = defineConfig([
|
|
|
45
46
|
...importPlugin.flatConfigs.recommended.rules,
|
|
46
47
|
},
|
|
47
48
|
},
|
|
48
|
-
pluginPromise.configs['flat/recommended'], // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
49
|
+
...fixupConfigRules(pluginPromise.configs['flat/recommended']), // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
49
50
|
eslintConfigPrettier, // ? https://github.com/prettier/eslint-config-prettier
|
|
50
51
|
{
|
|
51
52
|
plugins: {
|
package/eslint/react-library.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
|
|
1
2
|
import pluginJs from '@eslint/js';
|
|
2
3
|
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
3
4
|
import typescriptParser from '@typescript-eslint/parser';
|
|
@@ -8,10 +9,13 @@ import importPlugin from 'eslint-plugin-import';
|
|
|
8
9
|
import prettier from 'eslint-plugin-prettier';
|
|
9
10
|
import pluginPromise from 'eslint-plugin-promise';
|
|
10
11
|
import pluginReact from 'eslint-plugin-react';
|
|
12
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
11
13
|
import valtio from 'eslint-plugin-valtio';
|
|
12
14
|
import globals from 'globals';
|
|
13
15
|
import tseslint from 'typescript-eslint';
|
|
14
16
|
|
|
17
|
+
const reactHooksPlugin = fixupPluginRules(pluginReactHooks);
|
|
18
|
+
|
|
15
19
|
/** @type {import('eslint').Linter.Config[]} */
|
|
16
20
|
const config = [
|
|
17
21
|
// Reuse base rules
|
|
@@ -39,11 +43,16 @@ const config = [
|
|
|
39
43
|
},
|
|
40
44
|
},
|
|
41
45
|
pluginJs.configs.recommended, // ? https://github.com/eslint/eslint
|
|
42
|
-
importPlugin.flatConfigs.recommended, // ? https://github.com/import-js/eslint-plugin-import
|
|
46
|
+
...fixupConfigRules(importPlugin.flatConfigs.recommended), // ? https://github.com/import-js/eslint-plugin-import
|
|
43
47
|
...tseslint.configs.recommended, // ? https://github.com/typescript-eslint/typescript-eslint
|
|
44
|
-
pluginPromise.configs['flat/recommended'], // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
45
|
-
pluginReact.configs.flat.recommended, // ? https://github.com/jsx-eslint/eslint-plugin-react
|
|
46
|
-
pluginReact.configs.flat['jsx-runtime'], // ? https://github.com/jsx-eslint/eslint-plugin-react
|
|
48
|
+
...fixupConfigRules(pluginPromise.configs['flat/recommended']), // ? https://github.com/eslint-community/eslint-plugin-promise
|
|
49
|
+
...fixupConfigRules(pluginReact.configs.flat.recommended), // ? https://github.com/jsx-eslint/eslint-plugin-react
|
|
50
|
+
...fixupConfigRules(pluginReact.configs.flat['jsx-runtime']), // ? https://github.com/jsx-eslint/eslint-plugin-react
|
|
51
|
+
{
|
|
52
|
+
plugins: {
|
|
53
|
+
'react-hooks': reactHooksPlugin,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
47
56
|
eslintConfigPrettier, // ? https://github.com/prettier/eslint-config-prettier
|
|
48
57
|
{
|
|
49
58
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korioinc/next-configs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./eslint": "./eslint/next.mjs",
|
|
@@ -29,11 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"author": "Korio Inc.",
|
|
31
31
|
"license": "MIT",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@eslint/compat": "^2.0.3"
|
|
34
|
+
},
|
|
32
35
|
"peerDependencies": {
|
|
33
36
|
"globals": ">=16.0.0",
|
|
34
|
-
"eslint": ">=
|
|
35
|
-
"@eslint/js": ">=
|
|
37
|
+
"eslint": ">=10.0.0",
|
|
38
|
+
"@eslint/js": ">=10.0.0",
|
|
36
39
|
"@next/eslint-plugin-next": ">=16.1.1",
|
|
40
|
+
"eslint-config-next": ">=16.1.1",
|
|
37
41
|
"@typescript-eslint/eslint-plugin": ">=8.41.0",
|
|
38
42
|
"@typescript-eslint/parser": ">=8.41.0",
|
|
39
43
|
"eslint-config-prettier": ">=10.0.0",
|