eslint-plugin-react-web-api 2.0.0-next.9 → 2.0.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/README.md +20 -17
- package/dist/index.d.ts +16 -45
- package/dist/index.js +604 -697
- package/package.json +17 -26
package/README.md
CHANGED
|
@@ -17,27 +17,30 @@ npm install --save-dev eslint-plugin-react-web-api
|
|
|
17
17
|
// @ts-check
|
|
18
18
|
import js from "@eslint/js";
|
|
19
19
|
import reactWebApi from "eslint-plugin-react-web-api";
|
|
20
|
+
import { defineConfig } from "eslint/config";
|
|
20
21
|
import tseslint from "typescript-eslint";
|
|
21
22
|
|
|
22
|
-
export default
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
export default defineConfig([
|
|
24
|
+
{
|
|
25
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
26
|
+
extends: [
|
|
27
|
+
js.configs.recommended,
|
|
28
|
+
tseslint.configs.recommended,
|
|
29
|
+
reactWebApi.configs.recommended,
|
|
30
|
+
],
|
|
31
|
+
languageOptions: {
|
|
32
|
+
parser: tseslint.parser,
|
|
33
|
+
parserOptions: {
|
|
34
|
+
projectService: true,
|
|
35
|
+
tsconfigRootDir: import.meta.dirname,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
rules: {
|
|
39
|
+
// Put rules you want to override here
|
|
40
|
+
"react-web-api/no-leaked-event-listener": "warn",
|
|
34
41
|
},
|
|
35
42
|
},
|
|
36
|
-
|
|
37
|
-
// Put rules you want to override here
|
|
38
|
-
"react-web-api/no-leaked-event-listener": "warn",
|
|
39
|
-
},
|
|
40
|
-
});
|
|
43
|
+
]);
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
## Rules
|
package/dist/index.d.ts
CHANGED
|
@@ -1,49 +1,20 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { RulePreset } from '@eslint-react/kit';
|
|
3
|
-
|
|
4
|
-
type MessageID$3 = "expectedClearTimeoutInCleanup" | "expectedClearTimeoutInUnmount" | "expectedTimeoutId";
|
|
5
|
-
|
|
6
|
-
type MessageID$2 = "expectedDisconnectInControlFlow" | "expectedDisconnectOrUnobserveInCleanup" | "unexpectedFloatingInstance";
|
|
7
|
-
|
|
8
|
-
type MessageID$1 = "expectedClearIntervalInCleanup" | "expectedClearIntervalInUnmount" | "expectedIntervalId";
|
|
9
|
-
|
|
10
|
-
type MessageID = "expectedRemoveEventListenerInCleanup" | "expectedRemoveEventListenerInUnmount" | "unexpectedInlineFunction";
|
|
1
|
+
import * as _eslint_react_kit0 from "@eslint-react/kit";
|
|
11
2
|
|
|
3
|
+
//#region src/index.d.ts
|
|
12
4
|
declare const _default: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly version: string;
|
|
20
|
-
};
|
|
21
|
-
readonly rules: {
|
|
22
|
-
readonly "no-leaked-event-listener": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
23
|
-
readonly "no-leaked-interval": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
24
|
-
readonly "no-leaked-resize-observer": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$2, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
25
|
-
readonly "no-leaked-timeout": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$3, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
name: string;
|
|
30
|
-
rules: RulePreset;
|
|
31
|
-
};
|
|
32
|
-
"recommended-legacy": {
|
|
33
|
-
plugins: string[];
|
|
34
|
-
rules: RulePreset;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
meta: {
|
|
38
|
-
readonly name: string;
|
|
39
|
-
readonly version: string;
|
|
40
|
-
};
|
|
41
|
-
rules: {
|
|
42
|
-
readonly "no-leaked-event-listener": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
43
|
-
readonly "no-leaked-interval": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
44
|
-
readonly "no-leaked-resize-observer": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$2, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
45
|
-
readonly "no-leaked-timeout": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$3, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
5
|
+
configs: {
|
|
6
|
+
recommended: {
|
|
7
|
+
plugins: {};
|
|
8
|
+
name?: string;
|
|
9
|
+
rules?: Record<string, _eslint_react_kit0.RuleConfig>;
|
|
10
|
+
settings?: _eslint_react_kit0.SettingsConfig;
|
|
46
11
|
};
|
|
12
|
+
};
|
|
13
|
+
meta: {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
};
|
|
17
|
+
rules: Record<string, _eslint_react_kit0.CompatibleRule>;
|
|
47
18
|
};
|
|
48
|
-
|
|
49
|
-
export { _default as default };
|
|
19
|
+
//#endregion
|
|
20
|
+
export { _default as default };
|