Skip to content

Commit f627479

Browse files
committed
most additions have no obvious effect
1 parent f16d73b commit f627479

File tree

3 files changed

+3
-93
lines changed

3 files changed

+3
-93
lines changed

packages/eslint-config/base.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,11 @@ export const config = [
2626
onlyWarn,
2727
},
2828
},
29-
{
30-
ignores: ["dist/**", "node_modules/**"],
31-
},
32-
33-
// additions
34-
{
35-
files: ["**/*.js?(x)", "**/*.mjs"],
36-
...tseslint.configs.disableTypeChecked,
37-
},
3829
{
3930
ignores: [
40-
// Ignore dotfiles and config
31+
"dist/**",
32+
// Addition: ignore dotfiles and config
33+
"node_modules/**",
4134
".*.js",
4235
"*.config.*",
4336
],

packages/eslint-config/next.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
1-
import js from "@eslint/js";
21
import pluginReactHooks from "eslint-plugin-react-hooks";
32
import pluginReact from "eslint-plugin-react";
43
import globals from "globals";
54
import pluginNext from "@next/eslint-plugin-next";
65
import { config as baseConfig } from "./base.js";
76

8-
import vercel from "@vercel/style-guide/eslint/next";
9-
import { FlatCompat } from "@eslint/eslintrc";
10-
import { fileURLToPath } from "url";
11-
import path from "path";
12-
13-
// this could just be import.meta.dirname if we set minimun node to 20.11
14-
const __filename = fileURLToPath(import.meta.url);
15-
const __dirname = path.dirname(__filename);
16-
17-
const compat = new FlatCompat({
18-
baseDirectory: __dirname,
19-
});
20-
217
/**
228
* A custom ESLint configuration for libraries that use Next.js.
239
*
@@ -54,26 +40,4 @@ export const nextJsConfig = [
5440
"react/react-in-jsx-scope": "off",
5541
},
5642
},
57-
58-
// additions
59-
...compat.config(vercel),
60-
...compat.extends("eslint-config-turbo"),
61-
...compat.config(pluginNext.configs["core-web-vitals"]),
62-
{
63-
languageOptions: {
64-
globals: {
65-
...globals.browser,
66-
React: true,
67-
JSX: true,
68-
},
69-
// IMPORTANT: This is given as an example, but must be repeated in each project. Cwd fails in editors.
70-
parserOptions: {
71-
project: true,
72-
tsconfigRootDir: ".",
73-
ecmaFeatures: {
74-
jsx: true,
75-
},
76-
},
77-
},
78-
},
7943
];
Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
1-
import js from "@eslint/js";
21
import tseslint from "typescript-eslint";
32
import pluginReactHooks from "eslint-plugin-react-hooks";
43
import pluginReact from "eslint-plugin-react";
54
import globals from "globals";
65
import { config as baseConfig } from "./base.js";
76

8-
import { FlatCompat } from "@eslint/eslintrc";
9-
import path from "path";
10-
import { fileURLToPath } from "url";
11-
12-
// this could just be import.meta.dirname if we set minimun node to 20.11
13-
const __filename = fileURLToPath(import.meta.url);
14-
const __dirname = path.dirname(__filename);
15-
16-
const compat = new FlatCompat({
17-
baseDirectory: __dirname,
18-
});
19-
207
/**
218
* A custom ESLint configuration for libraries that use React.
229
*
@@ -44,38 +31,4 @@ export const config = [
4431
"react/react-in-jsx-scope": "off",
4532
},
4633
},
47-
48-
// additions
49-
...compat.extends("eslint-config-turbo"),
50-
{
51-
languageOptions: {
52-
globals: {
53-
...globals.browser,
54-
React: true,
55-
},
56-
// IMPORTANT: This is given as an example, but must be repeated in each project. Cwd fails in editors.
57-
parserOptions: {
58-
project: true,
59-
tsconfigRootDir: ".",
60-
ecmaFeatures: {
61-
jsx: true,
62-
},
63-
},
64-
},
65-
// Force ESLint to detect .tsx files
66-
files: ["**/*.ts?(x)", "**/*.js?(x)"],
67-
},
68-
{
69-
files: ["**/*.js?(x)", "**/*.mjs"],
70-
...tseslint.configs["flat/disable-type-checked"],
71-
},
72-
{
73-
ignores: [
74-
// Ignore dotfiles
75-
".*.js",
76-
"node_modules/",
77-
"dist/",
78-
"*.config.*",
79-
],
80-
},
8134
];

0 commit comments

Comments
 (0)