Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping #1024

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
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: [
"**/dist/",
"**/node_modules/",
"**/coverage/",
"**/jest.config.*",
"test/**/src/",
],
}, ...compat.extends("plugin:@typescript-eslint/recommended", "prettier"), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "module",

parserOptions: {
project: "tsconfig.json",
},
},

rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
},
}, {
files: ["**/*.js"],

rules: {
"@typescript-eslint/no-var-requires": "off",
},
}];
108 changes: 95 additions & 13 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"clean:test": "ts-node scripts/clean",
"compile": "tsc -p tsconfig.base.json",
"format": "prettier --write \"**/*.{js,ts}\"",
"lint": "eslint . --ext .js,.ts",
"lint": "eslint .",
"release": "tanem-scripts release",
"test": "run-s check lint clean compile && ts-node scripts/test"
},
Expand All @@ -44,6 +44,8 @@
"@starptech/prettyhtml": "^0.10.0"
},
"devDependencies": {
"@eslint/eslintrc": "3.2.0",
"@eslint/js": "9.15.0",
"@types/fs-extra": "11.0.4",
"@types/jest": "29.5.14",
"@typescript-eslint/eslint-plugin": "7.18.0",
Expand Down
7 changes: 7 additions & 0 deletions test/jest/29.6/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"private": true,
"devDependencies": {
"jest": "29.6",
"ts-jest": "29.x"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"exclude": ["node_modules"],
"include": [".eslintrc.js", "scripts", "src"]
"include": ["eslint.config.mjs", "scripts", "src"]
}