Skip to content

Commit 7e67bdf

Browse files
committed
chore: rename examples
1 parent bd792fa commit 7e67bdf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+82
-29
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/next/eslint.config.mjs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import eslintReact from "@eslint-react/eslint-plugin";
2+
import eslintJs from "@eslint/js";
3+
import eslintPluginNext from "@next/eslint-plugin-next";
4+
import gitignore from "eslint-config-flat-gitignore";
5+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
6+
import eslintPluginReactRefresh from "eslint-plugin-react-refresh";
7+
import tseslint from "typescript-eslint";
8+
9+
import TSCONFIG from "./tsconfig.json" with { type: "json" };
10+
11+
const GLOB_TS = ["**/*.ts", "**/*.tsx"];
12+
const GLOB_JS = ["**/*.js", "**/*.jsx"];
13+
const GLOB_APP = ["app/**/*.{js,ts,jsx,tsx}"];
14+
const GLOB_CONFIG = ["**/*.config.{js,mjs,ts,tsx}"];
15+
16+
export default tseslint.config(
17+
gitignore(),
18+
{
19+
files: GLOB_TS,
20+
extends: [
21+
eslintJs.configs.recommended,
22+
tseslint.configs.recommended,
23+
],
24+
},
25+
{
26+
files: TSCONFIG.include,
27+
extends: [
28+
tseslint.configs.recommendedTypeChecked,
29+
],
30+
languageOptions: {
31+
parser: tseslint.parser,
32+
parserOptions: {
33+
project: "./tsconfig.json",
34+
tsconfigRootDir: import.meta.dirname,
35+
},
36+
},
37+
},
38+
{
39+
files: TSCONFIG.include,
40+
extends: [
41+
eslintReact.configs["recommended-type-checked"],
42+
eslintPluginReactRefresh.configs.recommended,
43+
],
44+
plugins: {
45+
"react-hooks": eslintPluginReactHooks,
46+
"@next/next": eslintPluginNext,
47+
},
48+
rules: {
49+
...eslintPluginReactHooks.configs.recommended.rules,
50+
...eslintPluginNext.configs.recommended.rules,
51+
...eslintPluginNext.configs["core-web-vitals"].rules,
52+
},
53+
},
54+
{
55+
files: GLOB_APP,
56+
rules: {
57+
"@typescript-eslint/require-await": "off",
58+
},
59+
},
60+
{
61+
files: [...GLOB_JS, ...GLOB_CONFIG],
62+
extends: [tseslint.configs.disableTypeChecked],
63+
rules: {
64+
"no-undef": "off",
65+
"no-console": "off",
66+
},
67+
},
68+
);

0 commit comments

Comments
 (0)