@pezkuwi/dev 0.85.11 → 0.86.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/cjs/packageInfo.js +1 -1
- package/cjs/rootJs/index.js +0 -1
- package/config/eslint.js +33 -19
- package/config/eslint.rules.js +66 -60
- package/config/eslint.standard.js +585 -0
- package/config/tsconfig.json +8 -0
- package/package.json +67 -66
- package/packageInfo.js +1 -1
- package/rootJs/index.js +1 -2
- package/scripts/pezkuwi-dev-build-ts.mjs +46 -21
- package/scripts/pezkuwi-exec-node-test.mjs +6 -6
- package/scripts/util.mjs +2 -2
- package/.skip-deno +0 -0
- package/build-deno/README.md +0 -547
- package/build-deno/detectOther.ts +0 -2
- package/build-deno/index.ts +0 -4
- package/build-deno/mod.ts +0 -10
- package/build-deno/packageInfo.ts +0 -3
- package/build-deno/root.ts +0 -4
- package/build-deno/rootJs/Clazz.ts +0 -43
- package/build-deno/rootJs/Jsx.tsx +0 -42
- package/build-deno/rootJs/JsxChild.tsx +0 -18
- package/build-deno/rootJs/augmented.ts +0 -12
- package/build-deno/rootJs/dynamic.d.mts +0 -4
- package/build-deno/rootJs/dynamic.mjs +0 -13
- package/build-deno/rootJs/index.ts +0 -51
- package/build-deno/rootJs/testJson.json +0 -5
- package/build-deno/rootStatic/zagros.svg +0 -1
- package/build-deno/rootTests.ts +0 -57
- package/build-deno/types.ts +0 -4
- package/build-tsc/detectOther.d.ts +0 -2
- package/build-tsc/index.d.ts +0 -1
- package/build-tsc/packageInfo.d.ts +0 -6
- package/build-tsc/root.d.ts +0 -2
- package/build-tsc/rootJs/Clazz.d.ts +0 -18
- package/build-tsc/rootJs/Jsx.d.ts +0 -5
- package/build-tsc/rootJs/JsxChild.d.ts +0 -9
- package/build-tsc/rootJs/augmented.d.ts +0 -8
- package/build-tsc/rootJs/index.d.ts +0 -19
- package/build-tsc/rootTests.d.ts +0 -2
- package/build-tsc/types.d.ts +0 -2
- package/build-tsc-cjs/detectOther.js +0 -3
- package/build-tsc-cjs/index.js +0 -3
- package/build-tsc-cjs/packageInfo.js +0 -4
- package/build-tsc-cjs/root.js +0 -6
- package/build-tsc-cjs/rootJs/Clazz.js +0 -36
- package/build-tsc-cjs/rootJs/Jsx.js +0 -16
- package/build-tsc-cjs/rootJs/JsxChild.js +0 -9
- package/build-tsc-cjs/rootJs/augmented.js +0 -3
- package/build-tsc-cjs/rootJs/index.js +0 -51
- package/build-tsc-cjs/rootTests.js +0 -44
- package/build-tsc-cjs/types.js +0 -2
- package/build-tsc-esm/detectOther.js +0 -1
- package/build-tsc-esm/index.js +0 -2
- package/build-tsc-esm/packageInfo.js +0 -1
- package/build-tsc-esm/root.js +0 -2
- package/build-tsc-esm/rootJs/Clazz.js +0 -32
- package/build-tsc-esm/rootJs/Jsx.js +0 -13
- package/build-tsc-esm/rootJs/JsxChild.js +0 -6
- package/build-tsc-esm/rootJs/augmented.js +0 -2
- package/build-tsc-esm/rootJs/index.js +0 -39
- package/build-tsc-esm/rootTests.js +0 -41
- package/build-tsc-esm/types.js +0 -1
- package/tsconfig.build.json +0 -18
- package/tsconfig.build.tsbuildinfo +0 -1
- package/tsconfig.config.json +0 -14
- package/tsconfig.scripts.json +0 -14
- package/tsconfig.spec.json +0 -18
- package/tsconfig.spec.tsbuildinfo +0 -1
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/dev', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.86.0' };
|
package/cjs/rootJs/index.js
CHANGED
|
@@ -23,7 +23,6 @@ async function dynamic(a, b) {
|
|
|
23
23
|
// NOTE we go via this path so it points to the same location in both ESM
|
|
24
24
|
// and CJS output (a './dynamic' import would be different otherwise)
|
|
25
25
|
const { sum } = await import('@pezkuwi/dev/rootJs/dynamic.mjs');
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
27
26
|
return sum(a, b);
|
|
28
27
|
}
|
|
29
28
|
/** Function to ensure we have json correctly imported */
|
package/config/eslint.js
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
5
5
|
import eslintJs from '@eslint/js';
|
|
6
|
+
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
6
7
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
7
8
|
import tsParser from '@typescript-eslint/parser';
|
|
8
9
|
// @ts-expect-error No definition for this one
|
|
9
|
-
import standardConfig from 'eslint-config-standard';
|
|
10
|
-
import deprecationPlugin from 'eslint-plugin-deprecation';
|
|
11
|
-
// @ts-expect-error No definition for this one
|
|
12
10
|
import headerPlugin from 'eslint-plugin-header';
|
|
13
11
|
// @ts-expect-error No definition for this one
|
|
14
|
-
import importPlugin from 'eslint-plugin-import';
|
|
15
|
-
// @ts-expect-error No definition for this one
|
|
16
12
|
import importNewlinesPlugin from 'eslint-plugin-import-newlines';
|
|
17
|
-
|
|
13
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
18
14
|
import jestPlugin from 'eslint-plugin-jest';
|
|
19
|
-
// @ts-expect-error No definition for this one
|
|
20
15
|
import nPlugin from 'eslint-plugin-n';
|
|
21
16
|
// @ts-expect-error No definition for this one
|
|
22
17
|
import promisePlugin from 'eslint-plugin-promise';
|
|
23
|
-
// @ts-expect-error No definition for this one
|
|
24
18
|
import reactPlugin from 'eslint-plugin-react';
|
|
25
|
-
// @ts-expect-error No definition for this one
|
|
26
19
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
27
|
-
// @ts-expect-error No definition for this one
|
|
28
20
|
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
|
|
29
21
|
// @ts-expect-error No definition for this one
|
|
30
22
|
import sortDestructureKeysPlugin from 'eslint-plugin-sort-destructure-keys';
|
|
31
23
|
import globals from 'globals';
|
|
32
24
|
|
|
33
25
|
import { overrideAll, overrideJs, overrideJsx, overrideSpec } from './eslint.rules.js';
|
|
26
|
+
import { standardRules } from './eslint.standard.js';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* eslint-plugin-header declares no options schema, and eslint 9+ rejects
|
|
30
|
+
* options for a rule without one. `schema: false` is how a rule says it
|
|
31
|
+
* validates its own options; the rule itself is unchanged.
|
|
32
|
+
*/
|
|
33
|
+
const headerPluginFixed = {
|
|
34
|
+
...headerPlugin,
|
|
35
|
+
rules: {
|
|
36
|
+
header: {
|
|
37
|
+
...headerPlugin.rules.header,
|
|
38
|
+
meta: { ...headerPlugin.rules.header.meta, schema: false }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
34
42
|
|
|
35
43
|
const EXT_JS = ['.cjs', '.js', '.mjs'];
|
|
36
44
|
const EXT_TS = ['.ts', '.tsx'];
|
|
@@ -84,23 +92,27 @@ export default [
|
|
|
84
92
|
}
|
|
85
93
|
},
|
|
86
94
|
plugins: {
|
|
95
|
+
'@stylistic': stylisticPlugin,
|
|
87
96
|
'@typescript-eslint': tsPlugin,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
// eslint-plugin-header reports at the first token after the leading
|
|
98
|
+
// comments, so a generated file's /* eslint-disable */ covers it; the
|
|
99
|
+
// maintained fork reports at line 1 instead. The compat layer supplies the
|
|
100
|
+
// context methods eslint 10 removed; headerPluginFixed, the options schema.
|
|
101
|
+
header: fixupPluginRules(headerPluginFixed),
|
|
91
102
|
'import-newlines': importNewlinesPlugin,
|
|
103
|
+
'import-x': importPlugin,
|
|
92
104
|
n: nPlugin,
|
|
93
105
|
promise: promisePlugin,
|
|
94
106
|
'simple-import-sort': simpleImportSortPlugin,
|
|
95
107
|
'sort-destructure-keys': sortDestructureKeysPlugin
|
|
96
108
|
},
|
|
97
109
|
settings: {
|
|
98
|
-
'import/extensions': EXT_ALL,
|
|
99
|
-
'import/parsers': {
|
|
110
|
+
'import-x/extensions': EXT_ALL,
|
|
111
|
+
'import-x/parsers': {
|
|
100
112
|
'@typescript-eslint/parser': EXT_TS,
|
|
101
113
|
espree: EXT_JS
|
|
102
114
|
},
|
|
103
|
-
'import/resolver': {
|
|
115
|
+
'import-x/resolver': {
|
|
104
116
|
node: {
|
|
105
117
|
extensions: EXT_ALL
|
|
106
118
|
},
|
|
@@ -114,7 +126,7 @@ export default [
|
|
|
114
126
|
files: extsToGlobs(EXT_ALL),
|
|
115
127
|
rules: {
|
|
116
128
|
...eslintJs.configs.recommended.rules,
|
|
117
|
-
...
|
|
129
|
+
...standardRules,
|
|
118
130
|
...tsPlugin.configs['recommended-type-checked'].rules,
|
|
119
131
|
...tsPlugin.configs['stylistic-type-checked'].rules,
|
|
120
132
|
...overrideAll
|
|
@@ -132,7 +144,9 @@ export default [
|
|
|
132
144
|
'**/use*.ts'
|
|
133
145
|
],
|
|
134
146
|
plugins: {
|
|
135
|
-
react
|
|
147
|
+
// eslint-plugin-react still calls context methods eslint 10 removed
|
|
148
|
+
// (getFilename and others); the compat layer provides them.
|
|
149
|
+
react: fixupPluginRules(reactPlugin),
|
|
136
150
|
'react-hooks': reactHooksPlugin
|
|
137
151
|
},
|
|
138
152
|
rules: {
|
package/config/eslint.rules.js
CHANGED
|
@@ -59,12 +59,56 @@ function getHeaderPattern () {
|
|
|
59
59
|
|
|
60
60
|
export const overrideAll = {
|
|
61
61
|
...FIXME,
|
|
62
|
+
'@stylistic/arrow-parens': ['error', 'always'],
|
|
63
|
+
'@stylistic/brace-style': ['error', '1tbs'],
|
|
64
|
+
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
65
|
+
'@stylistic/indent': ['error', 2],
|
|
66
|
+
'@stylistic/no-extra-semi': 'error',
|
|
67
|
+
'@stylistic/object-curly-newline': ['error', {
|
|
68
|
+
ExportDeclaration: { minProperties: 2048 },
|
|
69
|
+
ImportDeclaration: { minProperties: 2048 },
|
|
70
|
+
ObjectPattern: { minProperties: 2048 }
|
|
71
|
+
}],
|
|
72
|
+
'@stylistic/padding-line-between-statements': [
|
|
73
|
+
'error',
|
|
74
|
+
{ blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] },
|
|
75
|
+
{ blankLine: 'any', next: ['const', 'let', 'var'], prev: ['const', 'let', 'var'] },
|
|
76
|
+
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
77
|
+
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
78
|
+
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
79
|
+
{ blankLine: 'always', next: '*', prev: 'function' },
|
|
80
|
+
{ blankLine: 'always', next: 'try', prev: '*' },
|
|
81
|
+
{ blankLine: 'always', next: '*', prev: 'try' },
|
|
82
|
+
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
83
|
+
{ blankLine: 'always', next: 'import', prev: '*' },
|
|
84
|
+
{ blankLine: 'always', next: '*', prev: 'import' },
|
|
85
|
+
{ blankLine: 'any', next: 'import', prev: 'import' }
|
|
86
|
+
],
|
|
87
|
+
'@stylistic/semi': ['error', 'always'],
|
|
88
|
+
'@stylistic/spaced-comment': ['error', 'always', {
|
|
89
|
+
block: {
|
|
90
|
+
// pure export helpers
|
|
91
|
+
markers: ['#__PURE__']
|
|
92
|
+
},
|
|
93
|
+
line: {
|
|
94
|
+
// TS reference types
|
|
95
|
+
markers: ['/ <reference']
|
|
96
|
+
}
|
|
97
|
+
}],
|
|
98
|
+
'@stylistic/type-annotation-spacing': 'error',
|
|
62
99
|
// the next 2 enforce isolatedModules & verbatimModuleSyntax
|
|
63
100
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
64
101
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
65
102
|
'@typescript-eslint/dot-notation': 'error',
|
|
66
|
-
'@typescript-eslint/
|
|
103
|
+
'@typescript-eslint/no-deprecated': 'error',
|
|
67
104
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
105
|
+
// standard's options for the core rule, which the TypeScript preset turns off
|
|
106
|
+
// in favour of this one (with defaults that reject a && b() and a ? b() : c())
|
|
107
|
+
'@typescript-eslint/no-unused-expressions': ['error', {
|
|
108
|
+
allowShortCircuit: true,
|
|
109
|
+
allowTaggedTemplates: true,
|
|
110
|
+
allowTernary: true
|
|
111
|
+
}],
|
|
68
112
|
// ts itself checks and ignores those starting with _, align the linting
|
|
69
113
|
'@typescript-eslint/no-unused-vars': ['error', {
|
|
70
114
|
args: 'all',
|
|
@@ -75,20 +119,15 @@ export const overrideAll = {
|
|
|
75
119
|
vars: 'all',
|
|
76
120
|
varsIgnorePattern: '^_'
|
|
77
121
|
}],
|
|
78
|
-
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
79
|
-
'arrow-parens': ['error', 'always'],
|
|
80
|
-
'brace-style': ['error', '1tbs'],
|
|
81
122
|
curly: ['error', 'all'],
|
|
82
123
|
'default-param-last': 'off', // conflicts with TS version
|
|
83
|
-
'deprecation/deprecation': 'error',
|
|
84
124
|
'dot-notation': 'off', // conflicts with TS version
|
|
85
125
|
'func-style': ['error', 'declaration', {
|
|
86
126
|
allowArrowFunctions: true
|
|
87
127
|
}],
|
|
88
128
|
// this does help with declarations, but also
|
|
89
129
|
// applies to invocations, which is an issue...
|
|
90
|
-
// 'function-paren-newline': ['error', 'never'],
|
|
91
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
|
130
|
+
// '@stylistic/function-paren-newline': ['error', 'never'],
|
|
92
131
|
'header/header': ['error', 'line', [
|
|
93
132
|
{ pattern: getHeaderPattern() },
|
|
94
133
|
' SPDX-License-Identifier: Apache-2.0'
|
|
@@ -97,8 +136,8 @@ export const overrideAll = {
|
|
|
97
136
|
forceSingleLine: true,
|
|
98
137
|
items: 2048
|
|
99
138
|
}],
|
|
100
|
-
'import/export': 'error',
|
|
101
|
-
'import/extensions': ['error', 'ignorePackages', {
|
|
139
|
+
'import-x/export': 'error',
|
|
140
|
+
'import-x/extensions': ['error', 'ignorePackages', {
|
|
102
141
|
cjs: 'always',
|
|
103
142
|
js: 'always',
|
|
104
143
|
json: 'always',
|
|
@@ -107,35 +146,12 @@ export const overrideAll = {
|
|
|
107
146
|
ts: 'never',
|
|
108
147
|
tsx: 'never'
|
|
109
148
|
}],
|
|
110
|
-
'import/first': 'error',
|
|
111
|
-
'import/newline-after-import': 'error',
|
|
112
|
-
'import/no-duplicates': 'error',
|
|
113
|
-
'import/order': 'off', // conflicts with simple-import-sort
|
|
114
|
-
indent: 'off', // required as 'off' since typescript-eslint has own versions
|
|
115
|
-
'no-extra-semi': 'error',
|
|
149
|
+
'import-x/first': 'error',
|
|
150
|
+
'import-x/newline-after-import': 'error',
|
|
151
|
+
'import-x/no-duplicates': 'error',
|
|
152
|
+
'import-x/order': 'off', // conflicts with simple-import-sort
|
|
116
153
|
'no-unused-vars': 'off',
|
|
117
154
|
'no-use-before-define': 'off',
|
|
118
|
-
'object-curly-newline': ['error', {
|
|
119
|
-
ExportDeclaration: { minProperties: 2048 },
|
|
120
|
-
ImportDeclaration: { minProperties: 2048 },
|
|
121
|
-
ObjectPattern: { minProperties: 2048 }
|
|
122
|
-
}],
|
|
123
|
-
'padding-line-between-statements': [
|
|
124
|
-
'error',
|
|
125
|
-
{ blankLine: 'always', next: '*', prev: ['const', 'let', 'var'] },
|
|
126
|
-
{ blankLine: 'any', next: ['const', 'let', 'var'], prev: ['const', 'let', 'var'] },
|
|
127
|
-
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
128
|
-
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
129
|
-
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
130
|
-
{ blankLine: 'always', next: '*', prev: 'function' },
|
|
131
|
-
{ blankLine: 'always', next: 'try', prev: '*' },
|
|
132
|
-
{ blankLine: 'always', next: '*', prev: 'try' },
|
|
133
|
-
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
134
|
-
{ blankLine: 'always', next: 'import', prev: '*' },
|
|
135
|
-
{ blankLine: 'always', next: '*', prev: 'import' },
|
|
136
|
-
{ blankLine: 'any', next: 'import', prev: 'import' }
|
|
137
|
-
],
|
|
138
|
-
semi: ['error', 'always'],
|
|
139
155
|
'simple-import-sort/exports': 'error',
|
|
140
156
|
'simple-import-sort/imports': ['error', {
|
|
141
157
|
groups: [
|
|
@@ -150,55 +166,45 @@ export const overrideAll = {
|
|
|
150
166
|
'sort-destructure-keys/sort-destructure-keys': ['error', {
|
|
151
167
|
caseSensitive: true
|
|
152
168
|
}],
|
|
153
|
-
'sort-keys': 'error'
|
|
154
|
-
'spaced-comment': ['error', 'always', {
|
|
155
|
-
block: {
|
|
156
|
-
// pure export helpers
|
|
157
|
-
markers: ['#__PURE__']
|
|
158
|
-
},
|
|
159
|
-
line: {
|
|
160
|
-
// TS reference types
|
|
161
|
-
markers: ['/ <reference']
|
|
162
|
-
}
|
|
163
|
-
}]
|
|
169
|
+
'sort-keys': 'error'
|
|
164
170
|
};
|
|
165
171
|
|
|
166
172
|
export const overrideJsx = {
|
|
167
|
-
'jsx-
|
|
168
|
-
|
|
169
|
-
'
|
|
170
|
-
'react/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
|
|
171
|
-
'react/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
172
|
-
'react/jsx-fragments': 'error',
|
|
173
|
-
'react/jsx-max-props-per-line': ['warn', {
|
|
173
|
+
'@stylistic/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
|
|
174
|
+
'@stylistic/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
|
|
175
|
+
'@stylistic/jsx-max-props-per-line': ['warn', {
|
|
174
176
|
maximum: 1,
|
|
175
177
|
when: 'always'
|
|
176
178
|
}],
|
|
177
|
-
'
|
|
179
|
+
'@stylistic/jsx-newline': ['error', {
|
|
178
180
|
prevent: true
|
|
179
181
|
}],
|
|
180
|
-
'
|
|
181
|
-
'
|
|
182
|
-
'
|
|
182
|
+
'@stylistic/jsx-props-no-multi-spaces': 'error',
|
|
183
|
+
'@stylistic/jsx-quotes': ['error', 'prefer-single'],
|
|
184
|
+
'@stylistic/jsx-sort-props': ['warn', {
|
|
183
185
|
noSortAlphabetically: false
|
|
184
186
|
}],
|
|
185
|
-
'
|
|
187
|
+
'@stylistic/jsx-tag-spacing': ['error', {
|
|
186
188
|
afterOpening: 'never',
|
|
187
189
|
beforeClosing: 'never',
|
|
188
190
|
beforeSelfClosing: 'always',
|
|
189
191
|
closingSlash: 'never'
|
|
190
192
|
}],
|
|
193
|
+
// swap from recommended warning to error
|
|
194
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
195
|
+
'react/jsx-fragments': 'error',
|
|
196
|
+
'react/jsx-no-bind': 'error',
|
|
191
197
|
'react/prop-types': 'off' // this is a completely broken rule
|
|
192
198
|
};
|
|
193
199
|
|
|
194
200
|
export const overrideJs = {
|
|
195
201
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
202
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
196
203
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
197
204
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
198
205
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
199
206
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
200
207
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
201
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
202
208
|
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
203
209
|
'@typescript-eslint/restrict-template-expressions': 'off'
|
|
204
210
|
};
|