@xylabs/eslint-config-react-flat 3.13.4
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/dist/neutral/index.cjs +70 -0
- package/dist/neutral/index.cjs.map +1 -0
- package/dist/neutral/index.d.cts +4 -0
- package/dist/neutral/index.d.cts.map +1 -0
- package/dist/neutral/index.d.mts +4 -0
- package/dist/neutral/index.d.mts.map +1 -0
- package/dist/neutral/index.d.ts +4 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.js +39 -0
- package/dist/neutral/index.js.map +1 -0
- package/dist/neutral/react/index.d.cts +3 -0
- package/dist/neutral/react/index.d.cts.map +1 -0
- package/dist/neutral/react/index.d.mts +3 -0
- package/dist/neutral/react/index.d.mts.map +1 -0
- package/dist/neutral/react/index.d.ts +3 -0
- package/dist/neutral/react/index.d.ts.map +1 -0
- package/dist/node/index.cjs +75 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +4 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.mts +4 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +39 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/react/index.d.cts +3 -0
- package/dist/node/react/index.d.cts.map +1 -0
- package/dist/node/react/index.d.mts +3 -0
- package/dist/node/react/index.d.mts.map +1 -0
- package/dist/node/react/index.d.ts +3 -0
- package/dist/node/react/index.d.ts.map +1 -0
- package/package.json +75 -0
- package/src/index.ts +8 -0
- package/src/react/index.ts +29 -0
- package/src/types.d.ts +7 -0
- package/tsconfig.json +9 -0
- package/tsconfig.test.json +4 -0
- package/xy.config.ts +8 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
config: () => config,
|
|
34
|
+
reactConfig: () => reactConfig
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
37
|
+
var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
38
|
+
|
|
39
|
+
// src/react/index.ts
|
|
40
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
41
|
+
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
42
|
+
var reactConfig = {
|
|
43
|
+
plugins: {
|
|
44
|
+
react: import_eslint_plugin_react.default,
|
|
45
|
+
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
46
|
+
},
|
|
47
|
+
files: ["*.tsx"],
|
|
48
|
+
rules: {
|
|
49
|
+
...import_eslint_plugin_react.default.configs.recommended.rules,
|
|
50
|
+
...import_eslint_plugin_react_hooks.default.configs.recommended.rules,
|
|
51
|
+
"import/no-nodejs-modules": ["error"],
|
|
52
|
+
"react-hooks/exhaustive-deps": [
|
|
53
|
+
"warn",
|
|
54
|
+
{
|
|
55
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"react/prop-types": ["off"],
|
|
59
|
+
"react/react-in-jsx-scope": ["warn"]
|
|
60
|
+
},
|
|
61
|
+
settings: {
|
|
62
|
+
react: {
|
|
63
|
+
version: "detect"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/index.ts
|
|
69
|
+
var config = [...import_eslint_config_flat.config, reactConfig];
|
|
70
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.recommended.rules,\n ...reactHooksPlugin.configs.recommended.rules,\n 'import/no-nodejs-modules': ['error'],\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA,IACP,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,YAAY;AAAA,IACnC,GAAG,iCAAAC,QAAiB,QAAQ,YAAY;AAAA,IACxC,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;ADvBO,IAAM,SAA8B,CAAC,GAAG,0BAAAC,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","xyConfig"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
|
+
|
|
4
|
+
// src/react/index.ts
|
|
5
|
+
import reactPlugin from "eslint-plugin-react";
|
|
6
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
7
|
+
var reactConfig = {
|
|
8
|
+
plugins: {
|
|
9
|
+
react: reactPlugin,
|
|
10
|
+
"react-hooks": reactHooksPlugin
|
|
11
|
+
},
|
|
12
|
+
files: ["*.tsx"],
|
|
13
|
+
rules: {
|
|
14
|
+
...reactPlugin.configs.recommended.rules,
|
|
15
|
+
...reactHooksPlugin.configs.recommended.rules,
|
|
16
|
+
"import/no-nodejs-modules": ["error"],
|
|
17
|
+
"react-hooks/exhaustive-deps": [
|
|
18
|
+
"warn",
|
|
19
|
+
{
|
|
20
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"react/prop-types": ["off"],
|
|
24
|
+
"react/react-in-jsx-scope": ["warn"]
|
|
25
|
+
},
|
|
26
|
+
settings: {
|
|
27
|
+
react: {
|
|
28
|
+
version: "detect"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/index.ts
|
|
34
|
+
var config = [...xyConfig, reactConfig];
|
|
35
|
+
export {
|
|
36
|
+
config,
|
|
37
|
+
reactConfig
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.recommended.rules,\n ...reactHooksPlugin.configs.recommended.rules,\n 'import/no-nodejs-modules': ['error'],\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA,IACP,eAAe;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,YAAY;AAAA,IACnC,GAAG,iBAAiB,QAAQ,YAAY;AAAA,IACxC,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;ADvBO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
config: () => config,
|
|
34
|
+
reactConfig: () => reactConfig
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
37
|
+
var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
38
|
+
|
|
39
|
+
// src/react/index.ts
|
|
40
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
41
|
+
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
42
|
+
var reactConfig = {
|
|
43
|
+
plugins: {
|
|
44
|
+
react: import_eslint_plugin_react.default,
|
|
45
|
+
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
46
|
+
},
|
|
47
|
+
files: ["*.tsx"],
|
|
48
|
+
rules: {
|
|
49
|
+
...import_eslint_plugin_react.default.configs.recommended.rules,
|
|
50
|
+
...import_eslint_plugin_react_hooks.default.configs.recommended.rules,
|
|
51
|
+
"import/no-nodejs-modules": ["error"],
|
|
52
|
+
"react-hooks/exhaustive-deps": [
|
|
53
|
+
"warn",
|
|
54
|
+
{
|
|
55
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"react/prop-types": ["off"],
|
|
59
|
+
"react/react-in-jsx-scope": ["warn"]
|
|
60
|
+
},
|
|
61
|
+
settings: {
|
|
62
|
+
react: {
|
|
63
|
+
version: "detect"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/index.ts
|
|
69
|
+
var config = [...import_eslint_config_flat.config, reactConfig];
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
config,
|
|
73
|
+
reactConfig
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.recommended.rules,\n ...reactHooksPlugin.configs.recommended.rules,\n 'import/no-nodejs-modules': ['error'],\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA,IACP,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,YAAY;AAAA,IACnC,GAAG,iCAAAC,QAAiB,QAAQ,YAAY;AAAA,IACxC,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;ADvBO,IAAM,SAA8B,CAAC,GAAG,0BAAAC,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","xyConfig"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
|
+
|
|
4
|
+
// src/react/index.ts
|
|
5
|
+
import reactPlugin from "eslint-plugin-react";
|
|
6
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
7
|
+
var reactConfig = {
|
|
8
|
+
plugins: {
|
|
9
|
+
react: reactPlugin,
|
|
10
|
+
"react-hooks": reactHooksPlugin
|
|
11
|
+
},
|
|
12
|
+
files: ["*.tsx"],
|
|
13
|
+
rules: {
|
|
14
|
+
...reactPlugin.configs.recommended.rules,
|
|
15
|
+
...reactHooksPlugin.configs.recommended.rules,
|
|
16
|
+
"import/no-nodejs-modules": ["error"],
|
|
17
|
+
"react-hooks/exhaustive-deps": [
|
|
18
|
+
"warn",
|
|
19
|
+
{
|
|
20
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"react/prop-types": ["off"],
|
|
24
|
+
"react/react-in-jsx-scope": ["warn"]
|
|
25
|
+
},
|
|
26
|
+
settings: {
|
|
27
|
+
react: {
|
|
28
|
+
version: "detect"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/index.ts
|
|
34
|
+
var config = [...xyConfig, reactConfig];
|
|
35
|
+
export {
|
|
36
|
+
config,
|
|
37
|
+
reactConfig
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.recommended.rules,\n ...reactHooksPlugin.configs.recommended.rules,\n 'import/no-nodejs-modules': ['error'],\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA,IACP,eAAe;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,YAAY;AAAA,IACnC,GAAG,iBAAiB,QAAQ,YAAY;AAAA,IACxC,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;ADvBO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAwBhC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json.schemastore.org/package.json",
|
|
3
|
+
"author": {
|
|
4
|
+
"email": "support@xylabs.com",
|
|
5
|
+
"name": "XY Labs Development Team",
|
|
6
|
+
"url": "https://xylabs.com"
|
|
7
|
+
},
|
|
8
|
+
"bugs": {
|
|
9
|
+
"email": "support@xylabs.com",
|
|
10
|
+
"url": "https://github.com/xylabs/eslint-config/issues"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@babel/plugin-syntax-flow": "^7.24.7",
|
|
14
|
+
"@babel/plugin-transform-react-jsx": "^7.24.7",
|
|
15
|
+
"@xylabs/eslint-config-flat": "^3.13.4",
|
|
16
|
+
"eslint-config-prettier": "^9.1.0",
|
|
17
|
+
"eslint-config-react-app": "^7.0.1",
|
|
18
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
19
|
+
"eslint-plugin-deprecation": "^3.0.0",
|
|
20
|
+
"eslint-plugin-import": "^2.29.1",
|
|
21
|
+
"eslint-plugin-json-es": "^1.6.0",
|
|
22
|
+
"eslint-plugin-md": "^1.0.19",
|
|
23
|
+
"eslint-plugin-no-secrets": "^1.0.2",
|
|
24
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
25
|
+
"eslint-plugin-react": "^7.34.4",
|
|
26
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
27
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
28
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
29
|
+
"eslint-plugin-workspaces": "^0.10.1",
|
|
30
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
31
|
+
"lodash": "^4.17.21",
|
|
32
|
+
"markdown-eslint-parser": "^1.2.1",
|
|
33
|
+
"prettier": "^3.3.3",
|
|
34
|
+
"remark-lint-maximum-line-length": "^4.0.1",
|
|
35
|
+
"remark-preset-lint-markdown-style-guide": "^6.0.0",
|
|
36
|
+
"typescript": "^5.5.3"
|
|
37
|
+
},
|
|
38
|
+
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/core": "^7.24.9",
|
|
41
|
+
"@types/node": "^20.14.11",
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^3.13.4",
|
|
43
|
+
"@xylabs/tsconfig": "^3.13.4",
|
|
44
|
+
"eslint": "^9.7.0",
|
|
45
|
+
"typescript": "^5.5.3"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"eslint": "*"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"eslint": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/xylabs/eslint-config.git",
|
|
56
|
+
"keywords": [
|
|
57
|
+
"xylabs",
|
|
58
|
+
"utility",
|
|
59
|
+
"typescript",
|
|
60
|
+
"eslint"
|
|
61
|
+
],
|
|
62
|
+
"license": "LGPL-3.0-only",
|
|
63
|
+
"main": "./dist/node/index.js",
|
|
64
|
+
"name": "@xylabs/eslint-config-react-flat",
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "https://github.com/xylabs/config.git"
|
|
71
|
+
},
|
|
72
|
+
"sideEffects": false,
|
|
73
|
+
"version": "3.13.4",
|
|
74
|
+
"type": "module"
|
|
75
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { config as xyConfig } from '@xylabs/eslint-config-flat'
|
|
2
|
+
import { Linter } from 'eslint'
|
|
3
|
+
|
|
4
|
+
import { reactConfig } from './react/index.js'
|
|
5
|
+
|
|
6
|
+
export const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]
|
|
7
|
+
|
|
8
|
+
export { reactConfig } from './react/index.js'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Linter } from 'eslint'
|
|
2
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
3
|
+
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
4
|
+
|
|
5
|
+
export const reactConfig: Linter.FlatConfig = {
|
|
6
|
+
plugins: {
|
|
7
|
+
react: reactPlugin,
|
|
8
|
+
'react-hooks': reactHooksPlugin,
|
|
9
|
+
},
|
|
10
|
+
files: ['*.tsx'],
|
|
11
|
+
rules: {
|
|
12
|
+
...reactPlugin.configs.recommended.rules,
|
|
13
|
+
...reactHooksPlugin.configs.recommended.rules,
|
|
14
|
+
'import/no-nodejs-modules': ['error'],
|
|
15
|
+
'react-hooks/exhaustive-deps': [
|
|
16
|
+
'warn',
|
|
17
|
+
{
|
|
18
|
+
additionalHooks: '(useAsyncEffect|usePromise)',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
'react/prop-types': ['off'],
|
|
22
|
+
'react/react-in-jsx-scope': ['warn'],
|
|
23
|
+
},
|
|
24
|
+
settings: {
|
|
25
|
+
react: {
|
|
26
|
+
version: 'detect',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}
|
package/src/types.d.ts
ADDED
package/tsconfig.json
ADDED