code-quality-lib 2.0.0 → 2.0.2

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/.eslintrc.js DELETED
@@ -1,121 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- es2022: true,
6
- node: true,
7
- },
8
- extends: [
9
- 'eslint:recommended',
10
- '@typescript-eslint/recommended',
11
- '@typescript-eslint/recommended-requiring-type-checking',
12
- 'plugin:react/recommended',
13
- 'plugin:react-hooks/recommended',
14
- 'plugin:storybook/recommended',
15
- 'prettier',
16
- ],
17
- parser: '@typescript-eslint/parser',
18
- parserOptions: {
19
- ecmaFeatures: {
20
- jsx: true,
21
- },
22
- ecmaVersion: 'latest',
23
- sourceType: 'module',
24
- project: ['./tsconfig.json', './tsconfig.node.json'],
25
- tsconfigRootDir: __dirname,
26
- },
27
- plugins: [
28
- 'react',
29
- 'react-hooks',
30
- 'react-refresh',
31
- '@typescript-eslint',
32
- 'sonarjs',
33
- 'unicorn',
34
- 'import',
35
- 'prettier',
36
- ],
37
- rules: {
38
- // TypeScript
39
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
40
- '@typescript-eslint/no-explicit-any': 'warn',
41
- '@typescript-eslint/prefer-nullish-coalescing': 'error',
42
- '@typescript-eslint/prefer-optional-chain': 'error',
43
- '@typescript-eslint/no-non-null-assertion': 'warn',
44
-
45
- // React
46
- 'react/react-in-jsx-scope': 'off',
47
- 'react/prop-types': 'off',
48
- 'react-hooks/rules-of-hooks': 'error',
49
- 'react-hooks/exhaustive-deps': 'warn',
50
- 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
51
-
52
- // Code Quality
53
- 'sonarjs/cognitive-complexity': ['warn', 15],
54
- 'sonarjs/no-duplicate-string': 'warn',
55
- 'sonarjs/no-identical-functions': 'warn',
56
-
57
- // Best Practices
58
- 'unicorn/no-array-for-each': 'error',
59
- 'unicorn/prefer-array-some': 'error',
60
- 'unicorn/no-new-array': 'error',
61
- 'unicorn/prefer-node-protocol': 'error',
62
-
63
- // Import/Export
64
- 'import/order': [
65
- 'error',
66
- {
67
- groups: [
68
- 'builtin',
69
- 'external',
70
- 'internal',
71
- 'parent',
72
- 'sibling',
73
- 'index',
74
- ],
75
- 'newlines-between': 'always',
76
- alphabetize: {
77
- order: 'asc',
78
- caseInsensitive: true,
79
- },
80
- },
81
- ],
82
-
83
- // Prettier (conflicts handled by eslint-config-prettier)
84
- 'prettier/prettier': 'error',
85
-
86
- // General
87
- 'no-console': ['warn', { allow: ['warn', 'error'] }],
88
- 'no-debugger': 'error',
89
- 'prefer-const': 'error',
90
- 'no-var': 'error',
91
- },
92
- settings: {
93
- react: {
94
- version: 'detect',
95
- },
96
- 'import/resolver': {
97
- typescript: {
98
- alwaysTryTypes: true,
99
- },
100
- },
101
- },
102
- overrides: [
103
- {
104
- files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
105
- env: {
106
- jest: true,
107
- },
108
- rules: {
109
- '@typescript-eslint/no-explicit-any': 'off',
110
- 'sonarjs/no-duplicate-string': 'off',
111
- },
112
- },
113
- {
114
- files: ['**/*.stories.@(js|jsx|ts|tsx|mdx)'],
115
- rules: {
116
- 'import/no-extraneous-dependencies': 'off',
117
- 'react/prop-types': 'off',
118
- },
119
- },
120
- ],
121
- };
package/.prettierrc DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "semi": false,
3
- "trailingComma": "es5",
4
- "singleQuote": true,
5
- "printWidth": 100,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "endOfLine": "lf",
9
- "arrowParens": "always",
10
- "bracketSpacing": true,
11
- "bracketSameLine": false,
12
- "quoteProps": "as-needed",
13
- "jsxSingleQuote": true,
14
- "proseWrap": "preserve",
15
- "htmlWhitespaceSensitivity": "css",
16
- "embeddedLanguageFormatting": "auto"
17
- }
package/knip.json DELETED
@@ -1,76 +0,0 @@
1
- {
2
- "entry": ["index.js", "index.d.ts"],
3
- "project": ["package.json"],
4
- "ignore": [
5
- "node_modules",
6
- "dist",
7
- "build",
8
- "coverage",
9
- "*.config.js",
10
- "*.config.ts",
11
- "test/**",
12
- "**/*.test.*",
13
- "**/*.spec.*",
14
- "examples/**"
15
- ],
16
- "ignoreBinaries": ["code-quality"],
17
- "ignoreDependencies": [
18
- "@types/*",
19
- "eslint",
20
- "prettier",
21
- "typescript",
22
- "vitest",
23
- "storybook"
24
- ],
25
- "rules": {
26
- "dependencies": {
27
- "entries": {
28
- "entryFiles": ["index.js", "index.d.ts"],
29
- "ignore": []
30
- },
31
- "exports": {
32
- "ignore": []
33
- },
34
- "files": {
35
- "ignore": [
36
- "test/**",
37
- "**/*.test.*",
38
- "**/*.spec.*",
39
- "examples/**"
40
- ]
41
- },
42
- "classMembers": {
43
- "ignore": []
44
- },
45
- "enums": {
46
- "ignore": []
47
- },
48
- "enumMembers": {
49
- "ignore": []
50
- },
51
- "types": {
52
- "ignore": []
53
- }
54
- },
55
- "exports": {
56
- "ignore": []
57
- },
58
- "files": {
59
- "ignore": [
60
- "test/**",
61
- "**/*.test.*",
62
- "**/*.spec.*",
63
- "examples/**"
64
- ]
65
- },
66
- "duplicates": {
67
- "ignore": []
68
- },
69
- "unlisted": {
70
- "ignore": []
71
- },
72
- "unresolved": {
73
- "ignore": []
74
- }
75
- }
76
- }
package/tsconfig.json DELETED
@@ -1,41 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": ["ES2022"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "esModuleInterop": true,
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "noFallthroughCasesInSwitch": true,
12
- "module": "ESNext",
13
- "moduleResolution": "bundler",
14
- "resolveJsonModule": true,
15
- "isolatedModules": true,
16
- "noEmit": true,
17
- "declaration": true,
18
- "declarationMap": true,
19
- "outDir": "dist",
20
- "rootDir": ".",
21
- "jsx": "react-jsx",
22
- "incremental": true,
23
- "noUncheckedIndexedAccess": true,
24
- "exactOptionalPropertyTypes": true,
25
- "noImplicitReturns": true,
26
- "noImplicitOverride": true,
27
- "noPropertyAccessFromIndexSignature": false
28
- },
29
- "include": [
30
- "index.js",
31
- "index.d.ts",
32
- "test/**/*"
33
- ],
34
- "exclude": [
35
- "node_modules",
36
- "dist",
37
- "build",
38
- "coverage",
39
- "examples"
40
- ]
41
- }