chayns-toolkit 2.0.0-beta.12 → 2.0.0-beta.15

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/babel.js CHANGED
@@ -1,70 +1,70 @@
1
- const { declare } = require("@babel/helper-plugin-utils")
2
-
3
- module.exports = declare((api, options) => {
4
- api.assertVersion(7)
5
-
6
- const env = process.env.BABEL_ENV || process.env.NODE_ENV
7
-
8
- const {
9
- typescriptSupport = false,
10
- flowSupport = false,
11
- transpileModules = false,
12
- reactRefreshSupport = true,
13
- } = options
14
-
15
- if (env === "test") {
16
- return { presets: [["@babel/env", { targets: { node: "current" } }]] }
17
- }
18
-
19
- return {
20
- presets: [
21
- [
22
- "@babel/env",
23
- {
24
- loose: true,
25
- bugfixes: true,
26
- modules: transpileModules,
27
- exclude: ["transform-typeof-symbol"],
28
- useBuiltIns: "usage",
29
- corejs: 3,
30
- },
31
- ],
32
- [
33
- "@babel/react",
34
- {
35
- runtime: "automatic",
36
- development: env !== "production",
37
- },
38
- ],
39
- flowSupport && "@babel/flow",
40
- typescriptSupport && "@babel/typescript",
41
- ].filter(Boolean),
42
- plugins: [
43
- "macros",
44
- "optimize-clsx",
45
- [
46
- "@babel/transform-runtime",
47
- {
48
- // eslint-disable-next-line global-require
49
- version: require("@babel/runtime/package.json").version,
50
- corejs: false,
51
- regenerator: true,
52
- },
53
- ],
54
- typescriptSupport && [
55
- "@babel/proposal-decorators",
56
- { legacy: true },
57
- ],
58
- env === "production" && "transform-react-remove-prop-types",
59
- reactRefreshSupport &&
60
- env !== "production" &&
61
- "react-refresh/babel",
62
- [
63
- "@babel/plugin-transform-spread",
64
- {
65
- loose: false,
66
- },
67
- ],
68
- ].filter(Boolean),
69
- }
70
- })
1
+ const { declare } = require("@babel/helper-plugin-utils")
2
+
3
+ module.exports = declare((api, options) => {
4
+ api.assertVersion(7)
5
+
6
+ const env = process.env.BABEL_ENV || process.env.NODE_ENV
7
+
8
+ const {
9
+ typescriptSupport = false,
10
+ flowSupport = false,
11
+ transpileModules = false,
12
+ reactRefreshSupport = true,
13
+ } = options
14
+
15
+ if (env === "test") {
16
+ return { presets: [["@babel/env", { targets: { node: "current" } }]] }
17
+ }
18
+
19
+ return {
20
+ presets: [
21
+ [
22
+ "@babel/env",
23
+ {
24
+ loose: true,
25
+ bugfixes: true,
26
+ modules: transpileModules,
27
+ exclude: ["transform-typeof-symbol"],
28
+ useBuiltIns: "usage",
29
+ corejs: 3,
30
+ },
31
+ ],
32
+ [
33
+ "@babel/react",
34
+ {
35
+ runtime: "automatic",
36
+ development: env !== "production",
37
+ },
38
+ ],
39
+ flowSupport && "@babel/flow",
40
+ typescriptSupport && "@babel/typescript",
41
+ ].filter(Boolean),
42
+ plugins: [
43
+ "macros",
44
+ "optimize-clsx",
45
+ [
46
+ "@babel/transform-runtime",
47
+ {
48
+ // eslint-disable-next-line global-require
49
+ version: require("@babel/runtime/package.json").version,
50
+ corejs: false,
51
+ regenerator: true,
52
+ },
53
+ ],
54
+ typescriptSupport && [
55
+ "@babel/proposal-decorators",
56
+ { legacy: true },
57
+ ],
58
+ env === "production" && "transform-react-remove-prop-types",
59
+ reactRefreshSupport &&
60
+ env !== "production" &&
61
+ "react-refresh/babel",
62
+ [
63
+ "@babel/plugin-transform-spread",
64
+ {
65
+ loose: false,
66
+ },
67
+ ],
68
+ ].filter(Boolean),
69
+ }
70
+ })
package/eslint/index.js CHANGED
@@ -20,6 +20,9 @@ module.exports = {
20
20
  globals: { chayns: true },
21
21
  rules: { ...sharedRules, ...javascriptRules },
22
22
  parser: "@babel/eslint-parser",
23
+ parserOptions: {
24
+ requireConfigFile: false,
25
+ },
23
26
  settings: {
24
27
  "import/resolver": {
25
28
  typescript: { project: "@(jsconfig|tsconfig).json" },