Skip to content

Commit b786121

Browse files
committed
docs(examples): add rspeedy-react-lynx-app to examples
1 parent c42b44b commit b786121

File tree

19 files changed

+3860
-86
lines changed

19 files changed

+3860
-86
lines changed
1.45 KB
Loading
44.8 KB
Loading
192 KB
Loading
160 KB
Loading
80 KB
Loading
46.2 KB
Loading
1.76 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import eslintJs from "@eslint/js";
2+
import eslintPluginReactX from "eslint-plugin-react-x";
3+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
4+
import tseslint from "typescript-eslint";
5+
import gitignore from "eslint-config-flat-gitignore";
6+
7+
import TSCONFIG from "./tsconfig.json" with { type: "json" };
8+
9+
const GLOB_TS = ["**/*.ts", "**/*.tsx"];
10+
const GLOB_JS = ["**/*.js", "**/*.jsx"];
11+
const GLOB_CONFIG = ["**/*.config.{js,mjs,ts,tsx}"];
12+
13+
export default tseslint.config(
14+
gitignore(),
15+
{
16+
files: GLOB_TS,
17+
extends: [
18+
eslintJs.configs.recommended,
19+
tseslint.configs.recommended,
20+
],
21+
},
22+
{
23+
files: TSCONFIG.include,
24+
extends: [
25+
tseslint.configs.recommendedTypeChecked,
26+
],
27+
languageOptions: {
28+
parser: tseslint.parser,
29+
parserOptions: {
30+
project: "./tsconfig.json",
31+
tsconfigRootDir: import.meta.dirname,
32+
},
33+
},
34+
},
35+
{
36+
files: TSCONFIG.include,
37+
extends: [
38+
eslintPluginReactX.configs["recommended-type-checked"],
39+
],
40+
plugins: {
41+
"react-hooks": eslintPluginReactHooks,
42+
},
43+
rules: {
44+
...eslintPluginReactHooks.configs.recommended.rules,
45+
"react-x/no-unnecessary-use-effect": "warn",
46+
},
47+
},
48+
{
49+
files: [...GLOB_JS, ...GLOB_CONFIG],
50+
extends: [tseslint.configs.disableTypeChecked],
51+
rules: {
52+
"no-undef": "off",
53+
"no-console": "off",
54+
},
55+
},
56+
);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { pluginQRCode } from "@lynx-js/qrcode-rsbuild-plugin";
2+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
3+
import { defineConfig } from "@lynx-js/rspeedy";
4+
import { pluginTypeCheck } from "@rsbuild/plugin-type-check";
5+
import { pluginTailwindCSS } from "rsbuild-plugin-tailwindcss";
6+
7+
export default defineConfig({
8+
plugins: [
9+
pluginReactLynx(),
10+
pluginQRCode(),
11+
pluginTailwindCSS(),
12+
pluginTypeCheck(),
13+
],
14+
environments: {
15+
web: {},
16+
lynx: {},
17+
},
18+
});
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@lynx-example/tailwindcss",
3+
"version": "0.3.0",
4+
"type": "module",
5+
"scripts": {
6+
"build": "rspeedy build",
7+
"dev": "rspeedy dev"
8+
},
9+
"dependencies": {
10+
"@lynx-js/react": "catalog:"
11+
},
12+
"devDependencies": {
13+
"@lynx-js/qrcode-rsbuild-plugin": "catalog:",
14+
"@lynx-js/react-rsbuild-plugin": "catalog:",
15+
"@lynx-js/rspeedy": "catalog:",
16+
"@lynx-js/types": "^3.2.0",
17+
"@types/react": "^18.3.18",
18+
"typescript": "~5.7.3",
19+
"@lynx-contrib/tailwind-preset": "0.0.2",
20+
"rsbuild-plugin-tailwindcss": "^0.2.0",
21+
"tailwindcss": "^3.4.17"
22+
},
23+
"engines": {
24+
"node": ">=18"
25+
},
26+
"repository": {
27+
"directory": "examples/tailwindcss",
28+
"url": "git+https://github.com/lynx-family/lynx-examples.git",
29+
"type": "git"
30+
}
31+
}

0 commit comments

Comments
 (0)