@naturalcycles/dev-lib 15.8.2 → 15.10.0
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/cfg/biome.jsonc +0 -1
- package/cfg/eslint-biome-rules.js +171 -0
- package/cfg/eslint-prettier-rules.js +110 -0
- package/cfg/eslint-rules.js +1 -3
- package/cfg/eslint.config.js +2 -3
- package/cfg/lint-staged.config.js +2 -2
- package/dist/bin/dev-lib.js +2 -2
- package/dist/lint.util.d.ts +1 -1
- package/dist/lint.util.js +8 -10
- package/package.json +2 -3
package/cfg/biome.jsonc
CHANGED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// Copy-pasted from https://github.com/SrBrahma/eslint-config-biome/blob/main/index.js
|
|
2
|
+
module.exports = {
|
|
3
|
+
rules: {
|
|
4
|
+
'constructor-super': 0,
|
|
5
|
+
'default-case-last': 0,
|
|
6
|
+
'default-param-last': 0,
|
|
7
|
+
'dot-notation': 0,
|
|
8
|
+
eqeqeq: 0,
|
|
9
|
+
'for-direction': 0,
|
|
10
|
+
'getter-return': 0,
|
|
11
|
+
'no-async-promise-executor': 0,
|
|
12
|
+
'no-case-declarations': 0,
|
|
13
|
+
'no-class-assign': 0,
|
|
14
|
+
'no-compare-neg-zero': 0,
|
|
15
|
+
'no-cond-assign': 0,
|
|
16
|
+
'no-const-assign': 0,
|
|
17
|
+
'no-constant-condition': 0,
|
|
18
|
+
'no-constructor-return': 0,
|
|
19
|
+
'no-control-regex': 0,
|
|
20
|
+
'no-debugger': 0,
|
|
21
|
+
'no-delete-var': 0,
|
|
22
|
+
'no-dupe-args': 0,
|
|
23
|
+
'no-dupe-class-members': 0,
|
|
24
|
+
'no-dupe-keys': 0,
|
|
25
|
+
'no-duplicate-case': 0,
|
|
26
|
+
'no-else-return': 0,
|
|
27
|
+
'no-empty': 0,
|
|
28
|
+
'no-empty-character-class': 0,
|
|
29
|
+
'no-empty-pattern': 0,
|
|
30
|
+
'no-eval': 0,
|
|
31
|
+
'no-ex-assign': 0,
|
|
32
|
+
'no-extra-boolean-cast': 0,
|
|
33
|
+
'no-extra-label': 0,
|
|
34
|
+
'no-fallthrough': 0,
|
|
35
|
+
'no-func-assign': 0,
|
|
36
|
+
'no-global-assign': 0,
|
|
37
|
+
'no-import-assign': 0,
|
|
38
|
+
'no-inner-declarations': 0,
|
|
39
|
+
'no-label-var': 0,
|
|
40
|
+
'no-labels': 0,
|
|
41
|
+
'no-lone-blocks': 0,
|
|
42
|
+
'no-loss-of-precision': 0,
|
|
43
|
+
'no-misleading-character-class': 0,
|
|
44
|
+
'no-new-native-nonconstructor': 0,
|
|
45
|
+
'no-new-symbol': 0,
|
|
46
|
+
'no-nonoctal-decimal-escape': 0,
|
|
47
|
+
'no-obj-calls': 0,
|
|
48
|
+
'no-param-reassign': 0,
|
|
49
|
+
'no-prototype-builtins': 0,
|
|
50
|
+
'no-redeclare': 0,
|
|
51
|
+
'no-regex-spaces': 0,
|
|
52
|
+
'no-return-assign': 0,
|
|
53
|
+
'no-self-assign': 0,
|
|
54
|
+
'no-self-compare': 0,
|
|
55
|
+
'no-sequences': 0,
|
|
56
|
+
'no-setter-return': 0,
|
|
57
|
+
'no-shadow-restricted-names': 0,
|
|
58
|
+
'no-sparse-array': 0,
|
|
59
|
+
'no-this-before-super': 0,
|
|
60
|
+
'no-unneeded-ternary': 0,
|
|
61
|
+
'no-unreachable': 0,
|
|
62
|
+
'no-unsafe-finally': 0,
|
|
63
|
+
'no-unsafe-negation': 0,
|
|
64
|
+
'no-unsafe-optional-chaining': 0,
|
|
65
|
+
'no-unused-labels': 0,
|
|
66
|
+
'no-use-before-define': 0,
|
|
67
|
+
'no-useless-catch': 0,
|
|
68
|
+
'no-useless-computed-key': 0,
|
|
69
|
+
'no-useless-constructor': 0,
|
|
70
|
+
'no-useless-rename': 0,
|
|
71
|
+
'no-var': 0,
|
|
72
|
+
'no-with': 0,
|
|
73
|
+
'one-var': 0,
|
|
74
|
+
'prefer-arrow-callback': 0,
|
|
75
|
+
'prefer-const': 0,
|
|
76
|
+
'prefer-exponentiation-operator': 0,
|
|
77
|
+
'prefer-numeric-literals': 0,
|
|
78
|
+
'prefer-regex-literals': 0,
|
|
79
|
+
'prefer-rest-params': 0,
|
|
80
|
+
'prefer-template': 0,
|
|
81
|
+
'require-yield': 0,
|
|
82
|
+
'use-isnan': 0,
|
|
83
|
+
'valid-typeof': 0,
|
|
84
|
+
// "@mysticatea/eslint-plugin/no-this-in-static": 0,
|
|
85
|
+
'@typescript-eslint/ban-types': 0,
|
|
86
|
+
'@typescript-eslint/consistent-type-exports': 0,
|
|
87
|
+
'@typescript-eslint/consistent-type-imports': 0,
|
|
88
|
+
'@typescript-eslint/default-param-last': 0,
|
|
89
|
+
'@typescript-eslint/dot-notation': 0,
|
|
90
|
+
'@typescript-eslint/no-dupe-class-members': 0,
|
|
91
|
+
'@typescript-eslint/no-empty-interface': 0,
|
|
92
|
+
'@typescript-eslint/no-explicit-any': 0,
|
|
93
|
+
'@typescript-eslint/no-extra-non-null-assertion': 0,
|
|
94
|
+
'@typescript-eslint/no-extraneous-class': 0,
|
|
95
|
+
'@typescript-eslint/no-import-type-side-effects': 0,
|
|
96
|
+
'@typescript-eslint/no-inferrable-types': 0,
|
|
97
|
+
'@typescript-eslint/no-invalid-void-type': 0,
|
|
98
|
+
'@typescript-eslint/no-loss-of-precision': 0,
|
|
99
|
+
'@typescript-eslint/no-misused-new': 0,
|
|
100
|
+
'@typescript-eslint/no-non-null-assertion': 0,
|
|
101
|
+
'@typescript-eslint/no-redeclare': 0,
|
|
102
|
+
'@typescript-eslint/no-this-alias': 0,
|
|
103
|
+
'@typescript-eslint/no-unnecessary-type-arguments': 0,
|
|
104
|
+
'@typescript-eslint/no-unnecessary-type-constraint': 0,
|
|
105
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 0,
|
|
106
|
+
'@typescript-eslint/no-use-before-define': 0,
|
|
107
|
+
'@typescript-eslint/no-useless-constructor': 0,
|
|
108
|
+
'@typescript-eslint/no-useless-empty-export': 0,
|
|
109
|
+
'@typescript-eslint/no-useless-template-literals': 0,
|
|
110
|
+
'@typescript-eslint/prefer-as-const': 0,
|
|
111
|
+
'@typescript-eslint/prefer-enum-initializers': 0,
|
|
112
|
+
'@typescript-eslint/prefer-function-type': 0,
|
|
113
|
+
'@typescript-eslint/prefer-literal-enum-member': 0,
|
|
114
|
+
'@typescript-eslint/prefer-namespace-keyword': 0,
|
|
115
|
+
'@typescript-eslint/prefer-optional-chain': 0,
|
|
116
|
+
'jest/max-nested-describe': 0,
|
|
117
|
+
'jest/no-duplicate-hooks': 0,
|
|
118
|
+
'jest/no-export': 0,
|
|
119
|
+
'jest/no-focused-tests': 0,
|
|
120
|
+
'jsx-a11y/alt-text': 0,
|
|
121
|
+
'jsx-a11y/anchor-has-content': 0,
|
|
122
|
+
'jsx-a11y/anchor-is-valid': 0,
|
|
123
|
+
'jsx-a11y/aria-activedescendant-has-tabindex': 0,
|
|
124
|
+
'jsx-a11y/aria-props': 0,
|
|
125
|
+
'jsx-a11y/aria-proptypes': 0,
|
|
126
|
+
'jsx-a11y/aria-role': 0,
|
|
127
|
+
'jsx-a11y/aria-unsupported-elements': 0,
|
|
128
|
+
'jsx-a11y/click-events-have-key-events': 0,
|
|
129
|
+
'jsx-a11y/heading-has-content': 0,
|
|
130
|
+
'jsx-a11y/html-has-lang': 0,
|
|
131
|
+
'jsx-a11y/iframe-has-title': 0,
|
|
132
|
+
'jsx-a11y/img-redundant-alt': 0,
|
|
133
|
+
'jsx-a11y/lang': 0,
|
|
134
|
+
'jsx-a11y/media-has-caption': 0,
|
|
135
|
+
'jsx-a11y/mouse-events-have-key-events': 0,
|
|
136
|
+
'jsx-a11y/no-access-key': 0,
|
|
137
|
+
'jsx-a11y/no-aria-hidden-on-focusable': 0,
|
|
138
|
+
'jsx-a11y/no-autofocus': 0,
|
|
139
|
+
'jsx-a11y/no-distracting-elements': 0,
|
|
140
|
+
'jsx-a11y/no-interactive-element-to-noninteractive-role': 0,
|
|
141
|
+
'jsx-a11y/no-noninteractive-element-to-interactive-role': 0,
|
|
142
|
+
'jsx-a11y/no-noninteractive-tabindex': 0,
|
|
143
|
+
'jsx-a11y/no-redundant-roles': 0,
|
|
144
|
+
'jsx-a11y/role-has-required-aria-props': 0,
|
|
145
|
+
'jsx-a11y/scope': 0,
|
|
146
|
+
'jsx-a11y/tabindex-no-positive': 0,
|
|
147
|
+
'react/button-has-type': 0,
|
|
148
|
+
'react/jsx-key': 0,
|
|
149
|
+
'react/jsx-no-comment-textnodes': 0,
|
|
150
|
+
'react/jsx-no-duplicate-props': 0,
|
|
151
|
+
'react/jsx-no-target-blank': 0,
|
|
152
|
+
'react/jsx-no-useless-fragment': 0,
|
|
153
|
+
'react/no-array-index-key': 0,
|
|
154
|
+
'react/no-children-prop': 0,
|
|
155
|
+
'react/no-danger': 0,
|
|
156
|
+
'react/no-danger-with-children': 0,
|
|
157
|
+
'react/void-dom-elements-no-children': 0,
|
|
158
|
+
'react-hooks/exhaustive-deps': 0,
|
|
159
|
+
// "simple-import-sort/imports": 0, // we need it
|
|
160
|
+
'stylistic/jsx-self-closing-comp': 0,
|
|
161
|
+
'unicorn/no-array-for-each': 0,
|
|
162
|
+
'unicorn/no-instanceof-array': 0,
|
|
163
|
+
'unicorn/no-static-only-class': 0,
|
|
164
|
+
'unicorn/no-thenable': 0,
|
|
165
|
+
'unicorn/no-typeof-undefined': 0,
|
|
166
|
+
'unicorn/no-useless-switch-case': 0,
|
|
167
|
+
'unicorn/prefer-array-flat-map': 0,
|
|
168
|
+
'unicorn/prefer-node-protocol': 0,
|
|
169
|
+
'unicorn/prefer-number-properties': 0,
|
|
170
|
+
},
|
|
171
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// These rules are disabled, because prettier handles it
|
|
2
|
+
// Copy-pasted from https://github.com/prettier/eslint-config-prettier
|
|
3
|
+
module.exports = {
|
|
4
|
+
rules: {
|
|
5
|
+
// The following rules can be used in some cases. See the README for more
|
|
6
|
+
// information. These are marked with `0` instead of `0` so that a
|
|
7
|
+
// script can distinguish them. Note that there are a few more of these
|
|
8
|
+
// in the deprecated section below.
|
|
9
|
+
// "curly": 0,
|
|
10
|
+
'no-unexpected-multiline': 0,
|
|
11
|
+
'@typescript-eslint/lines-around-comment': 0,
|
|
12
|
+
'@typescript-eslint/quotes': 0,
|
|
13
|
+
'babel/quotes': 0,
|
|
14
|
+
'unicorn/template-indent': 0,
|
|
15
|
+
'vue/html-self-closing': 0,
|
|
16
|
+
'vue/max-len': 0,
|
|
17
|
+
|
|
18
|
+
// The rest are rules that you never need to enable when using Prettier.
|
|
19
|
+
'@babel/object-curly-spacing': 0,
|
|
20
|
+
'@babel/semi': 0,
|
|
21
|
+
'@typescript-eslint/block-spacing': 0,
|
|
22
|
+
'@typescript-eslint/brace-style': 0,
|
|
23
|
+
'@typescript-eslint/comma-dangle': 0,
|
|
24
|
+
'@typescript-eslint/comma-spacing': 0,
|
|
25
|
+
'@typescript-eslint/func-call-spacing': 0,
|
|
26
|
+
'@typescript-eslint/indent': 0,
|
|
27
|
+
'@typescript-eslint/key-spacing': 0,
|
|
28
|
+
'@typescript-eslint/keyword-spacing': 0,
|
|
29
|
+
'@typescript-eslint/member-delimiter-style': 0,
|
|
30
|
+
'@typescript-eslint/no-extra-parens': 0,
|
|
31
|
+
'@typescript-eslint/no-extra-semi': 0,
|
|
32
|
+
'@typescript-eslint/object-curly-spacing': 0,
|
|
33
|
+
'@typescript-eslint/semi': 0,
|
|
34
|
+
'@typescript-eslint/space-before-blocks': 0,
|
|
35
|
+
'@typescript-eslint/space-before-function-paren': 0,
|
|
36
|
+
'@typescript-eslint/space-infix-ops': 0,
|
|
37
|
+
'@typescript-eslint/type-annotation-spacing': 0,
|
|
38
|
+
'babel/object-curly-spacing': 0,
|
|
39
|
+
'babel/semi': 0,
|
|
40
|
+
'flowtype/boolean-style': 0,
|
|
41
|
+
'flowtype/delimiter-dangle': 0,
|
|
42
|
+
'flowtype/generic-spacing': 0,
|
|
43
|
+
'flowtype/object-type-curly-spacing': 0,
|
|
44
|
+
'flowtype/object-type-delimiter': 0,
|
|
45
|
+
'flowtype/quotes': 0,
|
|
46
|
+
'flowtype/semi': 0,
|
|
47
|
+
'flowtype/space-after-type-colon': 0,
|
|
48
|
+
'flowtype/space-before-generic-bracket': 0,
|
|
49
|
+
'flowtype/space-before-type-colon': 0,
|
|
50
|
+
'flowtype/union-intersection-spacing': 0,
|
|
51
|
+
'react/jsx-child-element-spacing': 0,
|
|
52
|
+
'react/jsx-closing-bracket-location': 0,
|
|
53
|
+
'react/jsx-closing-tag-location': 0,
|
|
54
|
+
'react/jsx-curly-newline': 0,
|
|
55
|
+
'react/jsx-curly-spacing': 0,
|
|
56
|
+
'react/jsx-equals-spacing': 0,
|
|
57
|
+
'react/jsx-first-prop-new-line': 0,
|
|
58
|
+
'react/jsx-indent': 0,
|
|
59
|
+
'react/jsx-indent-props': 0,
|
|
60
|
+
'react/jsx-max-props-per-line': 0,
|
|
61
|
+
'react/jsx-newline': 0,
|
|
62
|
+
'react/jsx-one-expression-per-line': 0,
|
|
63
|
+
'react/jsx-props-no-multi-spaces': 0,
|
|
64
|
+
'react/jsx-tag-spacing': 0,
|
|
65
|
+
'react/jsx-wrap-multilines': 0,
|
|
66
|
+
'standard/array-bracket-even-spacing': 0,
|
|
67
|
+
'standard/computed-property-even-spacing': 0,
|
|
68
|
+
'standard/object-curly-even-spacing': 0,
|
|
69
|
+
'unicorn/empty-brace-spaces': 0,
|
|
70
|
+
'unicorn/no-nested-ternary': 0,
|
|
71
|
+
'unicorn/number-literal-case': 0,
|
|
72
|
+
'vue/array-bracket-newline': 0,
|
|
73
|
+
'vue/array-bracket-spacing': 0,
|
|
74
|
+
'vue/array-element-newline': 0,
|
|
75
|
+
'vue/arrow-spacing': 0,
|
|
76
|
+
'vue/block-spacing': 0,
|
|
77
|
+
'vue/block-tag-newline': 0,
|
|
78
|
+
'vue/brace-style': 0,
|
|
79
|
+
'vue/comma-dangle': 0,
|
|
80
|
+
'vue/comma-spacing': 0,
|
|
81
|
+
'vue/comma-style': 0,
|
|
82
|
+
'vue/dot-location': 0,
|
|
83
|
+
'vue/func-call-spacing': 0,
|
|
84
|
+
'vue/html-closing-bracket-newline': 0,
|
|
85
|
+
'vue/html-closing-bracket-spacing': 0,
|
|
86
|
+
'vue/html-end-tags': 0,
|
|
87
|
+
'vue/html-indent': 0,
|
|
88
|
+
'vue/html-quotes': 0,
|
|
89
|
+
'vue/key-spacing': 0,
|
|
90
|
+
'vue/keyword-spacing': 0,
|
|
91
|
+
'vue/max-attributes-per-line': 0,
|
|
92
|
+
'vue/multiline-html-element-content-newline': 0,
|
|
93
|
+
'vue/multiline-ternary': 0,
|
|
94
|
+
'vue/mustache-interpolation-spacing': 0,
|
|
95
|
+
'vue/no-extra-parens': 0,
|
|
96
|
+
'vue/no-multi-spaces': 0,
|
|
97
|
+
'vue/no-spaces-around-equal-signs-in-attribute': 0,
|
|
98
|
+
'vue/object-curly-newline': 0,
|
|
99
|
+
'vue/object-curly-spacing': 0,
|
|
100
|
+
'vue/object-property-newline': 0,
|
|
101
|
+
'vue/operator-linebreak': 0,
|
|
102
|
+
'vue/quote-props': 0,
|
|
103
|
+
'vue/script-indent': 0,
|
|
104
|
+
'vue/singleline-html-element-content-newline': 0,
|
|
105
|
+
'vue/space-in-parens': 0,
|
|
106
|
+
'vue/space-infix-ops': 0,
|
|
107
|
+
'vue/space-unary-ops': 0,
|
|
108
|
+
'vue/template-curly-spacing': 0,
|
|
109
|
+
},
|
|
110
|
+
}
|
package/cfg/eslint-rules.js
CHANGED
|
@@ -153,7 +153,6 @@ module.exports = {
|
|
|
153
153
|
},
|
|
154
154
|
],
|
|
155
155
|
'constructor-super': 2,
|
|
156
|
-
'eol-last': 2,
|
|
157
156
|
eqeqeq: [2, 'smart'],
|
|
158
157
|
'for-direction': 2,
|
|
159
158
|
'getter-return': 2,
|
|
@@ -232,7 +231,6 @@ module.exports = {
|
|
|
232
231
|
'no-invalid-this': 0, // too many false positives in valid classes
|
|
233
232
|
'no-irregular-whitespace': 2,
|
|
234
233
|
'no-misleading-character-class': 2,
|
|
235
|
-
'no-mixed-spaces-and-tabs': 2,
|
|
236
234
|
'no-new-symbol': 2,
|
|
237
235
|
'no-new-wrappers': 2,
|
|
238
236
|
'no-obj-calls': 2,
|
|
@@ -266,6 +264,7 @@ module.exports = {
|
|
|
266
264
|
'rxjs/observable/interval',
|
|
267
265
|
'rxjs/observable/forkJoin',
|
|
268
266
|
],
|
|
267
|
+
curly: [2, 'multi-line'], // this one is an exception that can conflict with prettier
|
|
269
268
|
'no-self-assign': 2,
|
|
270
269
|
'no-setter-return': 2,
|
|
271
270
|
'no-shadow': 0, // it is buggy with TypeScript enums
|
|
@@ -348,7 +347,6 @@ module.exports = {
|
|
|
348
347
|
'@typescript-eslint/prefer-find': 2,
|
|
349
348
|
'prefer-promise-reject-errors': 0,
|
|
350
349
|
'@typescript-eslint/prefer-promise-reject-errors': 2,
|
|
351
|
-
'arrow-parens': [2, 'as-needed'],
|
|
352
350
|
'arrow-body-style': 0,
|
|
353
351
|
'unicorn/no-array-callback-reference': 0, // false positives
|
|
354
352
|
'unicorn/no-process-exit': 0,
|
package/cfg/eslint.config.js
CHANGED
|
@@ -83,9 +83,8 @@ function getConfig() {
|
|
|
83
83
|
...require('./eslint-rules').rules,
|
|
84
84
|
...require('./eslint-vue-rules').rules,
|
|
85
85
|
...(hasJest ? require('./eslint-jest-rules').rules : {}),
|
|
86
|
-
...require('eslint-
|
|
87
|
-
//
|
|
88
|
-
curly: [2, 'multi-line'],
|
|
86
|
+
...require('./eslint-prettier-rules').rules,
|
|
87
|
+
...require('./eslint-biome-rules').rules, // disable eslint rules already covered by biome
|
|
89
88
|
},
|
|
90
89
|
}
|
|
91
90
|
}
|
|
@@ -34,8 +34,8 @@ const stylelintExists =
|
|
|
34
34
|
fs.existsSync('node_modules/stylelint-config-standard-scss')
|
|
35
35
|
const stylelintCmd = stylelintExists ? `stylelint --fix --config ${stylelintConfigPath}` : undefined
|
|
36
36
|
|
|
37
|
-
const biomeInstalled = fs.existsSync('node_modules/@biomejs/biome')
|
|
38
|
-
const biomeConfigPath =
|
|
37
|
+
// const biomeInstalled = fs.existsSync('node_modules/@biomejs/biome')
|
|
38
|
+
const biomeConfigPath = ['biome.jsonc'].find(p => fs.existsSync(p))
|
|
39
39
|
const biomeCmd = biomeConfigPath && `biome lint --write --unsafe --`
|
|
40
40
|
|
|
41
41
|
if (!eslintConfigPathRoot) {
|
package/dist/bin/dev-lib.js
CHANGED
|
@@ -69,12 +69,12 @@ const commands = [
|
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
name: 'biome',
|
|
72
|
-
fn: () => (0, lint_util_1.runBiome)(
|
|
72
|
+
fn: () => (0, lint_util_1.runBiome)(),
|
|
73
73
|
desc: 'Run biome linter on all files.',
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
name: 'biome --no-fix',
|
|
77
|
-
fn: () => (0, lint_util_1.runBiome)(
|
|
77
|
+
fn: () => (0, lint_util_1.runBiome)(false),
|
|
78
78
|
desc: 'Run biome linter on all files with "auto-fix" disabled. Useful for debugging.',
|
|
79
79
|
interactiveOnly: true,
|
|
80
80
|
},
|
package/dist/lint.util.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export declare function runPrettier(): void;
|
|
|
14
14
|
export declare function stylelintAll(): void;
|
|
15
15
|
export declare function lintStagedCommand(): Promise<void>;
|
|
16
16
|
export declare function runCommitlintCommand(): void;
|
|
17
|
-
export declare function runBiome(
|
|
17
|
+
export declare function runBiome(fix?: boolean): void;
|
|
18
18
|
export {};
|
package/dist/lint.util.js
CHANGED
|
@@ -185,7 +185,6 @@ async function lintStagedCommand() {
|
|
|
185
185
|
// const lintStaged = require('lint-staged')
|
|
186
186
|
// lint-staged is ESM since 12.0
|
|
187
187
|
// const lintStaged = await import('lint-staged')
|
|
188
|
-
/* eslint-disable no-eval */
|
|
189
188
|
// biome-ignore lint/security/noGlobalEval: ok
|
|
190
189
|
const { default: lintStaged } = await eval(`import('lint-staged')`);
|
|
191
190
|
const success = await lintStaged({
|
|
@@ -229,17 +228,16 @@ function runActionLint() {
|
|
|
229
228
|
console.log(`actionlint is not installed and won't be run.\nThis is how to install it: https://github.com/rhysd/actionlint/blob/main/docs/install.md`);
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
|
-
function runBiome(
|
|
233
|
-
if (!
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
231
|
+
function runBiome(fix = true) {
|
|
232
|
+
// if (!fs.existsSync(`node_modules/@biomejs/biome`)) {
|
|
233
|
+
// if (verbose) {
|
|
234
|
+
// console.log(`biome is not installed (checked in node_modules/@biomejs/biome), skipping`)
|
|
235
|
+
// }
|
|
236
|
+
// return
|
|
237
|
+
// }
|
|
239
238
|
const configPath = `biome.jsonc`;
|
|
240
239
|
if (!node_fs_1.default.existsSync(configPath)) {
|
|
241
|
-
|
|
242
|
-
console.log(`biome is installed, but biome.jsonc config file is missing`);
|
|
240
|
+
console.log(`biome is skipped, because ./biome.jsonc is not present`);
|
|
243
241
|
return;
|
|
244
242
|
}
|
|
245
243
|
const dirs = [`src`, `scripts`, `e2e`, `playwright`].filter(d => node_fs_1.default.existsSync(d));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.10.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky",
|
|
6
6
|
"tsn-debug": "tsn testScript.ts",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"upnc": "tsn ./src/bin/upnc.ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@biomejs/biome": "^1.8.3",
|
|
20
21
|
"@commitlint/cli": "^19.0.0",
|
|
21
22
|
"@commitlint/config-conventional": "^19.0.0",
|
|
22
23
|
"@eslint/js": "^9.7.0",
|
|
@@ -28,7 +29,6 @@
|
|
|
28
29
|
"@types/node": "^22.0.0",
|
|
29
30
|
"@types/yargs": "^16.0.0",
|
|
30
31
|
"eslint": "^9.0.0",
|
|
31
|
-
"eslint-config-prettier": "^9.0.0",
|
|
32
32
|
"eslint-plugin-import-x": "^3.1.0",
|
|
33
33
|
"eslint-plugin-jest": "^28.0.0",
|
|
34
34
|
"eslint-plugin-jsdoc": "^50.0.0",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"yargs": "^17.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@biomejs/biome": "^1.8.3",
|
|
54
53
|
"jest": "^29.0.0",
|
|
55
54
|
"stylelint": "^16.0.2",
|
|
56
55
|
"stylelint-config-standard-scss": "^13.0.0"
|