Skip to content

Commit c411174

Browse files
authored
fix: linter rules (#42)
* fix: linting * fix: linting rules
1 parent 697ca36 commit c411174

6 files changed

Lines changed: 26 additions & 87 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 68 deletions
This file was deleted.

apps/docs/eslint.config.mjs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
import path from "node:path";
22
import { fileURLToPath } from "node:url";
3-
import js from "@eslint/js";
4-
import { FlatCompat } from "@eslint/eslintrc";
3+
//import js from "@eslint/js";
4+
//import { FlatCompat } from "@eslint/eslintrc";
55
import { includeIgnoreFile } from "@eslint/compat";
6+
import baseConfig from "../../eslint.config.mjs";
67

8+
// eslint-disable-next-line
79
const __filename = fileURLToPath(import.meta.url);
10+
// eslint-disable-next-line
811
const __dirname = path.dirname(__filename);
912
const gitignorePath = path.resolve(__dirname, ".gitignore");
13+
/**
1014
const compat = new FlatCompat({
1115
baseDirectory: __dirname,
1216
recommendedConfig: js.configs.recommended,
1317
allConfig: js.configs.all
1418
});
19+
*/
1520

1621
export default [
1722
includeIgnoreFile(gitignorePath),
@@ -32,7 +37,7 @@ export default [
3237
"**/yarn-debug.log*",
3338
"**/yarn-error.log*",
3439
],
35-
}, ...compat.extends("../../.eslintrc.js"), {
40+
}, ...baseConfig, {
3641
languageOptions: {
3742
ecmaVersion: 5,
3843
sourceType: "script",
@@ -44,7 +49,6 @@ export default [
4449

4550
rules: {
4651
"@typescript-eslint/ban-ts-comment": "off",
47-
"@typescript-eslint/no-empty-object-type": "off",
4852
},
4953
}
5054
];

apps/docs/src/components/plasmic/Overview.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
//
2222
// You can also stop extending from DefaultOverviewProps altogether and have
2323
// total control over the props for your component.
24-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
2524
export interface OverviewProps extends DefaultOverviewProps {}
2625

2726
function Overview_(props: OverviewProps, ref: HTMLElementRefOf<"div">) {
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
const {
2-
defineConfig,
3-
globalIgnores,
4-
} = require("eslint/config");
51

6-
const globals = require("globals");
7-
const tsParser = require("@typescript-eslint/parser");
8-
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
9-
const react = require("eslint-plugin-react");
10-
const js = require("@eslint/js");
11-
12-
const {
13-
FlatCompat,
14-
} = require("@eslint/eslintrc");
2+
import { fileURLToPath } from "node:url";
3+
import { dirname } from "node:path";
4+
import globals from "globals";
5+
import tsParser from "@typescript-eslint/parser";
6+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
7+
import react from "eslint-plugin-react";
8+
import { defineConfig, globalIgnores } from "eslint/config";
9+
import js from "@eslint/js";
10+
import { FlatCompat } from "@eslint/eslintrc";
1511

12+
const __filename = fileURLToPath(import.meta.url);
13+
const __dirname = dirname(__filename);
1614
const compat = new FlatCompat({
1715
baseDirectory: __dirname,
1816
recommendedConfig: js.configs.recommended,
1917
allConfig: js.configs.all
2018
});
2119

22-
module.exports = defineConfig([{
20+
//module.exports = defineConfig([{
21+
export default defineConfig([{
2322
languageOptions: {
2423
globals: {
2524
...globals.browser,
@@ -62,6 +61,7 @@ module.exports = defineConfig([{
6261
"@typescript-eslint/no-misused-promises": "error",
6362
"@typescript-eslint/no-floating-promises": "error",
6463
"@typescript-eslint/no-explicit-any": "off",
64+
"@typescript-eslint/no-empty-object-type": "off",
6565
"@typescript-eslint/no-unused-expressions": "off",
6666

6767
"@typescript-eslint/no-unused-vars": ["warn", {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@eslint/eslintrc": "^3.3.1",
2323
"@eslint/js": "^9.31.0",
2424
"@typescript-eslint/eslint-plugin": "^8.37.0",
25+
"@typescript-eslint/parser": "^8.37.0",
2526
"eslint": "^9.31.0",
2627
"eslint-config-prettier": "^10.1.5",
2728
"eslint-plugin-react": "^7.37.5",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)