chayns-toolkit 2.0.0-beta.1 → 2.0.0-beta.13

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/package.json CHANGED
@@ -1,139 +1,143 @@
1
- {
2
- "name": "chayns-toolkit",
3
- "version": "2.0.0-beta.1",
4
- "description": "A zero-config toolchain for developing chayns® apps.",
5
- "keywords": [
6
- "chayns",
7
- "react",
8
- "chayns-components",
9
- "webpack"
10
- ],
11
- "homepage": "https://github.com/TobitSoftware/chayns-toolkit#readme",
12
- "bugs": {
13
- "url": "https://github.com/TobitSoftware/chayns-toolkit/issues",
14
- "email": "leonhard.driesch@tobit.com"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/TobitSoftware/chayns-toolkit.git",
19
- "directory": "packages/chayns-toolkit"
20
- },
21
- "license": "MIT",
22
- "author": {
23
- "name": "Leonhard Driesch",
24
- "email": "leonhard.driesch@tobit.com"
25
- },
26
- "bin": {
27
- "chayns-toolkit": "./cli.js"
28
- },
29
- "files": [
30
- "lib/*",
31
- "cli.js",
32
- "babel.js",
33
- "eslint.js"
34
- ],
35
- "scripts": {
36
- "build": "node ./scripts/build",
37
- "check-types": "tsc --noEmit",
38
- "dev": "node ./scripts/watch",
39
- "lint": "eslint src/ --ext js,jsx,ts,tsx",
40
- "prepublishOnly": "npm run build",
41
- "test": "jest",
42
- "format": "prettier . --write",
43
- "prepare": "husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks"
44
- },
45
- "dependencies": {
46
- "@babel/core": "^7.14.8",
47
- "@babel/helper-plugin-utils": "^7.14.5",
48
- "@babel/plugin-proposal-decorators": "^7.14.5",
49
- "@babel/plugin-transform-runtime": "^7.14.5",
50
- "@babel/preset-env": "^7.14.8",
51
- "@babel/preset-flow": "^7.14.5",
52
- "@babel/preset-react": "^7.14.5",
53
- "@babel/preset-typescript": "^7.14.5",
54
- "@babel/runtime": "^7.14.8",
55
- "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
56
- "@svgr/webpack": "^5.5.0",
57
- "@testing-library/jest-dom": "^5.14.1",
58
- "@typescript-eslint/eslint-plugin": "^4.28.4",
59
- "babel-eslint": "^10.1.0",
60
- "babel-jest": "^27.0.6",
61
- "babel-loader": "^8.2.2",
62
- "babel-plugin-macros": "^3.1.0",
63
- "babel-plugin-optimize-clsx": "^2.6.2",
64
- "babel-plugin-transform-imports": "^2.0.0",
65
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
66
- "clean-webpack-plugin": "^3.0.0",
67
- "core-js": "^3.15.2",
68
- "css-loader": "^6.2.0",
69
- "cssnano": "^4.1.11",
70
- "dotenv-webpack": "^7.0.3",
71
- "eslint": "^7.31.0",
72
- "eslint-config-airbnb": "^18.2.1",
73
- "eslint-config-airbnb-typescript": "^12.3.1",
74
- "eslint-config-prettier": "^8.3.0",
75
- "eslint-formatter-pretty": "^4.1.0",
76
- "eslint-import-resolver-typescript": "^2.4.0",
77
- "eslint-plugin-import": "^2.23.4",
78
- "eslint-plugin-jest": "^24.4.0",
79
- "eslint-plugin-jsx-a11y": "^6.4.1",
80
- "eslint-plugin-react": "^7.24.0",
81
- "eslint-plugin-react-hooks": "^4.2.0",
82
- "html-webpack-plugin": "^5.3.2",
83
- "jest": "^27.0.6",
84
- "mini-css-extract-plugin": "^2.1.0",
85
- "postcss": "^7.0.36",
86
- "postcss-flexbugs-fixes": "^4.2.1",
87
- "postcss-loader": "^4.3.0",
88
- "postcss-preset-env": "^6.7.0",
89
- "react-refresh": "^0.10.0",
90
- "sass": "^1.35.2",
91
- "sass-loader": "^12.1.0",
92
- "source-map-loader": "^3.0.0",
93
- "style-loader": "^3.2.1",
94
- "tcp-port-used": "^1.0.2",
95
- "tsconfig-paths-webpack-plugin": "^3.5.1",
96
- "webpack": "^5.46.0",
97
- "webpack-bundle-analyzer": "^4.4.2",
98
- "webpack-dev-server": "^3.11.2"
99
- },
100
- "devDependencies": {
101
- "@types/cli-table": "^0.3.0",
102
- "@types/cssnano": "^4.0.1",
103
- "@types/dotenv-webpack": "^7.0.3",
104
- "@types/eslint": "^7.28.0",
105
- "@types/mini-css-extract-plugin": "^2.0.1",
106
- "@types/mock-fs": "^4.13.1",
107
- "@types/node": "^16.4.1",
108
- "@types/postcss-flexbugs-fixes": "^4.2.1",
109
- "@types/postcss-preset-env": "^6.7.3",
110
- "@types/semver": "^7.3.7",
111
- "@types/tcp-port-used": "^1.0.0",
112
- "@types/webpack-bundle-analyzer": "^4.4.1",
113
- "@types/webpack-dev-server": "^3.11.5",
114
- "chalk": "^4.1.1",
115
- "cli-table": "^0.3.6",
116
- "commander": "^8.0.0",
117
- "cross-env": "^7.0.3",
118
- "esbuild": "^0.12.15",
119
- "fast-glob": "^3.2.7",
120
- "fs-extra": "^10.0.0",
121
- "husky": "^7.0.1",
122
- "mock-fs": "^5.0.0",
123
- "param-case": "^3.0.4",
124
- "prettier": "^2.3.2",
125
- "prettier-plugin-packagejson": "^2.2.11",
126
- "pretty-quick": "^3.1.1",
127
- "semver": "^7.3.5",
128
- "shx": "^0.3.3",
129
- "type-fest": "^1.2.2",
130
- "typescript": "^4.3.5",
131
- "yup": "^0.32.9"
132
- },
133
- "engines": {
134
- "node": ">=12.10.0"
135
- },
136
- "publishConfig": {
137
- "access": "public"
138
- }
139
- }
1
+ {
2
+ "name": "chayns-toolkit",
3
+ "version": "2.0.0-beta.13",
4
+ "description": "A zero-config toolchain for developing chayns® apps.",
5
+ "keywords": [
6
+ "chayns",
7
+ "react",
8
+ "chayns-components",
9
+ "webpack"
10
+ ],
11
+ "homepage": "https://github.com/TobitSoftware/chayns-toolkit#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/TobitSoftware/chayns-toolkit/issues",
14
+ "email": "leonhard.driesch@tobit.com"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/TobitSoftware/chayns-toolkit.git",
19
+ "directory": "packages/chayns-toolkit"
20
+ },
21
+ "license": "MIT",
22
+ "author": {
23
+ "name": "Leonhard Driesch",
24
+ "email": "leonhard.driesch@tobit.com"
25
+ },
26
+ "bin": {
27
+ "chayns-toolkit": "./cli.js"
28
+ },
29
+ "files": [
30
+ "lib/*",
31
+ "eslint/*",
32
+ "cli.js",
33
+ "babel.js"
34
+ ],
35
+ "scripts": {
36
+ "build": "node ./scripts/build",
37
+ "build-docs": "npm --prefix website i && npm --prefix website run build",
38
+ "check-types": "tsc --noEmit",
39
+ "dev": "node ./scripts/watch",
40
+ "format": "prettier . --write",
41
+ "lint": "eslint src/ --ext js,jsx,ts,tsx",
42
+ "prepare": "husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks",
43
+ "prepublishOnly": "npm run build",
44
+ "test": "jest"
45
+ },
46
+ "dependencies": {
47
+ "@babel/core": "^7.16.0",
48
+ "@babel/eslint-parser": "^7.16.3",
49
+ "@babel/helper-plugin-utils": "^7.14.5",
50
+ "@babel/plugin-proposal-decorators": "^7.16.4",
51
+ "@babel/plugin-transform-runtime": "^7.16.4",
52
+ "@babel/preset-env": "^7.16.4",
53
+ "@babel/preset-flow": "^7.16.0",
54
+ "@babel/preset-react": "^7.16.0",
55
+ "@babel/preset-typescript": "^7.16.0",
56
+ "@babel/runtime": "^7.16.3",
57
+ "@chayns-toolkit/eslint-config": "^2.0.0",
58
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
59
+ "@svgr/webpack": "^6.0.0",
60
+ "@testing-library/jest-dom": "^5.15.1",
61
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
62
+ "@typescript-eslint/parser": "^5.4.0",
63
+ "babel-jest": "^27.3.1",
64
+ "babel-loader": "^8.2.3",
65
+ "babel-plugin-macros": "^3.1.0",
66
+ "babel-plugin-optimize-clsx": "^2.6.2",
67
+ "babel-plugin-transform-imports": "^2.0.0",
68
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
69
+ "clean-webpack-plugin": "^4.0.0",
70
+ "core-js": "^3.19.1",
71
+ "css-loader": "^6.5.1",
72
+ "cssnano": "^5.0.12",
73
+ "dotenv-webpack": "^7.0.3",
74
+ "eslint": "^8.3.0",
75
+ "eslint-config-airbnb": "^19.0.1",
76
+ "eslint-config-airbnb-typescript": "^16.0.0",
77
+ "eslint-config-prettier": "^8.3.0",
78
+ "eslint-formatter-pretty": "^4.1.0",
79
+ "eslint-import-resolver-typescript": "^2.5.0",
80
+ "eslint-plugin-import": "^2.25.3",
81
+ "eslint-plugin-jest": "^25.3.0",
82
+ "eslint-plugin-jsx-a11y": "^6.5.1",
83
+ "eslint-plugin-react": "^7.27.1",
84
+ "eslint-plugin-react-hooks": "^4.3.0",
85
+ "html-webpack-plugin": "^5.5.0",
86
+ "jest": "^27.3.1",
87
+ "mini-css-extract-plugin": "^2.4.5",
88
+ "postcss": "^8.4.4",
89
+ "postcss-flexbugs-fixes": "^5.0.2",
90
+ "postcss-loader": "^6.2.1",
91
+ "postcss-prefix-selector": "^1.14.0",
92
+ "postcss-preset-env": "^7.0.1",
93
+ "react-refresh": "^0.11.0",
94
+ "sass": "^1.43.5",
95
+ "sass-loader": "^12.3.0",
96
+ "source-map-loader": "^3.0.0",
97
+ "style-loader": "^3.3.1",
98
+ "tcp-port-used": "^1.0.2",
99
+ "tsconfig-paths-webpack-plugin": "^3.5.2",
100
+ "webpack": "^5.64.4",
101
+ "webpack-bundle-analyzer": "^4.5.0",
102
+ "webpack-dev-server": "^4.6.0"
103
+ },
104
+ "devDependencies": {
105
+ "@types/cli-table": "^0.3.0",
106
+ "@types/cssnano": "^4.0.1",
107
+ "@types/dotenv-webpack": "^7.0.3",
108
+ "@types/eslint": "^8.2.0",
109
+ "@types/mini-css-extract-plugin": "^2.4.0",
110
+ "@types/mock-fs": "^4.13.1",
111
+ "@types/node": "^16.11.10",
112
+ "@types/postcss-flexbugs-fixes": "^4.2.1",
113
+ "@types/postcss-preset-env": "^6.7.3",
114
+ "@types/semver": "^7.3.9",
115
+ "@types/tcp-port-used": "^1.0.0",
116
+ "@types/webpack-bundle-analyzer": "^4.4.1",
117
+ "@types/webpack-dev-server": "^4.5.0",
118
+ "chalk": "^4.1.2",
119
+ "cli-table": "^0.3.9",
120
+ "commander": "^8.3.0",
121
+ "cross-env": "^7.0.3",
122
+ "esbuild": "^0.14.0",
123
+ "fast-glob": "^3.2.7",
124
+ "fs-extra": "^10.0.0",
125
+ "husky": "^7.0.4",
126
+ "mock-fs": "^5.1.2",
127
+ "param-case": "^3.0.4",
128
+ "prettier": "^2.5.0",
129
+ "prettier-plugin-packagejson": "^2.2.15",
130
+ "pretty-quick": "^3.1.2",
131
+ "semver": "^7.3.5",
132
+ "shx": "^0.3.3",
133
+ "type-fest": "^2.6.0",
134
+ "typescript": "^4.5.2",
135
+ "yup": "^0.32.11"
136
+ },
137
+ "engines": {
138
+ "node": ">=12.10.0"
139
+ },
140
+ "publishConfig": {
141
+ "access": "public"
142
+ }
143
+ }
package/eslint.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./lib/eslint")
package/lib/eslint.js DELETED
@@ -1,150 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __commonJS = (cb, mod) => function __require() {
21
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
22
- };
23
-
24
- // src/eslint/javascriptRules.js
25
- var require_javascriptRules = __commonJS({
26
- "src/eslint/javascriptRules.js"(exports2, module2) {
27
- var javascriptRules2 = {
28
- "no-use-before-define": [
29
- "error",
30
- { functions: false, classes: false, variables: false }
31
- ]
32
- };
33
- module2.exports = javascriptRules2;
34
- }
35
- });
36
-
37
- // src/eslint/sharedRules.js
38
- var require_sharedRules = __commonJS({
39
- "src/eslint/sharedRules.js"(exports2, module2) {
40
- var sharedRules2 = {
41
- "import/extensions": [
42
- "error",
43
- "always",
44
- { js: "never", jsx: "never", ts: "never", tsx: "never" }
45
- ],
46
- "import/no-unresolved": ["error", { ignore: ["chayns-components"] }],
47
- "import/prefer-default-export": "off",
48
- "jsx-a11y/anchor-has-content": "off",
49
- "jsx-a11y/anchor-is-valid": "off",
50
- "jsx-a11y/click-events-have-key-events": "off",
51
- "jsx-a11y/heading-has-content": "off",
52
- "jsx-a11y/href-no-hash": "off",
53
- "jsx-a11y/no-noninteractive-element-interactions": "off",
54
- "jsx-a11y/no-static-element-interactions": "off",
55
- "no-console": ["warn", { allow: ["warn", "error"] }],
56
- "no-param-reassign": [
57
- "error",
58
- { ignorePropertyModificationsFor: ["draft"], props: true }
59
- ],
60
- "no-plusplus": "off",
61
- "no-restricted-imports": [
62
- "error",
63
- {
64
- message: "Use 'chayns-components' instead to enable tree-shaking.",
65
- name: "chayns-components/lib"
66
- }
67
- ],
68
- "react/no-danger": "off"
69
- };
70
- module2.exports = sharedRules2;
71
- }
72
- });
73
-
74
- // src/eslint/typescriptRules.js
75
- var require_typescriptRules = __commonJS({
76
- "src/eslint/typescriptRules.js"(exports2, module2) {
77
- var typescriptRules2 = {
78
- "react/prop-types": "off",
79
- "react/require-default-props": "off",
80
- "@typescript-eslint/no-use-before-define": [
81
- "error",
82
- { functions: false, classes: false, variables: false, enums: false }
83
- ],
84
- "@typescript-eslint/ban-ts-comment": [
85
- "error",
86
- {
87
- "ts-expect-error": "allow-with-description",
88
- "ts-ignore": true,
89
- "ts-nocheck": true,
90
- "ts-check": true,
91
- minimumDescriptionLength: 4
92
- }
93
- ]
94
- };
95
- module2.exports = typescriptRules2;
96
- }
97
- });
98
-
99
- // src/eslint/index.js
100
- var path = require("path");
101
- var javascriptRules = require_javascriptRules();
102
- var sharedRules = require_sharedRules();
103
- var typescriptRules = require_typescriptRules();
104
- var packageJson = require(path.resolve("package.json"));
105
- var usesTypeScript = Object.keys(__spreadValues(__spreadValues({}, packageJson.dependencies), packageJson.devDependencies)).includes("typescript");
106
- module.exports = {
107
- env: {
108
- browser: true,
109
- es6: true
110
- },
111
- extends: ["airbnb", "airbnb/hooks", "prettier"],
112
- globals: { chayns: true },
113
- rules: __spreadValues(__spreadValues({}, sharedRules), javascriptRules),
114
- parser: "babel-eslint",
115
- settings: {
116
- "import/resolver": {
117
- typescript: { project: "@(jsconfig|tsconfig).json" }
118
- },
119
- "import/extensions": [".js", ".jsx", ".ts", ".tsx"]
120
- },
121
- overrides: [
122
- usesTypeScript && {
123
- files: ["**/*.ts?(x)"],
124
- extends: [
125
- "airbnb-typescript",
126
- "airbnb/hooks",
127
- "plugin:@typescript-eslint/recommended",
128
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
129
- "prettier",
130
- "plugin:import/typescript"
131
- ],
132
- rules: __spreadValues(__spreadValues({}, sharedRules), typescriptRules),
133
- parserOptions: {
134
- project: "./tsconfig.json"
135
- }
136
- },
137
- {
138
- files: ["**/*.@(test|spec).@(js|jsx|ts|tsx)"],
139
- env: { "jest/globals": true },
140
- plugins: ["jest"],
141
- rules: __spreadProps(__spreadValues({}, sharedRules), {
142
- "jest/no-disabled-tests": "warn",
143
- "jest/no-focused-tests": "error",
144
- "jest/no-identical-title": "error",
145
- "jest/prefer-to-have-length": "warn",
146
- "jest/valid-expect": "error"
147
- })
148
- }
149
- ].filter(Boolean)
150
- };