@4mbl/lint 0.0.0-alpha.007a287 → 0.0.0-alpha.014d999
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/CHANGELOG.md +20 -0
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +22 -5
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +13 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +11 -2
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +13 -9
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +16 -7
- package/dist/react.js.map +1 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @4mbl/lint
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.12
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- aee0259: Upgrade dependencies
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.11
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 20b3dae: Use native rules for React when possible
|
|
14
|
+
|
|
15
|
+
## 1.0.0-beta.10
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 007a287: Configure more rules to reduce noise
|
|
20
|
+
- 007a287: Use native only-export-components rule instead of js plugin
|
|
21
|
+
- 007a287: Use correct namespace for Next.js rules
|
|
22
|
+
|
|
3
23
|
## 1.0.0-beta.9
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/next.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,YAAY,CAAC;AAE5D,KAAK,WAAW,GAAG,YAAY,GAAG;IAChC;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAIF,iBAAS,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,gBA0EjD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;;AAEvD,wBAA4B"}
|
package/dist/next.js
CHANGED
|
@@ -2,13 +2,13 @@ import path from 'node:path';
|
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import { defineConfig } from 'oxlint';
|
|
4
4
|
import { reactConfig } from './react.js';
|
|
5
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
6
5
|
const DEFAULT_OPTIONS = { uiPath: 'src/components/ui/' };
|
|
7
6
|
function nextConfig(options) {
|
|
8
7
|
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
8
|
+
const react = reactConfig(options);
|
|
9
9
|
return defineConfig({
|
|
10
|
-
extends: [
|
|
11
|
-
plugins: ['nextjs'],
|
|
10
|
+
extends: [react],
|
|
11
|
+
plugins: [...react.plugins, 'nextjs'],
|
|
12
12
|
rules: {
|
|
13
13
|
'nextjs/google-font-display': 'warn',
|
|
14
14
|
'nextjs/google-font-preconnect': 'warn',
|
|
@@ -31,11 +31,28 @@ function nextConfig(options) {
|
|
|
31
31
|
'nextjs/no-head-import-in-document': 'error',
|
|
32
32
|
'nextjs/no-script-component-in-head': 'error',
|
|
33
33
|
// ignores warnings for special exports in page and layout files
|
|
34
|
-
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh?tab=readme-ov-file#next-config
|
|
35
34
|
'react/only-export-components': [
|
|
36
35
|
'warn',
|
|
37
36
|
{
|
|
38
|
-
|
|
37
|
+
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/src/index.ts
|
|
38
|
+
allowExportNames: [
|
|
39
|
+
// removed in next@16.0.0: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#version-history
|
|
40
|
+
// 'experimental_ppr',
|
|
41
|
+
'dynamic',
|
|
42
|
+
'dynamicParams',
|
|
43
|
+
'revalidate',
|
|
44
|
+
'fetchCache',
|
|
45
|
+
'runtime',
|
|
46
|
+
'preferredRegion',
|
|
47
|
+
'maxDuration',
|
|
48
|
+
'metadata',
|
|
49
|
+
'generateMetadata',
|
|
50
|
+
'viewport',
|
|
51
|
+
'generateViewport',
|
|
52
|
+
'generateImageMetadata',
|
|
53
|
+
'generateSitemaps',
|
|
54
|
+
'generateStaticParams',
|
|
55
|
+
],
|
|
39
56
|
},
|
|
40
57
|
],
|
|
41
58
|
},
|
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"next.js","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;AAc5D,MAAM,eAAe,GAAgB,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;AAEtE,SAAS,UAAU,CAAC,OAA8B;IAChD,MAAM,IAA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,IAAI,CAAC,MAAM,KAAK,IAAI;gBAClB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;gBAC1B,CAAC,CAAC;oBACE,KAAK,EAAE;wBACL,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,mCAAmC,CAAC,UAAU,CACvF,IAAI,EACJ,GAAG,CACJ;qBACF;oBACD,KAAK,EAAE;wBACL,8BAA8B,EAAE,KAAK;qBACtC;iBACF;SACN;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,eAAe,UAAU,EAAE,CAAC"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
2
|
type NodeOptions = {};
|
|
3
|
-
declare function nodeConfig(
|
|
3
|
+
declare function nodeConfig(options?: Partial<NodeOptions>): {
|
|
4
4
|
extends: {
|
|
5
5
|
plugins: ("unicorn" | "typescript")[];
|
|
6
6
|
jsPlugins: never[];
|
|
@@ -159,9 +159,15 @@ declare function nodeConfig(_options?: Partial<NodeOptions>): {
|
|
|
159
159
|
'oxc/no-async-await': "off";
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
|
+
plugins: ("unicorn" | "typescript")[];
|
|
162
163
|
env: {
|
|
163
164
|
node: true;
|
|
164
165
|
};
|
|
166
|
+
rules: {
|
|
167
|
+
'eslint/no-underscore-dangle': ["warn", {
|
|
168
|
+
allow: string[];
|
|
169
|
+
}];
|
|
170
|
+
};
|
|
165
171
|
};
|
|
166
172
|
export { type OxlintConfig, defineConfig, nodeConfig };
|
|
167
173
|
declare const _default: {
|
|
@@ -323,9 +329,15 @@ declare const _default: {
|
|
|
323
329
|
'oxc/no-async-await': "off";
|
|
324
330
|
};
|
|
325
331
|
}[];
|
|
332
|
+
plugins: ("unicorn" | "typescript")[];
|
|
326
333
|
env: {
|
|
327
334
|
node: true;
|
|
328
335
|
};
|
|
336
|
+
rules: {
|
|
337
|
+
'eslint/no-underscore-dangle': ["warn", {
|
|
338
|
+
allow: string[];
|
|
339
|
+
}];
|
|
340
|
+
};
|
|
329
341
|
};
|
|
330
342
|
export default _default;
|
|
331
343
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBjD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,wBAA4B"}
|
package/dist/node.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { defineConfig } from 'oxlint';
|
|
2
2
|
import { baseConfig } from './base.js';
|
|
3
3
|
// const DEFAULT_OPTIONS: NodeOptions = {};
|
|
4
|
-
function nodeConfig(
|
|
4
|
+
function nodeConfig(options) {
|
|
5
5
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
6
|
+
const base = baseConfig(options);
|
|
6
7
|
return defineConfig({
|
|
7
|
-
extends: [
|
|
8
|
+
extends: [base],
|
|
9
|
+
// when changing plugins the parent plugins need to be extended, otherwise they are overridden
|
|
10
|
+
plugins: base.plugins,
|
|
8
11
|
env: {
|
|
9
12
|
node: true,
|
|
10
13
|
},
|
|
14
|
+
rules: {
|
|
15
|
+
'eslint/no-underscore-dangle': [
|
|
16
|
+
'warn',
|
|
17
|
+
{ allow: ['__dirname', '__filename'] },
|
|
18
|
+
],
|
|
19
|
+
},
|
|
11
20
|
});
|
|
12
21
|
}
|
|
13
22
|
export { defineConfig, nodeConfig };
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,2CAA2C;AAE3C,SAAS,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,2CAA2C;AAE3C,SAAS,UAAU,CAAC,OAA8B;IAChD,mDAAmD;IAEnD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjC,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,IAAI,CAAC;QACf,8FAA8F;QAC9F,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,EAAE;YACH,IAAI,EAAE,IAAI;SACX;QAED,KAAK,EAAE;YACL,6BAA6B,EAAE;gBAC7B,MAAM;gBACN,EAAE,KAAK,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE;aACvC;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,eAAe,UAAU,EAAE,CAAC"}
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
2
|
export type ReactOptions = {};
|
|
3
|
-
declare function reactConfig(
|
|
3
|
+
declare function reactConfig(options?: Partial<ReactOptions>): {
|
|
4
4
|
extends: {
|
|
5
5
|
plugins: ("unicorn" | "typescript")[];
|
|
6
6
|
jsPlugins: never[];
|
|
@@ -159,21 +159,23 @@ declare function reactConfig(_options?: Partial<ReactOptions>): {
|
|
|
159
159
|
'oxc/no-async-await': "off";
|
|
160
160
|
};
|
|
161
161
|
}[];
|
|
162
|
-
plugins: "react"[];
|
|
162
|
+
plugins: ("react" | "unicorn" | "typescript")[];
|
|
163
163
|
jsPlugins: {
|
|
164
164
|
name: string;
|
|
165
165
|
specifier: string;
|
|
166
166
|
}[];
|
|
167
167
|
rules: {
|
|
168
|
-
'react
|
|
169
|
-
'react
|
|
168
|
+
'react/rules-of-hooks': "error";
|
|
169
|
+
'react/exhaustive-deps': "warn";
|
|
170
170
|
'react-hooks-js/set-state-in-effect': "warn";
|
|
171
|
-
'react
|
|
171
|
+
'react/only-export-components': "error";
|
|
172
172
|
'react-compiler-js/react-compiler': "error";
|
|
173
173
|
'react/jsx-filename-extension': "off";
|
|
174
174
|
'react/jsx-max-depth': "off";
|
|
175
175
|
'react/no-multi-comp': "off";
|
|
176
176
|
'react/jsx-props-no-spreading': "off";
|
|
177
|
+
'react/forbid-component-props': "off";
|
|
178
|
+
'react/forbid-dom-props': "off";
|
|
177
179
|
};
|
|
178
180
|
overrides: {
|
|
179
181
|
files: string[];
|
|
@@ -383,21 +385,23 @@ declare const _default: {
|
|
|
383
385
|
'oxc/no-async-await': "off";
|
|
384
386
|
};
|
|
385
387
|
}[];
|
|
386
|
-
plugins: "react"[];
|
|
388
|
+
plugins: ("react" | "unicorn" | "typescript")[];
|
|
387
389
|
jsPlugins: {
|
|
388
390
|
name: string;
|
|
389
391
|
specifier: string;
|
|
390
392
|
}[];
|
|
391
393
|
rules: {
|
|
392
|
-
'react
|
|
393
|
-
'react
|
|
394
|
+
'react/rules-of-hooks': "error";
|
|
395
|
+
'react/exhaustive-deps': "warn";
|
|
394
396
|
'react-hooks-js/set-state-in-effect': "warn";
|
|
395
|
-
'react
|
|
397
|
+
'react/only-export-components': "error";
|
|
396
398
|
'react-compiler-js/react-compiler': "error";
|
|
397
399
|
'react/jsx-filename-extension': "off";
|
|
398
400
|
'react/jsx-max-depth': "off";
|
|
399
401
|
'react/no-multi-comp': "off";
|
|
400
402
|
'react/jsx-props-no-spreading': "off";
|
|
403
|
+
'react/forbid-component-props': "off";
|
|
404
|
+
'react/forbid-dom-props': "off";
|
|
401
405
|
};
|
|
402
406
|
overrides: {
|
|
403
407
|
files: string[];
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAI9B,iBAAS,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;AAI9B,iBAAS,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFnD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,wBAA6B"}
|
package/dist/react.js
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { defineConfig } from 'oxlint';
|
|
2
2
|
import { baseConfig } from './base.js';
|
|
3
3
|
// const DEFAULT_OPTIONS: ReactOptions = {};
|
|
4
|
-
function reactConfig(
|
|
4
|
+
function reactConfig(options) {
|
|
5
5
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
6
|
+
const base = baseConfig(options);
|
|
6
7
|
return defineConfig({
|
|
7
|
-
extends: [
|
|
8
|
-
plugins: ['react'],
|
|
8
|
+
extends: [base],
|
|
9
|
+
plugins: [...base.plugins, 'react'],
|
|
9
10
|
jsPlugins: [
|
|
11
|
+
// react compiler is not yet supported by oxc
|
|
12
|
+
// https://github.com/oxc-project/oxc/issues/10048
|
|
13
|
+
// this means compiler related rules are not yet supported
|
|
14
|
+
// https://github.com/oxc-project/oxc/issues/1022
|
|
15
|
+
// react compiler port to rust may enable compiler related rules
|
|
16
|
+
// https://github.com/facebook/react/pull/36173
|
|
10
17
|
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
|
|
11
|
-
{ name: 'react-refresh-js', specifier: 'eslint-plugin-react-refresh' },
|
|
12
18
|
{ name: 'react-compiler-js', specifier: 'eslint-plugin-react-compiler' },
|
|
13
19
|
],
|
|
14
20
|
rules: {
|
|
15
|
-
'react
|
|
16
|
-
'react
|
|
21
|
+
'react/rules-of-hooks': 'error',
|
|
22
|
+
'react/exhaustive-deps': 'warn',
|
|
17
23
|
'react-hooks-js/set-state-in-effect': 'warn',
|
|
18
|
-
'react
|
|
24
|
+
'react/only-export-components': 'error',
|
|
19
25
|
'react-compiler-js/react-compiler': 'error',
|
|
20
26
|
'react/jsx-filename-extension': 'off',
|
|
21
27
|
'react/jsx-max-depth': 'off',
|
|
22
28
|
'react/no-multi-comp': 'off',
|
|
23
29
|
'react/jsx-props-no-spreading': 'off',
|
|
30
|
+
// conflicts with tailwind
|
|
31
|
+
'react/forbid-component-props': 'off',
|
|
32
|
+
'react/forbid-dom-props': 'off',
|
|
24
33
|
},
|
|
25
34
|
overrides: [
|
|
26
35
|
{
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,4CAA4C;AAE5C,SAAS,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA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A8B,EAAE,OAAO;oBACvC,sBAAsB,EAAE,OAAO;oBAC/B,6BAA6B,EAAE,OAAO;oBACtC,2BAA2B,EAAE,KAAK;oBAClC,iBAAiB,EAAE,KAAK;oBACxB,0BAA0B,EAAE,KAAK;oBACjC,6BAA6B,EAAE,OAAO;oBACtC,oCAAoC,EAAE,MAAM;oBAC5C,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;oBACpE,qBAAqB,EAAE,MAAM;oBAC7B,yBAAyB,EAAE,MAAM;oBACjC,oCAAoC,EAAE,MAAM;oBAC5C,uCAAuC,EAAE,MAAM;oBAC/C,mCAAmC,EAAE,MAAM;iBAC5C;gBACD,OAAO,EAAE;oBACP,uBAAuB,EAAE,UAAU;oBACnC,qBAAqB,EAAE,UAAU;oBACjC,YAAY,EAAE,UAAU;oBACxB,WAAW,EAAE,UAAU;oBACvB,iBAAiB,EAAE,UAAU;oBAC7B,UAAU,EAAE,UAAU;oBACtB,kBAAkB,EAAE,UAAU;iBAC/B;gBACD,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;gBAC/B,GAAG,EAAE;oBACH,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,IAAI;iBACX;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAqB,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,eAAe,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4mbl/lint",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.014d999",
|
|
4
4
|
"description": "Linting configuration for various environments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "4mbl",
|
|
@@ -32,16 +32,13 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
35
|
-
"eslint-plugin-react-hooks": "
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"jiti": "^2.6.1",
|
|
39
|
-
"oxlint": "^1.60.0",
|
|
40
|
-
"oxlint-tsgolint": "^0.21.1"
|
|
35
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
36
|
+
"oxlint": "1.62.x",
|
|
37
|
+
"oxlint-tsgolint": "0.22.x"
|
|
41
38
|
},
|
|
42
39
|
"devDependencies": {
|
|
43
40
|
"@types/node": "^24.12.2",
|
|
44
|
-
"@4mbl/tsconfig": "0.0.0-alpha.
|
|
41
|
+
"@4mbl/tsconfig": "0.0.0-alpha.014d999"
|
|
45
42
|
},
|
|
46
43
|
"scripts": {
|
|
47
44
|
"build": "tsc"
|