Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriesler committed Nov 16, 2024
1 parent 69add86 commit 0720ddb
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 50 deletions.
44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

68 changes: 68 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import prettier from "eslint-plugin-prettier";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
{
ignores: [
"**/*.js",
"**/*.json",
"**/*.spec.ts",
"**/build",
"**/dist",
"**/node_modules",
],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
),
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
"@typescript-eslint": typescriptEslint,
prettier,
},
languageOptions: {
globals: {
...globals.node,
},
parser: tsParser,
ecmaVersion: 5,
sourceType: "commonjs",
parserOptions: {
tsconfigRootDir: "D:\\src\\github.com\\nodepen\\nodes",
project: [
"./apps/nodepen-client/tsconfig.json",
"./packages/core/tsconfig.json",
"./packages/nodes/tsconfig.json",
],
},
},
rules: {
"prettier/prettier": "error",
"no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": [0],
"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
}],
},
},
];
20 changes: 17 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"prettier": "^3.3.3",
"ts-jest": "^29.1.4",
"tsc-alias": "^1.8.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"build": "tsc",
"dev": "tsc -w --preserveWatchOutput",
"lint": "eslint --ext .ts,.tsx .",
"lint": "eslint .",
"test": "echo \"ok\""
}
}
4 changes: 2 additions & 2 deletions packages/nodes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"build": "tsc",
"postbuild": "tsc-alias",
"dev": "concurrently \"tsc-watch --noClear --onSuccess \\\"npm run prebuild\\\"\" \"tsc-alias -w\"",
"lint": "eslint --ext .ts,.tsx .",
"lint:fix": "eslint --fix --ext .ts,.tsx .",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "jest"
},
"dependencies": {
Expand Down

0 comments on commit 0720ddb

Please sign in to comment.