@stzhu/eslint-config 0.5.0 → 0.6.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/dist/chunk-5AKEETFH.mjs +94 -0
- package/dist/chunk-5AKEETFH.mjs.map +1 -0
- package/dist/chunk-ECAGGCDW.mjs +36 -0
- package/dist/chunk-ECAGGCDW.mjs.map +1 -0
- package/dist/expo.d.mts +5 -0
- package/dist/expo.d.ts +5 -0
- package/dist/expo.js +74 -0
- package/dist/expo.js.map +1 -0
- package/dist/expo.mjs +13 -0
- package/dist/expo.mjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lingui.d.mts +5 -0
- package/dist/lingui.d.ts +5 -0
- package/dist/lingui.js +39 -0
- package/dist/lingui.js.map +1 -0
- package/dist/lingui.mjs +8 -0
- package/dist/lingui.mjs.map +1 -0
- package/dist/node.d.mts +5 -0
- package/dist/node.d.ts +5 -0
- package/dist/node.js +163 -0
- package/dist/node.js.map +1 -0
- package/dist/node.mjs +17 -0
- package/dist/node.mjs.map +1 -0
- package/dist/react.d.mts +5 -0
- package/dist/react.d.ts +5 -0
- package/dist/react.js +201 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +55 -0
- package/dist/react.mjs.map +1 -0
- package/dist/storybook.d.mts +5 -0
- package/dist/storybook.d.ts +5 -0
- package/dist/storybook.js +39 -0
- package/dist/storybook.js.map +1 -0
- package/dist/storybook.mjs +8 -0
- package/dist/storybook.mjs.map +1 -0
- package/dist/tailwind.d.mts +5 -0
- package/dist/tailwind.d.ts +5 -0
- package/dist/tailwind.js +48 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/tailwind.mjs +17 -0
- package/dist/tailwind.mjs.map +1 -0
- package/dist/ts.d.mts +5 -0
- package/dist/ts.d.ts +5 -0
- package/dist/ts.js +152 -0
- package/dist/ts.js.map +1 -0
- package/dist/ts.mjs +8 -0
- package/dist/ts.mjs.map +1 -0
- package/dist/turbo.d.mts +5 -0
- package/dist/turbo.d.ts +5 -0
- package/dist/turbo.js +29 -0
- package/dist/turbo.js.map +1 -0
- package/dist/turbo.mjs +8 -0
- package/dist/turbo.mjs.map +1 -0
- package/dist/vitest.d.mts +5 -0
- package/dist/vitest.d.ts +5 -0
- package/dist/vitest.js +62 -0
- package/dist/vitest.js.map +1 -0
- package/dist/vitest.mjs +31 -0
- package/dist/vitest.mjs.map +1 -0
- package/package.json +63 -16
- package/.github/workflows/bump-version.yml +0 -62
- package/.github/workflows/ci.yml +0 -24
- package/.github/workflows/publish.yml +0 -24
- package/.prettierignore +0 -1
- package/.prettierrc.yaml +0 -5
- package/eslint.config.js +0 -13
- package/jsconfig.json +0 -12
- package/pnpm-workspace.yaml +0 -3
- package/renovate.json +0 -4
- package/src/configs/import.js +0 -27
- package/src/configs/typescript.js +0 -61
- package/src/expo.js +0 -7
- package/src/lingui.js +0 -4
- package/src/node.js +0 -10
- package/src/react.js +0 -46
- package/src/storybook.js +0 -4
- package/src/tailwind.js +0 -13
- package/src/ts.js +0 -26
- package/src/turbo.js +0 -4
- package/src/vitest.js +0 -31
- /package/{src/index.js → dist/index.d.mts} +0 -0
package/dist/turbo.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/turbo.ts
|
|
21
|
+
var turbo_exports = {};
|
|
22
|
+
__export(turbo_exports, {
|
|
23
|
+
default: () => turbo_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(turbo_exports);
|
|
26
|
+
var import_config = require("eslint/config");
|
|
27
|
+
var import_eslint_plugin_turbo = require("eslint-plugin-turbo");
|
|
28
|
+
var turbo_default = (0, import_config.defineConfig)(import_eslint_plugin_turbo.configs["flat/recommended"]);
|
|
29
|
+
//# sourceMappingURL=turbo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/turbo.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport { configs as turboConfigs } from 'eslint-plugin-turbo';\n\nexport default defineConfig(turboConfigs['flat/recommended']);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA6B;AAC7B,iCAAwC;AAExC,IAAO,oBAAQ,4BAAa,2BAAAA,QAAa,kBAAkB,CAAC;","names":["turboConfigs"]}
|
package/dist/turbo.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/turbo.ts
|
|
2
|
+
import { defineConfig } from "eslint/config";
|
|
3
|
+
import { configs as turboConfigs } from "eslint-plugin-turbo";
|
|
4
|
+
var turbo_default = defineConfig(turboConfigs["flat/recommended"]);
|
|
5
|
+
export {
|
|
6
|
+
turbo_default as default
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=turbo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/turbo.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport { configs as turboConfigs } from 'eslint-plugin-turbo';\n\nexport default defineConfig(turboConfigs['flat/recommended']);\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW,oBAAoB;AAExC,IAAO,gBAAQ,aAAa,aAAa,kBAAkB,CAAC;","names":[]}
|
package/dist/vitest.d.ts
ADDED
package/dist/vitest.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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/vitest.ts
|
|
31
|
+
var vitest_exports = {};
|
|
32
|
+
__export(vitest_exports, {
|
|
33
|
+
default: () => vitest_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(vitest_exports);
|
|
36
|
+
var import_eslint_plugin = __toESM(require("@vitest/eslint-plugin"));
|
|
37
|
+
var import_config = require("eslint/config");
|
|
38
|
+
var vitest_default = (0, import_config.defineConfig)(import_eslint_plugin.default.configs.recommended, {
|
|
39
|
+
name: "custom/vitest",
|
|
40
|
+
files: ["**/*.test.{ts,tsx}"],
|
|
41
|
+
rules: {
|
|
42
|
+
"vitest/consistent-test-it": [
|
|
43
|
+
"error",
|
|
44
|
+
{
|
|
45
|
+
fn: "test",
|
|
46
|
+
withinDescribe: "test"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"vitest/no-focused-tests": "error",
|
|
50
|
+
"vitest/no-disabled-tests": "error",
|
|
51
|
+
"vitest/prefer-lowercase-title": [
|
|
52
|
+
"warn",
|
|
53
|
+
{
|
|
54
|
+
ignoreTopLevelDescribe: true
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
// Disable certain strict typescript eslint rules for tests
|
|
58
|
+
// https://github.com/vitest-dev/vitest/issues/4543#issuecomment-1824881253
|
|
59
|
+
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=vitest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/vitest.ts"],"sourcesContent":["import vitest from '@vitest/eslint-plugin';\nimport { defineConfig } from 'eslint/config';\n\nexport default defineConfig(vitest.configs.recommended, {\n name: 'custom/vitest',\n files: ['**/*.test.{ts,tsx}'],\n rules: {\n 'vitest/consistent-test-it': [\n 'error',\n {\n fn: 'test',\n withinDescribe: 'test',\n },\n ],\n 'vitest/no-focused-tests': 'error',\n 'vitest/no-disabled-tests': 'error',\n 'vitest/prefer-lowercase-title': [\n 'warn',\n {\n ignoreTopLevelDescribe: true,\n },\n ],\n // Disable certain strict typescript eslint rules for tests\n // https://github.com/vitest-dev/vitest/issues/4543#issuecomment-1824881253\n '@typescript-eslint/no-unsafe-assignment': 'off',\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAmB;AACnB,oBAA6B;AAE7B,IAAO,qBAAQ,4BAAa,qBAAAA,QAAO,QAAQ,aAAa;AAAA,EACtD,MAAM;AAAA,EACN,OAAO,CAAC,oBAAoB;AAAA,EAC5B,OAAO;AAAA,IACL,6BAA6B;AAAA,MAC3B;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,IAC3B,4BAA4B;AAAA,IAC5B,iCAAiC;AAAA,MAC/B;AAAA,MACA;AAAA,QACE,wBAAwB;AAAA,MAC1B;AAAA,IACF;AAAA;AAAA;AAAA,IAGA,2CAA2C;AAAA,EAC7C;AACF,CAAC;","names":["vitest"]}
|
package/dist/vitest.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/vitest.ts
|
|
2
|
+
import vitest from "@vitest/eslint-plugin";
|
|
3
|
+
import { defineConfig } from "eslint/config";
|
|
4
|
+
var vitest_default = defineConfig(vitest.configs.recommended, {
|
|
5
|
+
name: "custom/vitest",
|
|
6
|
+
files: ["**/*.test.{ts,tsx}"],
|
|
7
|
+
rules: {
|
|
8
|
+
"vitest/consistent-test-it": [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
fn: "test",
|
|
12
|
+
withinDescribe: "test"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"vitest/no-focused-tests": "error",
|
|
16
|
+
"vitest/no-disabled-tests": "error",
|
|
17
|
+
"vitest/prefer-lowercase-title": [
|
|
18
|
+
"warn",
|
|
19
|
+
{
|
|
20
|
+
ignoreTopLevelDescribe: true
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
// Disable certain strict typescript eslint rules for tests
|
|
24
|
+
// https://github.com/vitest-dev/vitest/issues/4543#issuecomment-1824881253
|
|
25
|
+
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
vitest_default as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=vitest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/vitest.ts"],"sourcesContent":["import vitest from '@vitest/eslint-plugin';\nimport { defineConfig } from 'eslint/config';\n\nexport default defineConfig(vitest.configs.recommended, {\n name: 'custom/vitest',\n files: ['**/*.test.{ts,tsx}'],\n rules: {\n 'vitest/consistent-test-it': [\n 'error',\n {\n fn: 'test',\n withinDescribe: 'test',\n },\n ],\n 'vitest/no-focused-tests': 'error',\n 'vitest/no-disabled-tests': 'error',\n 'vitest/prefer-lowercase-title': [\n 'warn',\n {\n ignoreTopLevelDescribe: true,\n },\n ],\n // Disable certain strict typescript eslint rules for tests\n // https://github.com/vitest-dev/vitest/issues/4543#issuecomment-1824881253\n '@typescript-eslint/no-unsafe-assignment': 'off',\n },\n});\n"],"mappings":";AAAA,OAAO,YAAY;AACnB,SAAS,oBAAoB;AAE7B,IAAO,iBAAQ,aAAa,OAAO,QAAQ,aAAa;AAAA,EACtD,MAAM;AAAA,EACN,OAAO,CAAC,oBAAoB;AAAA,EAC5B,OAAO;AAAA,IACL,6BAA6B;AAAA,MAC3B;AAAA,MACA;AAAA,QACE,IAAI;AAAA,QACJ,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,IAC3B,4BAA4B;AAAA,IAC5B,iCAAiC;AAAA,MAC/B;AAAA,MACA;AAAA,QACE,wBAAwB;AAAA,MAC1B;AAAA,IACF;AAAA;AAAA;AAAA,IAGA,2CAA2C;AAAA,EAC7C;AACF,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stzhu/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Shared config for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint"
|
|
@@ -11,19 +11,61 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"author": "Steve Zhu <4130171+stevezhu@users.noreply.github.com>",
|
|
14
|
-
"type": "module",
|
|
15
14
|
"exports": {
|
|
16
|
-
".":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"./
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./ts": {
|
|
21
|
+
"types": "./dist/ts.d.ts",
|
|
22
|
+
"require": "./dist/ts.cjs",
|
|
23
|
+
"import": "./dist/ts.js"
|
|
24
|
+
},
|
|
25
|
+
"./react": {
|
|
26
|
+
"types": "./dist/react.d.ts",
|
|
27
|
+
"require": "./dist/react.cjs",
|
|
28
|
+
"import": "./dist/react.js"
|
|
29
|
+
},
|
|
30
|
+
"./node": {
|
|
31
|
+
"types": "./dist/node.d.ts",
|
|
32
|
+
"require": "./dist/node.cjs",
|
|
33
|
+
"import": "./dist/node.js"
|
|
34
|
+
},
|
|
35
|
+
"./expo": {
|
|
36
|
+
"types": "./dist/expo.d.ts",
|
|
37
|
+
"require": "./dist/expo.cjs",
|
|
38
|
+
"import": "./dist/expo.js"
|
|
39
|
+
},
|
|
40
|
+
"./storybook": {
|
|
41
|
+
"types": "./dist/storybook.d.ts",
|
|
42
|
+
"require": "./dist/storybook.cjs",
|
|
43
|
+
"import": "./dist/storybook.js"
|
|
44
|
+
},
|
|
45
|
+
"./vitest": {
|
|
46
|
+
"types": "./dist/vitest.d.ts",
|
|
47
|
+
"require": "./dist/vitest.cjs",
|
|
48
|
+
"import": "./dist/vitest.js"
|
|
49
|
+
},
|
|
50
|
+
"./tailwind": {
|
|
51
|
+
"types": "./dist/tailwind.d.ts",
|
|
52
|
+
"require": "./dist/tailwind.cjs",
|
|
53
|
+
"import": "./dist/tailwind.js"
|
|
54
|
+
},
|
|
55
|
+
"./lingui": {
|
|
56
|
+
"types": "./dist/lingui.d.ts",
|
|
57
|
+
"require": "./dist/lingui.cjs",
|
|
58
|
+
"import": "./dist/lingui.js"
|
|
59
|
+
},
|
|
60
|
+
"./turbo": {
|
|
61
|
+
"types": "./dist/turbo.d.ts",
|
|
62
|
+
"require": "./dist/turbo.cjs",
|
|
63
|
+
"import": "./dist/turbo.js"
|
|
64
|
+
}
|
|
26
65
|
},
|
|
66
|
+
"files": [
|
|
67
|
+
"dist/*"
|
|
68
|
+
],
|
|
27
69
|
"dependencies": {
|
|
28
70
|
"@eslint/js": "^9.28.0",
|
|
29
71
|
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
@@ -32,9 +74,10 @@
|
|
|
32
74
|
"eslint-config-expo": "^9.2.0",
|
|
33
75
|
"eslint-config-prettier": "^10.1.5",
|
|
34
76
|
"eslint-config-turbo": "^2.5.4",
|
|
77
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
35
78
|
"eslint-plugin-better-tailwindcss": "^3.7.5",
|
|
36
79
|
"eslint-plugin-expo": "^0.1.4",
|
|
37
|
-
"eslint-plugin-import
|
|
80
|
+
"eslint-plugin-import": "^2.32.0",
|
|
38
81
|
"eslint-plugin-lingui": "^0.11.0",
|
|
39
82
|
"eslint-plugin-react": "^7.37.5",
|
|
40
83
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
@@ -46,11 +89,13 @@
|
|
|
46
89
|
"typescript-eslint": "^8.34.0"
|
|
47
90
|
},
|
|
48
91
|
"devDependencies": {
|
|
49
|
-
"@
|
|
92
|
+
"@eslint/config-inspector": "^1.2.0",
|
|
93
|
+
"@stzhu/prettier-plugin-tsconfig": "^0.6.0",
|
|
50
94
|
"@stzhu/tsconfig": "^0.1.0",
|
|
51
95
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
52
96
|
"prettier": "^3.5.3",
|
|
53
|
-
"prettier-plugin-packagejson": "^2.5.15"
|
|
97
|
+
"prettier-plugin-packagejson": "^2.5.15",
|
|
98
|
+
"tsup": "^8.5.0"
|
|
54
99
|
},
|
|
55
100
|
"peerDependencies": {
|
|
56
101
|
"eslint": "^9",
|
|
@@ -70,8 +115,10 @@
|
|
|
70
115
|
}
|
|
71
116
|
},
|
|
72
117
|
"scripts": {
|
|
118
|
+
"build": "tsup",
|
|
73
119
|
"format": "prettier -w .",
|
|
120
|
+
"inspect": "eslint --inspect-config",
|
|
74
121
|
"lint": "prettier -c . && eslint .",
|
|
75
|
-
"test": "tsc --noEmit
|
|
122
|
+
"test": "tsc --noEmit"
|
|
76
123
|
}
|
|
77
124
|
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
name: Bump Package Version
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
version_type:
|
|
7
|
-
description: 'Version bump type'
|
|
8
|
-
required: true
|
|
9
|
-
default: 'patch'
|
|
10
|
-
type: choice
|
|
11
|
-
options:
|
|
12
|
-
- patch
|
|
13
|
-
- minor
|
|
14
|
-
- major
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
bump-version:
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
permissions:
|
|
20
|
-
contents: write
|
|
21
|
-
pull-requests: write
|
|
22
|
-
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v5
|
|
25
|
-
|
|
26
|
-
- uses: pnpm/action-setup@v4
|
|
27
|
-
|
|
28
|
-
- name: Setup Node.js
|
|
29
|
-
uses: actions/setup-node@v4
|
|
30
|
-
with:
|
|
31
|
-
node-version-file: package.json
|
|
32
|
-
cache: pnpm
|
|
33
|
-
registry-url: https://registry.npmjs.org
|
|
34
|
-
- name: Configure Git
|
|
35
|
-
run: |
|
|
36
|
-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
37
|
-
git config --local user.name "github-actions[bot]"
|
|
38
|
-
- name: Get current version
|
|
39
|
-
id: current_version
|
|
40
|
-
run: |
|
|
41
|
-
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
42
|
-
echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
|
43
|
-
- name: Bump version
|
|
44
|
-
id: bump_version
|
|
45
|
-
run: |
|
|
46
|
-
npm version ${{ github.event.inputs.version_type }} --no-git-tag-version
|
|
47
|
-
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
48
|
-
echo "new=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
49
|
-
- name: Create branch
|
|
50
|
-
run: |
|
|
51
|
-
BRANCH_NAME="bump-version-${{ steps.bump_version.outputs.new }}"
|
|
52
|
-
git checkout -b $BRANCH_NAME
|
|
53
|
-
echo "branch=$BRANCH_NAME" >> $GITHUB_ENV
|
|
54
|
-
- name: Commit changes
|
|
55
|
-
run: |
|
|
56
|
-
git add package.json
|
|
57
|
-
git commit -m "chore(release): ${{ github.event.inputs.version_type }} version bump to ${{ steps.bump_version.outputs.new }}"
|
|
58
|
-
git push origin ${{ env.branch }}
|
|
59
|
-
- name: Create Pull Request
|
|
60
|
-
run: gh pr create --fill
|
|
61
|
-
env:
|
|
62
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [main]
|
|
5
|
-
pull_request:
|
|
6
|
-
branches: [main]
|
|
7
|
-
types: [opened, synchronize]
|
|
8
|
-
jobs:
|
|
9
|
-
checks:
|
|
10
|
-
name: Checks
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
node-version: [18.x, 20.x, 22.x]
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v5
|
|
17
|
-
- uses: pnpm/action-setup@v4
|
|
18
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
19
|
-
uses: actions/setup-node@v4
|
|
20
|
-
with:
|
|
21
|
-
node-version: ${{ matrix.node-version }}
|
|
22
|
-
cache: 'pnpm'
|
|
23
|
-
- run: pnpm install
|
|
24
|
-
- run: pnpm run lint
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
jobs:
|
|
6
|
-
build-and-publish:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
id-token: write
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v5
|
|
13
|
-
- uses: pnpm/action-setup@v4
|
|
14
|
-
- name: Setup Node.js
|
|
15
|
-
uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version-file: package.json
|
|
18
|
-
cache: pnpm
|
|
19
|
-
registry-url: https://registry.npmjs.org
|
|
20
|
-
- run: pnpm install
|
|
21
|
-
- run: pnpm run lint
|
|
22
|
-
- run: pnpm publish --provenance --access public --no-git-checks
|
|
23
|
-
env:
|
|
24
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.prettierignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pnpm-lock.yaml
|
package/.prettierrc.yaml
DELETED
package/eslint.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
import js from '@eslint/js';
|
|
4
|
-
import prettier from 'eslint-config-prettier';
|
|
5
|
-
import tseslint from 'typescript-eslint';
|
|
6
|
-
|
|
7
|
-
import importConfig from './src/configs/import.js';
|
|
8
|
-
|
|
9
|
-
export default tseslint.config(
|
|
10
|
-
js.configs.recommended,
|
|
11
|
-
...importConfig,
|
|
12
|
-
prettier,
|
|
13
|
-
);
|
package/jsconfig.json
DELETED
package/pnpm-workspace.yaml
DELETED
package/renovate.json
DELETED
package/src/configs/import.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import importX from 'eslint-plugin-import-x';
|
|
2
|
-
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
3
|
-
import tseslint from 'typescript-eslint';
|
|
4
|
-
|
|
5
|
-
export default tseslint.config(
|
|
6
|
-
{
|
|
7
|
-
name: 'import/custom',
|
|
8
|
-
plugins: {
|
|
9
|
-
'import-x': importX,
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
'import-x/first': 'error',
|
|
13
|
-
'import-x/newline-after-import': 'error',
|
|
14
|
-
'import-x/no-duplicates': 'error',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'simple-import-sort/custom',
|
|
19
|
-
plugins: {
|
|
20
|
-
'simple-import-sort': simpleImportSort,
|
|
21
|
-
},
|
|
22
|
-
rules: {
|
|
23
|
-
'simple-import-sort/imports': 'error',
|
|
24
|
-
'simple-import-sort/exports': 'error',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import tseslint from 'typescript-eslint';
|
|
2
|
-
|
|
3
|
-
export default tseslint.config(
|
|
4
|
-
...tseslint.configs.strictTypeChecked,
|
|
5
|
-
{
|
|
6
|
-
name: 'typescript/languageOptions',
|
|
7
|
-
languageOptions: {
|
|
8
|
-
parserOptions: {
|
|
9
|
-
projectService: true,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'typescript/custom',
|
|
15
|
-
rules: {
|
|
16
|
-
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
17
|
-
'@typescript-eslint/no-misused-promises': [
|
|
18
|
-
'error',
|
|
19
|
-
{
|
|
20
|
-
checksVoidReturn: {
|
|
21
|
-
attributes: false,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
'@typescript-eslint/no-unused-vars': [
|
|
26
|
-
'error',
|
|
27
|
-
{
|
|
28
|
-
args: 'all',
|
|
29
|
-
argsIgnorePattern: '^_',
|
|
30
|
-
caughtErrors: 'all',
|
|
31
|
-
caughtErrorsIgnorePattern: '^_',
|
|
32
|
-
destructuredArrayIgnorePattern: '^_',
|
|
33
|
-
varsIgnorePattern: '^_',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
'@typescript-eslint/restrict-template-expressions': [
|
|
37
|
-
'error',
|
|
38
|
-
{
|
|
39
|
-
allowNumber: true,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
// https://tanstack.com/router/v1/docs/framework/react/api/router/redirectFunction
|
|
43
|
-
'@typescript-eslint/only-throw-error': [
|
|
44
|
-
'warn',
|
|
45
|
-
{
|
|
46
|
-
allow: [
|
|
47
|
-
{
|
|
48
|
-
from: 'package',
|
|
49
|
-
name: 'Redirect',
|
|
50
|
-
package: '@tanstack/router-core',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
files: ['**/*.{cjs,js}'],
|
|
59
|
-
extends: [tseslint.configs.disableTypeChecked],
|
|
60
|
-
},
|
|
61
|
-
);
|
package/src/expo.js
DELETED
package/src/lingui.js
DELETED
package/src/node.js
DELETED
package/src/react.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import prettier from 'eslint-config-prettier';
|
|
2
|
-
import react from 'eslint-plugin-react';
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
5
|
-
import globals from 'globals';
|
|
6
|
-
import tseslint from 'typescript-eslint';
|
|
7
|
-
|
|
8
|
-
import baseConfig from './ts.js';
|
|
9
|
-
|
|
10
|
-
export default tseslint.config(
|
|
11
|
-
...baseConfig,
|
|
12
|
-
{
|
|
13
|
-
name: 'react/src-browser-globals',
|
|
14
|
-
files: ['**/*.{ts,tsx}'],
|
|
15
|
-
languageOptions: {
|
|
16
|
-
globals: globals.browser,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
react.configs.flat['recommended'],
|
|
20
|
-
react.configs.flat['jsx-runtime'],
|
|
21
|
-
{
|
|
22
|
-
name: 'react/custom',
|
|
23
|
-
settings: {
|
|
24
|
-
react: {
|
|
25
|
-
version: 'detect',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
rules: {
|
|
29
|
-
'react/function-component-definition': [
|
|
30
|
-
'error',
|
|
31
|
-
{ namedComponents: 'function-declaration' },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
reactHooks.configs['recommended-latest'],
|
|
36
|
-
{
|
|
37
|
-
name: 'react-refresh/custom',
|
|
38
|
-
plugins: {
|
|
39
|
-
'react-refresh': reactRefresh,
|
|
40
|
-
},
|
|
41
|
-
rules: {
|
|
42
|
-
'react-refresh/only-export-components': 'warn',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
prettier,
|
|
46
|
-
);
|
package/src/storybook.js
DELETED
package/src/tailwind.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import eslintPluginBetterTailwindcss from 'eslint-plugin-better-tailwindcss';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
|
|
4
|
-
export default tseslint.config({
|
|
5
|
-
files: ['**/*.tsx'],
|
|
6
|
-
plugins: {
|
|
7
|
-
'better-tailwindcss': eslintPluginBetterTailwindcss,
|
|
8
|
-
},
|
|
9
|
-
rules: {
|
|
10
|
-
...eslintPluginBetterTailwindcss.configs['recommended-error'].rules,
|
|
11
|
-
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
12
|
-
},
|
|
13
|
-
});
|
package/src/ts.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import prettier from 'eslint-config-prettier';
|
|
3
|
-
import globals from 'globals';
|
|
4
|
-
import tseslint from 'typescript-eslint';
|
|
5
|
-
|
|
6
|
-
import importConfig from './configs/import.js';
|
|
7
|
-
import typescriptConfig from './configs/typescript.js';
|
|
8
|
-
|
|
9
|
-
export default tseslint.config(
|
|
10
|
-
{
|
|
11
|
-
// TODO: can't name this because ignores needs to be the only entry in order to be global
|
|
12
|
-
// name: 'ts/ignores',
|
|
13
|
-
ignores: ['dist/', '.wrangler/'],
|
|
14
|
-
},
|
|
15
|
-
Object.assign({ name: '@eslint/js/recommended' }, js.configs.recommended),
|
|
16
|
-
...importConfig,
|
|
17
|
-
{
|
|
18
|
-
name: 'ts/config-file-globals',
|
|
19
|
-
files: ['*.config.{cjs,js,ts}'],
|
|
20
|
-
languageOptions: {
|
|
21
|
-
globals: globals.node,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
...typescriptConfig,
|
|
25
|
-
prettier,
|
|
26
|
-
);
|