@addev-be/framework-utils 0.18.2 → 0.19.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/eslint/node.config.mjs +17 -0
- package/eslint/react.config.mjs +45 -0
- package/node/index.mjs +5 -5
- package/package.json +11 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineConfig } from 'eslint/config';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import js from '@eslint/js';
|
|
4
|
+
import tseslint from 'typescript-eslint';
|
|
5
|
+
|
|
6
|
+
export const eslintNodeConfig = defineConfig([
|
|
7
|
+
{
|
|
8
|
+
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
|
|
9
|
+
plugins: { js },
|
|
10
|
+
extends: ['js/recommended'],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
|
|
14
|
+
languageOptions: { globals: globals.browser },
|
|
15
|
+
},
|
|
16
|
+
tseslint.configs.recommended,
|
|
17
|
+
]);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as reactHooks from 'eslint-plugin-react-hooks';
|
|
2
|
+
import * as reactRefresh from 'eslint-plugin-react-refresh';
|
|
3
|
+
|
|
4
|
+
import { defineConfig } from 'eslint/config';
|
|
5
|
+
import globals from 'globals';
|
|
6
|
+
import js from '@eslint/js';
|
|
7
|
+
import pluginReact from 'eslint-plugin-react';
|
|
8
|
+
import tseslint from 'typescript-eslint';
|
|
9
|
+
|
|
10
|
+
/** @typedef {{ exhaustiveDepsAdditionalHooks?: string; }} ReactConfigOptions*/
|
|
11
|
+
|
|
12
|
+
/** @type {ReactConfigOptions} */
|
|
13
|
+
const defaultOptions = {};
|
|
14
|
+
|
|
15
|
+
export const createEslintReactConfig = (options = defaultOptions) =>
|
|
16
|
+
defineConfig([
|
|
17
|
+
{
|
|
18
|
+
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
19
|
+
plugins: { js },
|
|
20
|
+
extends: ['js/recommended'],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
24
|
+
languageOptions: { globals: globals.browser },
|
|
25
|
+
},
|
|
26
|
+
tseslint.configs.recommended,
|
|
27
|
+
pluginReact.configs.flat.recommended,
|
|
28
|
+
reactHooks.configs['recommended-latest'],
|
|
29
|
+
reactRefresh.configs.vite,
|
|
30
|
+
{
|
|
31
|
+
rules: {
|
|
32
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
33
|
+
'react/no-unescaped-entities': 'off',
|
|
34
|
+
'react-hooks/exhaustive-deps': [
|
|
35
|
+
'error',
|
|
36
|
+
{
|
|
37
|
+
additionalHooks: options.exhaustiveDepsAdditionalHooks,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'react/react-in-jsx-scope': 'off',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
export const eslintReactConfig = createEslintReactConfig();
|
package/node/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './helpers/versions.mjs';
|
|
2
|
-
|
|
3
|
-
export * from './commit-release.mjs';
|
|
4
|
-
export * from './nuget-publish.mjs';
|
|
5
|
-
export * from './update-version.mjs';
|
|
1
|
+
export * from './helpers/versions.mjs';
|
|
2
|
+
|
|
3
|
+
export * from './commit-release.mjs';
|
|
4
|
+
export * from './nuget-publish.mjs';
|
|
5
|
+
export * from './update-version.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addev-be/framework-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"export": {
|
|
6
6
|
"node": {
|
|
@@ -17,7 +17,16 @@
|
|
|
17
17
|
"publish": "yarn npm publish"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@eslint/js": "^9.31.0",
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
|
22
|
+
"@typescript-eslint/parser": "^8.36.0",
|
|
23
|
+
"eslint": "^9.31.0",
|
|
24
|
+
"eslint-plugin-react": "^7.37.5",
|
|
25
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
26
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
20
27
|
"glob": "^11.0.0",
|
|
21
|
-
"
|
|
28
|
+
"globals": "^16.3.0",
|
|
29
|
+
"semver": "^7.6.3",
|
|
30
|
+
"typescript-eslint": "^8.36.0"
|
|
22
31
|
}
|
|
23
32
|
}
|