@4mbl/lint 0.0.0-alpha.e651e24 → 0.0.0-alpha.e676d07
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 +143 -0
- package/bin/cli.js +31 -3
- package/dist/base.d.ts +300 -212
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +160 -108
- package/dist/base.js.map +1 -1
- package/dist/next.d.ts +540 -2
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +49 -37
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +315 -213
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +12 -2
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +353 -253
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +36 -24
- package/dist/react.js.map +1 -1
- package/package.json +6 -9
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFnD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/react.js
CHANGED
|
@@ -1,26 +1,54 @@
|
|
|
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', 'jsx-a11y'],
|
|
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
|
],
|
|
20
|
+
env: {
|
|
21
|
+
browser: true,
|
|
22
|
+
node: true,
|
|
23
|
+
},
|
|
24
|
+
globals: {
|
|
25
|
+
AudioWorkletGlobalScope: 'readonly',
|
|
26
|
+
AudioWorkletProcessor: 'readonly',
|
|
27
|
+
currentFrame: 'readonly',
|
|
28
|
+
currentTime: 'readonly',
|
|
29
|
+
registerProcessor: 'readonly',
|
|
30
|
+
sampleRate: 'readonly',
|
|
31
|
+
WorkletGlobalScope: 'readonly',
|
|
32
|
+
},
|
|
14
33
|
rules: {
|
|
15
|
-
'react
|
|
16
|
-
'react
|
|
34
|
+
'react/rules-of-hooks': 'error',
|
|
35
|
+
'react/exhaustive-deps': 'warn',
|
|
17
36
|
'react-hooks-js/set-state-in-effect': 'warn',
|
|
18
|
-
'react
|
|
37
|
+
'react/only-export-components': 'error',
|
|
19
38
|
'react-compiler-js/react-compiler': 'error',
|
|
39
|
+
'import/no-anonymous-default-export': 'warn',
|
|
40
|
+
'react/jsx-filename-extension': 'off',
|
|
41
|
+
'react/jsx-max-depth': 'off',
|
|
42
|
+
'react/no-multi-comp': 'off',
|
|
43
|
+
'react/jsx-props-no-spreading': 'off',
|
|
44
|
+
'react/jsx-no-literals': 'off',
|
|
45
|
+
// conflicts with tailwind
|
|
46
|
+
'react/forbid-component-props': 'off',
|
|
47
|
+
'react/forbid-dom-props': 'off',
|
|
20
48
|
},
|
|
21
49
|
overrides: [
|
|
22
50
|
{
|
|
23
|
-
files: ['**/*.{
|
|
51
|
+
files: ['**/*.{jsx,tsx}'],
|
|
24
52
|
rules: {
|
|
25
53
|
'react/display-name': 'error',
|
|
26
54
|
'react/jsx-key': 'error',
|
|
@@ -30,7 +58,6 @@ function reactConfig(_options) {
|
|
|
30
58
|
'react/jsx-no-undef': 'error',
|
|
31
59
|
'react/no-children-prop': 'error',
|
|
32
60
|
'react/no-danger-with-children': 'error',
|
|
33
|
-
// "react/no-deprecated": "error", // not implemented yet in oxlint
|
|
34
61
|
'react/no-direct-mutation-state': 'error',
|
|
35
62
|
'react/no-find-dom-node': 'error',
|
|
36
63
|
'react/no-is-mounted': 'error',
|
|
@@ -41,7 +68,6 @@ function reactConfig(_options) {
|
|
|
41
68
|
'react/no-unsafe': 'off',
|
|
42
69
|
'react/react-in-jsx-scope': 'off',
|
|
43
70
|
'react/require-render-return': 'error',
|
|
44
|
-
'import/no-anonymous-default-export': 'warn',
|
|
45
71
|
'jsx-a11y/alt-text': ['warn', { elements: ['img'], img: ['Image'] }],
|
|
46
72
|
'jsx-a11y/aria-props': 'warn',
|
|
47
73
|
'jsx-a11y/aria-proptypes': 'warn',
|
|
@@ -49,20 +75,6 @@ function reactConfig(_options) {
|
|
|
49
75
|
'jsx-a11y/role-has-required-aria-props': 'warn',
|
|
50
76
|
'jsx-a11y/role-supports-aria-props': 'warn',
|
|
51
77
|
},
|
|
52
|
-
globals: {
|
|
53
|
-
AudioWorkletGlobalScope: 'readonly',
|
|
54
|
-
AudioWorkletProcessor: 'readonly',
|
|
55
|
-
currentFrame: 'readonly',
|
|
56
|
-
currentTime: 'readonly',
|
|
57
|
-
registerProcessor: 'readonly',
|
|
58
|
-
sampleRate: 'readonly',
|
|
59
|
-
WorkletGlobalScope: 'readonly',
|
|
60
|
-
},
|
|
61
|
-
plugins: ['import', 'jsx-a11y'],
|
|
62
|
-
env: {
|
|
63
|
-
browser: true,
|
|
64
|
-
node: true,
|
|
65
|
-
},
|
|
66
78
|
},
|
|
67
79
|
],
|
|
68
80
|
});
|
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;AAIvC,4CAA4C;AAE5C,SAAS,WAAW,CAAC,OAA+B;IAClD,mDAAmD;IAEnD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjC,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC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OAAO;oBAC7B,wBAAwB,EAAE,OAAO;oBACjC,+BAA+B,EAAE,OAAO;oBACxC,gCAAgC,EAAE,OAAO;oBACzC,wBAAwB,EAAE,OAAO;oBACjC,qBAAqB,EAAE,OAAO;oBAC9B,8BAA8B,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,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;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.e676d07",
|
|
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.58.0",
|
|
40
|
-
"oxlint-tsgolint": "^0.20.0"
|
|
35
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
36
|
+
"oxlint": "1.79.x",
|
|
37
|
+
"oxlint-tsgolint": "7.0.x"
|
|
41
38
|
},
|
|
42
39
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^24.
|
|
44
|
-
"@4mbl/tsconfig": "0.0.0-alpha.
|
|
40
|
+
"@types/node": "^24.13.3",
|
|
41
|
+
"@4mbl/tsconfig": "0.0.0-alpha.e676d07"
|
|
45
42
|
},
|
|
46
43
|
"scripts": {
|
|
47
44
|
"build": "tsc"
|