@dvukovic/style-guide 0.3.99 → 0.3.100

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 CHANGED
@@ -113,9 +113,15 @@ export default customDefineConfig(
113
113
  ## Prettier Configuration
114
114
 
115
115
  ```js
116
- import { prettier } from "@dvukovic/style-guide/prettier"
116
+ import type { Config } from "prettier"
117
117
 
118
- export default prettier
118
+ import core from "@dvukovic/style-guide/src/prettier/configs/core.js"
119
+
120
+ const config: Config = {
121
+ ...core,
122
+ }
123
+
124
+ export default config
119
125
  ```
120
126
 
121
127
  ## Stylelint Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvukovic/style-guide",
3
- "version": "0.3.99",
3
+ "version": "0.3.100",
4
4
  "description": "My own style guide",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,7 +9,20 @@ import { defineConfig, globalIgnores } from "eslint/config"
9
9
  * @returns {Array} ESLint configuration
10
10
  */
11
11
  export function customDefineConfig(ignores, configs = []) {
12
- return defineConfig(globalIgnores(["node_modules", ...ignores]), ...configs)
12
+ return defineConfig(
13
+ globalIgnores([
14
+ "node_modules",
15
+ "./*.js",
16
+ "./*.ts",
17
+ "./*.cjs",
18
+ "./*.mjs",
19
+ "./*.config.js",
20
+ "./*.config.cjs",
21
+ "./*.config.mjs",
22
+ ...ignores,
23
+ ]),
24
+ ...configs,
25
+ )
13
26
  }
14
27
 
15
28
  export * from "./configs/core.js"
@@ -19,7 +32,6 @@ export * from "./configs/next.js"
19
32
  export * from "./configs/node.js"
20
33
  export * from "./configs/playwright.js"
21
34
  export * from "./configs/react.js"
22
- export * from "./configs/storybook.js"
23
35
  export * from "./configs/typescript.js"
24
36
  export * from "./configs/typescript-strict.js"
25
37
  export * from "./configs/vitest.js"
@@ -30,7 +30,6 @@ export const eslint = {
30
30
  "func-names": ["error", "as-needed"],
31
31
  "func-style": ["error", "declaration", { allowArrowFunctions: true }],
32
32
  "id-length": ["error", { exceptions: ["x", "y", "z"], min: 2, properties: "never" }],
33
- "logical-assignment-operators": ["error", "never"],
34
33
  "max-classes-per-file": ["error", 1],
35
34
  "max-depth": ["error", 4],
36
35
  "max-lines": ["error", 1200],
@@ -6,7 +6,6 @@ export const promise = {
6
6
  promise: plugin,
7
7
  },
8
8
  rules: {
9
- "promise/always-return": "error",
10
9
  "promise/catch-or-return": "error",
11
10
  "promise/no-callback-in-promise": "error",
12
11
  "promise/no-multiple-resolved": "error",
@@ -41,7 +41,6 @@ export const sonarjs = {
41
41
  "sonarjs/class-name": "error",
42
42
  "sonarjs/class-prototype": "error",
43
43
  "sonarjs/code-eval": "error",
44
- "sonarjs/cognitive-complexity": "error",
45
44
  "sonarjs/comma-or-logical-or-case": "error",
46
45
  "sonarjs/comment-regex": "error",
47
46
  "sonarjs/concise-regex": "error",
@@ -54,7 +53,6 @@ export const sonarjs = {
54
53
  "sonarjs/cookies": "error",
55
54
  "sonarjs/cors": "error",
56
55
  "sonarjs/csrf": "error",
57
- "sonarjs/cyclomatic-complexity": "error",
58
56
  "sonarjs/deprecation": "error",
59
57
  "sonarjs/destructuring-assignment-syntax": "error",
60
58
  "sonarjs/different-types-comparison": "error",
@@ -63,13 +61,11 @@ export const sonarjs = {
63
61
  "sonarjs/disabled-timeout": "error",
64
62
  "sonarjs/dns-prefetching": "error",
65
63
  "sonarjs/duplicates-in-character-class": "error",
66
- "sonarjs/elseif-without-else": "error",
67
64
  "sonarjs/empty-string-repetition": "error",
68
65
  "sonarjs/encryption": "error",
69
66
  "sonarjs/encryption-secure-mode": "error",
70
67
  "sonarjs/enforce-trailing-comma": "error",
71
68
  "sonarjs/existing-groups": "error",
72
- "sonarjs/expression-complexity": "error",
73
69
  "sonarjs/file-permissions": "error",
74
70
  "sonarjs/file-uploads": "error",
75
71
  "sonarjs/fixme-tag": "error",
@@ -77,7 +73,6 @@ export const sonarjs = {
77
73
  "sonarjs/for-loop-increment-sign": "error",
78
74
  "sonarjs/frame-ancestors": "error",
79
75
  "sonarjs/function-inside-loop": "error",
80
- "sonarjs/function-return-type": "error",
81
76
  "sonarjs/future-reserved-words": "error",
82
77
  "sonarjs/generator-without-yield": "error",
83
78
  "sonarjs/hashing": "error",
@@ -92,7 +87,6 @@ export const sonarjs = {
92
87
  "sonarjs/label-position": "error",
93
88
  "sonarjs/link-with-target-blank": "error",
94
89
  "sonarjs/max-lines": "error",
95
- "sonarjs/max-lines-per-function": "error",
96
90
  "sonarjs/max-switch-cases": "error",
97
91
  "sonarjs/max-union-size": "error",
98
92
  "sonarjs/misplaced-loop-counter": "error",
@@ -144,7 +138,6 @@ export const sonarjs = {
144
138
  "sonarjs/no-implicit-global": "error",
145
139
  "sonarjs/no-in-misuse": "error",
146
140
  "sonarjs/no-incomplete-assertions": "error",
147
- "sonarjs/no-inconsistent-returns": "error",
148
141
  "sonarjs/no-incorrect-string-concat": "error",
149
142
  "sonarjs/no-internal-api-use": "error",
150
143
  "sonarjs/no-intrusive-permissions": "error",
@@ -160,7 +153,6 @@ export const sonarjs = {
160
153
  "sonarjs/no-mixed-content": "error",
161
154
  "sonarjs/no-nested-assignment": "error",
162
155
  "sonarjs/no-nested-conditional": "error",
163
- "sonarjs/no-nested-functions": "error",
164
156
  "sonarjs/no-nested-incdec": "error",
165
157
  "sonarjs/no-nested-switch": "error",
166
158
  "sonarjs/no-nested-template-literals": "error",
@@ -192,7 +184,6 @@ export const sonarjs = {
192
184
  "sonarjs/no-unthrown-error": "error",
193
185
  "sonarjs/no-unused-collection": "error",
194
186
  "sonarjs/no-unused-function-argument": "error",
195
- "sonarjs/no-unused-vars": "error",
196
187
  "sonarjs/no-use-of-empty-return-value": "error",
197
188
  "sonarjs/no-useless-catch": "error",
198
189
  "sonarjs/no-useless-increment": "error",
@@ -227,7 +218,6 @@ export const sonarjs = {
227
218
  "sonarjs/redundant-type-aliases": "error",
228
219
  "sonarjs/regex-complexity": "error",
229
220
  "sonarjs/session-regeneration": "error",
230
- "sonarjs/shorthand-property-grouping": "error",
231
221
  "sonarjs/single-char-in-character-classes": "error",
232
222
  "sonarjs/single-character-alternation": "error",
233
223
  "sonarjs/sockets": "error",
@@ -1,19 +0,0 @@
1
- /**
2
- * @typedef {Object} ConfigOptions
3
- * @property {boolean} [replace=false] - If true, replaces default config entirely with custom
4
- * configs. Default is `false`
5
- * @property {any[]} [configs=[]] - Additional configs to append or use as replacement. Default is
6
- * `[]`
7
- */
8
-
9
- /**
10
- * @typedef {Object} TypeScriptConfigOptions
11
- * @property {boolean} [replace=false] - If true, replaces default config entirely with custom
12
- * configs. Default is `false`
13
- * @property {any[]} [configs=[]] - Additional configs to append or use as replacement. Default is
14
- * `[]`
15
- * @property {string} [tsconfigPath="./tsconfig.json"] - Path to tsconfig.json file. Default is
16
- * `"./tsconfig.json"`
17
- */
18
-
19
- export {}