@naturalcycles/dev-lib 20.44.0 → 20.45.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/_cnst.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export declare const prettierDirs: string[]
2
- export declare const prettierExtensionsExclusive: string
3
2
  export declare const prettierExtensionsAll: string
4
3
  export declare const eslintExtensions: string
5
4
  export declare const stylelintExtensions: string
package/cfg/_cnst.js CHANGED
@@ -1,17 +1,14 @@
1
1
  const prettierDirs = ['src,scripts,e2e,docs,cfg,resources,.github,public,static']
2
- // ts,tsx,css,scss excluded, cause they need to run in special order (overlap between >1 tool):
3
- const prettierExtensionsExclusive = 'js,jsx,json,md,graphql,yml,yaml,html'
4
2
  // everything that prettier supports:
5
3
  const prettierExtensionsAll =
6
4
  'ts,tsx,cts,mts,css,scss,js,jsx,cjs,mjs,json,md,graphql,yml,yaml,html,vue'
7
- const eslintExtensions = 'ts,tsx,cts,mts,html'
5
+ const eslintExtensions = 'ts,tsx,html'
8
6
  const stylelintExtensions = 'css,scss'
9
- const lintExclude = ['./**/__exclude/**', './**/dist/**', './**/cache/**', './CHANGELOG.md']
7
+ const lintExclude = ['**/__exclude/**']
10
8
  const minActionlintVersion = '1.7.12'
11
9
 
12
10
  export {
13
11
  prettierDirs,
14
- prettierExtensionsExclusive,
15
12
  prettierExtensionsAll,
16
13
  eslintExtensions,
17
14
  stylelintExtensions,
@@ -81,10 +81,14 @@ const linters = {
81
81
  export function runOxlintEslintStylelintOxfmt(match) {
82
82
  const filesList = getFilesList(match)
83
83
  if (!filesList) return []
84
-
85
- return [oxlintCmd, eslintCmd, stylelintCmd, oxfmtCmd]
86
- .filter(Boolean)
87
- .map(s => `${s} ${filesList}`)
84
+ const eslintFilesList = eslintCmd && getEslintFilesList(match)
85
+
86
+ return [
87
+ oxlintCmd && `${oxlintCmd} ${filesList}`,
88
+ eslintFilesList && `${eslintCmd} ${eslintFilesList}`,
89
+ stylelintCmd && `${stylelintCmd} ${filesList}`,
90
+ oxfmtCmd && `${oxfmtCmd} ${filesList}`,
91
+ ].filter(Boolean)
88
92
  }
89
93
 
90
94
  export function runOxlintOxfmt(match) {
@@ -153,6 +157,11 @@ function getFilesList(match) {
153
157
  return match.filter(f => !isExcluded(f)).join(' ')
154
158
  }
155
159
 
160
+ function getEslintFilesList(match) {
161
+ const isIncluded = picomatch('./{src,scripts,e2e}/**/*.{ts,tsx,html}')
162
+ return match.filter(f => isIncluded(f)).join(' ')
163
+ }
164
+
156
165
  function canRunBinary(name) {
157
166
  try {
158
167
  execSync(`which ${name}`)
@@ -42,6 +42,7 @@ export const sharedConfig = {
42
42
  jsPlugins: [`${import.meta.dirname}/oxlint-plugin-stylistic.mjs`],
43
43
  options: {
44
44
  reportUnusedDisableDirectives: 'deny',
45
+ respectEslintDisableDirectives: false,
45
46
  maxWarnings: 0,
46
47
  denyWarnings: true,
47
48
  typeAware: true,
@@ -74,12 +75,16 @@ export const sharedConfig = {
74
75
  'no-async-promise-executor': 0,
75
76
  'no-standalone-expect': 0,
76
77
  'no-conditional-expect': 0,
78
+ 'vitest/no-conditional-expect': 0,
77
79
  'expect-expect': 0,
80
+ 'vitest/expect-expect': 0,
78
81
  'no-disabled-tests': 0,
82
+ 'vitest/no-disabled-tests': 0,
79
83
  'no-useless-assignment': 0, // buggy, gives false positives
80
84
  'object-shorthand': 2,
81
85
  'valid-expect': 0,
82
86
  'valid-title': 0,
87
+ 'vitest/valid-title': 0,
83
88
  'valid-describe-callback': 0,
84
89
  'jsdoc/require-yields': 0,
85
90
  'no-new-wrappers': 2,
@@ -147,6 +152,7 @@ export const sharedConfig = {
147
152
  'oxc/no-const-enum': 2,
148
153
  'oxc/approx-constant': 2,
149
154
  'oxc/misrefactored-assign-op': 2,
155
+ 'oxc/branches-sharing-code': 0, // todo: consider later
150
156
  'promise/spec-only': 2,
151
157
  'typescript/class-literal-property-style': 2,
152
158
  'typescript/consistent-type-exports': 2,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.44.0",
4
+ "version": "20.45.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@naturalcycles/nodejs-lib": "^15",
@@ -48,7 +48,7 @@
48
48
  "devDependencies": {
49
49
  "@types/node": "^25",
50
50
  "@types/prompts": "^2",
51
- "@typescript/native-preview": "7.0.0-dev.20260415.1"
51
+ "@typescript/native-preview": "beta"
52
52
  },
53
53
  "exports": {
54
54
  "./cfg/": "./cfg/",