@4mbl/lint 1.0.0-beta.3 → 1.0.0-beta.31
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 +184 -0
- package/bin/cli.js +31 -3
- package/dist/base.d.ts +302 -212
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +161 -108
- package/dist/base.js.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -0
- 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 +2 -248
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +11 -3
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +2 -360
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +55 -31
- package/dist/react.js.map +1 -1
- package/package.json +5 -10
package/dist/react.js
CHANGED
|
@@ -1,26 +1,66 @@
|
|
|
1
1
|
import { defineConfig } from 'oxlint';
|
|
2
2
|
import { baseConfig } from './base.js';
|
|
3
|
+
import { extendConfig } from './config.js';
|
|
3
4
|
// const DEFAULT_OPTIONS: ReactOptions = {};
|
|
4
|
-
function reactConfig(
|
|
5
|
+
function reactConfig(options) {
|
|
5
6
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
plugins: ['react'],
|
|
9
|
-
jsPlugins: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const base = baseConfig(options);
|
|
8
|
+
return extendConfig(base, {
|
|
9
|
+
plugins: ['react', 'jsx-a11y'],
|
|
10
|
+
jsPlugins: [],
|
|
11
|
+
env: {
|
|
12
|
+
browser: true,
|
|
13
|
+
node: true,
|
|
14
|
+
},
|
|
15
|
+
globals: {
|
|
16
|
+
AudioWorkletGlobalScope: 'readonly',
|
|
17
|
+
AudioWorkletProcessor: 'readonly',
|
|
18
|
+
currentFrame: 'readonly',
|
|
19
|
+
currentTime: 'readonly',
|
|
20
|
+
registerProcessor: 'readonly',
|
|
21
|
+
sampleRate: 'readonly',
|
|
22
|
+
WorkletGlobalScope: 'readonly',
|
|
23
|
+
},
|
|
14
24
|
rules: {
|
|
15
|
-
'react
|
|
16
|
-
'react
|
|
17
|
-
|
|
18
|
-
'react
|
|
19
|
-
'react
|
|
25
|
+
'react/rules-of-hooks': 'error',
|
|
26
|
+
'react/exhaustive-deps': 'warn',
|
|
27
|
+
// react compiler rules
|
|
28
|
+
'react/error-boundaries': 'error',
|
|
29
|
+
'react/globals': 'error',
|
|
30
|
+
'react/immutability': 'error',
|
|
31
|
+
'react/incompatible-library': 'error',
|
|
32
|
+
'react/preserve-manual-memoization': 'error',
|
|
33
|
+
'react/purity': 'error',
|
|
34
|
+
'react/refs': 'error',
|
|
35
|
+
'react/set-state-in-effect': 'error',
|
|
36
|
+
'react/set-state-in-render': 'error',
|
|
37
|
+
'react/static-components': 'error',
|
|
38
|
+
'react/use-memo': 'error',
|
|
39
|
+
'react/void-use-memo': 'error',
|
|
40
|
+
'react/capitalized-calls': 'error',
|
|
41
|
+
'react/exhaustive-effect-dependencies': 'error',
|
|
42
|
+
'react/hooks': 'error',
|
|
43
|
+
'react/memo-dependencies': 'error',
|
|
44
|
+
'react/no-deriving-state-in-effects': 'error',
|
|
45
|
+
'react/invariant': 'error',
|
|
46
|
+
'react/rule-suppression': 'error',
|
|
47
|
+
'react/syntax': 'error',
|
|
48
|
+
'react/todo': 'error',
|
|
49
|
+
'react/unsupported-syntax': 'error',
|
|
50
|
+
'react/only-export-components': 'error',
|
|
51
|
+
'import/no-anonymous-default-export': 'warn',
|
|
52
|
+
'react/jsx-filename-extension': 'off',
|
|
53
|
+
'react/jsx-max-depth': 'off',
|
|
54
|
+
'react/no-multi-comp': 'off',
|
|
55
|
+
'react/jsx-props-no-spreading': 'off',
|
|
56
|
+
'react/jsx-no-literals': 'off',
|
|
57
|
+
// conflicts with tailwind
|
|
58
|
+
'react/forbid-component-props': 'off',
|
|
59
|
+
'react/forbid-dom-props': 'off',
|
|
20
60
|
},
|
|
21
61
|
overrides: [
|
|
22
62
|
{
|
|
23
|
-
files: ['**/*.{
|
|
63
|
+
files: ['**/*.{jsx,tsx}'],
|
|
24
64
|
rules: {
|
|
25
65
|
'react/display-name': 'error',
|
|
26
66
|
'react/jsx-key': 'error',
|
|
@@ -30,7 +70,6 @@ function reactConfig(_options) {
|
|
|
30
70
|
'react/jsx-no-undef': 'error',
|
|
31
71
|
'react/no-children-prop': 'error',
|
|
32
72
|
'react/no-danger-with-children': 'error',
|
|
33
|
-
// "react/no-deprecated": "error", // not implemented yet in oxlint
|
|
34
73
|
'react/no-direct-mutation-state': 'error',
|
|
35
74
|
'react/no-find-dom-node': 'error',
|
|
36
75
|
'react/no-is-mounted': 'error',
|
|
@@ -41,7 +80,6 @@ function reactConfig(_options) {
|
|
|
41
80
|
'react/no-unsafe': 'off',
|
|
42
81
|
'react/react-in-jsx-scope': 'off',
|
|
43
82
|
'react/require-render-return': 'error',
|
|
44
|
-
'import/no-anonymous-default-export': 'warn',
|
|
45
83
|
'jsx-a11y/alt-text': ['warn', { elements: ['img'], img: ['Image'] }],
|
|
46
84
|
'jsx-a11y/aria-props': 'warn',
|
|
47
85
|
'jsx-a11y/aria-proptypes': 'warn',
|
|
@@ -49,20 +87,6 @@ function reactConfig(_options) {
|
|
|
49
87
|
'jsx-a11y/role-has-required-aria-props': 'warn',
|
|
50
88
|
'jsx-a11y/role-supports-aria-props': 'warn',
|
|
51
89
|
},
|
|
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
90
|
},
|
|
67
91
|
],
|
|
68
92
|
});
|
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;
|
|
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;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,4CAA4C;AAE5C,SAAS,WAAW,CAAC,OAA+B;IAClD,mDAAmD;IAEnD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjC,OAAO,YAAY,CAAC,IAAI,EAAE;QACxB,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;QAC9B,SAAS,EAAE,EAAE;QACb,GAAG,EAAE;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,IAAI;SACX;QACD,OAAO,EAAE;YACP,uBAAuB,EAAE,UAAU;YACnC,qBAAqB,EAAE,UAAU;YACjC,YAAY,EAAE,UAAU;YACxB,WAAW,EAAE,UAAU;YACvB,iBAAiB,EAAE,UAAU;YAC7B,UAAU,EAAE,UAAU;YACtB,kBAAkB,EAAE,UAAU;SAC/B;QACD,KAAK,EAAE;YACL,sBAAsB,EAAE,OAAO;YAC/B,uBAAuB,EAAE,MAAM;YAE/B,uBAAuB;YACvB,wBAAwB,EAAE,OAAO;YACjC,eAAe,EAAE,OAAO;YACxB,oBAAoB,EA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AE,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": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.31",
|
|
4
4
|
"description": "Linting configuration for various environments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "4mbl",
|
|
@@ -31,17 +31,12 @@
|
|
|
31
31
|
"lint"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"eslint-plugin-react-refresh": "^0.5.2",
|
|
37
|
-
"globals": "^17.4.0",
|
|
38
|
-
"jiti": "^2.6.1",
|
|
39
|
-
"oxlint": "^1.56.0",
|
|
40
|
-
"oxlint-tsgolint": "^0.17.0"
|
|
34
|
+
"oxlint": "1.80.x",
|
|
35
|
+
"oxlint-tsgolint": "7.0.x"
|
|
41
36
|
},
|
|
42
37
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^24.
|
|
44
|
-
"@4mbl/tsconfig": "
|
|
38
|
+
"@types/node": "^24.13.3",
|
|
39
|
+
"@4mbl/tsconfig": "5.0.0-beta.3"
|
|
45
40
|
},
|
|
46
41
|
"scripts": {
|
|
47
42
|
"build": "tsc"
|