@hitachivantara/uikit-config 0.4.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/README.md +41 -0
- package/licenses/index.js +47 -0
- package/oxlint/base.json +45 -0
- package/oxlint/default.json +41 -0
- package/oxlint/strict.json +41 -0
- package/package.json +40 -0
- package/tsconfig.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @hitachivantara/uikit-config
|
|
2
|
+
|
|
3
|
+
UI Kit Sharable projects configurations
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package in your project, and any peer-dependencies you need
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm i -D prettier@3 @hitachivantara/uikit-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Extend the configurations in `package.json` or the corresponding config file.
|
|
16
|
+
|
|
17
|
+
### Prettier
|
|
18
|
+
|
|
19
|
+
Example [Prettier configuration](https://prettier.io/docs/en/configuration.html#sharing-configurations) in `package.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"prettier": "@hitachivantara/uikit-config/prettier"
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### TSConfig
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"extends": "@hitachivantara/uikit-config/tsconfig"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### oxlint
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"extends": ["./node_modules/@hitachivantara/uikit-config/oxlint/strict.json"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shareable configuration of permissive or internal licenses
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/tmorell/license-compliance/
|
|
5
|
+
* @type {import("license-compliance/lib/interfaces").ExtendableConfiguration}
|
|
6
|
+
* */
|
|
7
|
+
export default {
|
|
8
|
+
format: "text",
|
|
9
|
+
report: "detailed",
|
|
10
|
+
allow: [
|
|
11
|
+
// Public Domain Licenses
|
|
12
|
+
"0BSD",
|
|
13
|
+
"CC0-1.0",
|
|
14
|
+
"Unlicense",
|
|
15
|
+
"WTFPL",
|
|
16
|
+
|
|
17
|
+
// Permissive Licenses (listed)
|
|
18
|
+
"Apache-2.0",
|
|
19
|
+
"Artistic-2.0",
|
|
20
|
+
"BSD-1-Clause",
|
|
21
|
+
"BSD-2-Clause",
|
|
22
|
+
"BSD-3-Clause",
|
|
23
|
+
"CC-BY-3.0",
|
|
24
|
+
"CC-BY-4.0",
|
|
25
|
+
"CPL-1.0",
|
|
26
|
+
"EPL-2.0",
|
|
27
|
+
"ISC",
|
|
28
|
+
"MIT",
|
|
29
|
+
"MIT-0",
|
|
30
|
+
"MPL-2.0",
|
|
31
|
+
"MS-PL",
|
|
32
|
+
"Python-2.0",
|
|
33
|
+
"W3C",
|
|
34
|
+
"Zlib",
|
|
35
|
+
|
|
36
|
+
// Permissive Licenses (other)
|
|
37
|
+
"BlueOak-1.0.0",
|
|
38
|
+
"Hippocratic-2.1",
|
|
39
|
+
],
|
|
40
|
+
exclude: [
|
|
41
|
+
/^@hitachivantara/, // any HV packages
|
|
42
|
+
|
|
43
|
+
"browser-assert", // MIT: https://github.com/socialally/browser-assert/pull/1
|
|
44
|
+
"flatbuffers", // Apache-2.0: https://github.com/google/flatbuffers
|
|
45
|
+
"gitconfiglocal", // BSD-3: https://github.com/soldair/node-gitconfiglocal/pull/13
|
|
46
|
+
],
|
|
47
|
+
};
|
package/oxlint/base.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/tags/oxlint_v1.1.0/npm/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript", "unicorn", "react", "oxc", "import", "jsx-a11y"],
|
|
4
|
+
"categories": {
|
|
5
|
+
"correctness": "error"
|
|
6
|
+
},
|
|
7
|
+
"env": {
|
|
8
|
+
"builtin": true,
|
|
9
|
+
"es2022": true,
|
|
10
|
+
"browser": true,
|
|
11
|
+
"node": true
|
|
12
|
+
},
|
|
13
|
+
"ignorePatterns": ["*.d.ts", "dist", "node_modules"],
|
|
14
|
+
"rules": {
|
|
15
|
+
"react/jsx-key": "off",
|
|
16
|
+
"react/exhaustive-deps": "error",
|
|
17
|
+
"react/rules-of-hooks": "error",
|
|
18
|
+
|
|
19
|
+
"eslint/no-unused-vars": [
|
|
20
|
+
"warn",
|
|
21
|
+
{ "ignoreRestSiblings": true, "argsIgnorePattern": "^_" }
|
|
22
|
+
],
|
|
23
|
+
"jsx_a11y/no-autofocus": "off",
|
|
24
|
+
"jsx_a11y/role-supports-aria-props": "off",
|
|
25
|
+
"jsx_a11y/role-has-required-aria-props": "off"
|
|
26
|
+
},
|
|
27
|
+
"settings": {
|
|
28
|
+
"react": {
|
|
29
|
+
"formComponents": [],
|
|
30
|
+
"linkComponents": ["HvLink"]
|
|
31
|
+
},
|
|
32
|
+
"jsx-a11y": {
|
|
33
|
+
"polymorphicPropName": "component",
|
|
34
|
+
"components": {
|
|
35
|
+
"HvButton": "button",
|
|
36
|
+
"HvButtonBase": "button"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"jsdoc": {
|
|
40
|
+
"tagNamePreference": {
|
|
41
|
+
"augments": "extends"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/tags/oxlint_v1.1.0/npm/oxlint/configuration_schema.json",
|
|
3
|
+
"extends": ["./base.json"],
|
|
4
|
+
"categories": {
|
|
5
|
+
"perf": "warn",
|
|
6
|
+
"suspicious": "error",
|
|
7
|
+
"restriction": "error"
|
|
8
|
+
},
|
|
9
|
+
"rules": {
|
|
10
|
+
"unicorn/prefer-set-has": "off",
|
|
11
|
+
|
|
12
|
+
"import/no-duplicates": "off",
|
|
13
|
+
"import/no-named-as-default-member": "off",
|
|
14
|
+
"import/no-named-as-default": "off",
|
|
15
|
+
"import/no-unassigned-import": "off",
|
|
16
|
+
"react/react-in-jsx-scope": "off",
|
|
17
|
+
|
|
18
|
+
"eslint/default-case": "off",
|
|
19
|
+
"eslint/no-console": ["error", { "allow": ["warn", "error", "info"] }],
|
|
20
|
+
"eslint/no-empty-function": "off",
|
|
21
|
+
"eslint/no-eq-null": "off",
|
|
22
|
+
"eslint/no-plusplus": "off",
|
|
23
|
+
"eslint/no-undefined": "off",
|
|
24
|
+
"import/no-default-export": "off",
|
|
25
|
+
"import/unambiguous": "off",
|
|
26
|
+
"oxc/no-async-await": "off",
|
|
27
|
+
"oxc/no-barrel-file": "off",
|
|
28
|
+
"oxc/no-optional-chaining": "off",
|
|
29
|
+
"oxc/no-rest-spread-properties": "off",
|
|
30
|
+
"react/jsx-filename-extension": "off",
|
|
31
|
+
"typescript/explicit-function-return-type": "off",
|
|
32
|
+
"typescript/no-dynamic-delete": "off",
|
|
33
|
+
"typescript/no-empty-object-type": "off",
|
|
34
|
+
"typescript/no-explicit-any": "off",
|
|
35
|
+
"typescript/no-non-null-assertion": "off",
|
|
36
|
+
"unicorn/no-anonymous-default-export": "off",
|
|
37
|
+
"unicorn/no-array-for-each": "off",
|
|
38
|
+
"unicorn/no-array-reduce": "off",
|
|
39
|
+
"unicorn/no-nested-ternary": "off"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/tags/oxlint_v1.1.0/npm/oxlint/configuration_schema.json",
|
|
3
|
+
"extends": ["./base.json", "./default.json"],
|
|
4
|
+
"rules": {
|
|
5
|
+
// #region Pedantic
|
|
6
|
+
"eslint/eqeqeq": ["error", "always", { "null": "ignore" }],
|
|
7
|
+
"eslint/max-depth": ["error", { "max": 4 }],
|
|
8
|
+
"eslint/no-array-constructor": "error",
|
|
9
|
+
"eslint/no-else-return": "error",
|
|
10
|
+
"eslint/no-fallthrough": "error",
|
|
11
|
+
"eslint/no-inner-declarations": "error",
|
|
12
|
+
"eslint/no-lonely-if": "error",
|
|
13
|
+
"eslint/no-new-wrappers": "error",
|
|
14
|
+
"eslint/no-object-constructor": "error",
|
|
15
|
+
"eslint/no-redeclare": "error",
|
|
16
|
+
"eslint/no-self-compare": "error",
|
|
17
|
+
"react/rules-of-hooks": "error",
|
|
18
|
+
"unicorn/no-instanceof-array": "error",
|
|
19
|
+
"unicorn/no-static-only-class": "error",
|
|
20
|
+
"unicorn/no-typeof-undefined": "error",
|
|
21
|
+
"unicorn/no-unnecessary-slice-end": "error",
|
|
22
|
+
"unicorn/prefer-array-some": "warn",
|
|
23
|
+
"unicorn/prefer-date-now": "error",
|
|
24
|
+
"unicorn/prefer-event-target": "error",
|
|
25
|
+
"unicorn/prefer-math-min-max": "error",
|
|
26
|
+
"unicorn/prefer-native-coercion-functions": "error",
|
|
27
|
+
"unicorn/prefer-string-slice": "warn",
|
|
28
|
+
// #endregion
|
|
29
|
+
|
|
30
|
+
// #region Style
|
|
31
|
+
"react/jsx-boolean-value": "error",
|
|
32
|
+
"react/jsx-curly-brace-presence": [
|
|
33
|
+
"error",
|
|
34
|
+
{ "props": "never", "children": "never" }
|
|
35
|
+
],
|
|
36
|
+
"react/self-closing-comp": "error",
|
|
37
|
+
"typescript/consistent-indexed-object-style": "error",
|
|
38
|
+
"typescript/no-inferrable-types": "error"
|
|
39
|
+
// #endregion
|
|
40
|
+
}
|
|
41
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hitachivantara/uikit-config",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"author": "Hitachi Vantara UI Kit Team",
|
|
7
|
+
"description": "UI Kit Sharable projects configurations",
|
|
8
|
+
"homepage": "https://github.com/lumada-design/hv-uikit-react",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"keywords": [
|
|
11
|
+
"hitachi-vantara",
|
|
12
|
+
"config",
|
|
13
|
+
"ui-kit"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/lumada-design/hv-uikit-react.git",
|
|
18
|
+
"directory": "packages/config"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/lumada-design/hv-uikit-react/issues"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
"./prettier": "./.prettierrc.json",
|
|
27
|
+
"./licenses": "./licenses/index.js",
|
|
28
|
+
"./oxlint/*.json": "./oxlint/*.json",
|
|
29
|
+
"./tsconfig": "./tsconfig.json"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
|
|
33
|
+
"prettier": "^3.0.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"directory": "package"
|
|
38
|
+
},
|
|
39
|
+
"gitHead": "3b3c13424f41d3ab57653e51d7b0108193eff962"
|
|
40
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Base Options */
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"resolveJsonModule": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"moduleDetection": "force",
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"erasableSyntaxOnly": true,
|
|
12
|
+
// "verbatimModuleSyntax": true,
|
|
13
|
+
|
|
14
|
+
/* Strictness */
|
|
15
|
+
"strict": true,
|
|
16
|
+
"noImplicitReturns": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
// "noUncheckedIndexedAccess": true,
|
|
19
|
+
|
|
20
|
+
/* Bundling options (vite) */
|
|
21
|
+
"module": "preserve",
|
|
22
|
+
"noEmit": true,
|
|
23
|
+
|
|
24
|
+
/* Others */
|
|
25
|
+
"lib": ["es2022", "dom", "dom.iterable"]
|
|
26
|
+
}
|
|
27
|
+
}
|