Skip to content

Commit

Permalink
Remove dependency to gts
Browse files Browse the repository at this point in the history
Based on the current config of the BudouX and google/budoux#187.
  • Loading branch information
kojiishi committed Dec 25, 2024
1 parent 007d7a7 commit 459de10
Show file tree
Hide file tree
Showing 5 changed files with 4,369 additions and 2,521 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

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

rules: {
"prettier/prettier": "error",
"block-scoped-var": "error",
eqeqeq: "error",
"no-var": "error",
"prefer-const": "error",
"eol-last": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",

quotes: ["warn", "single", {
avoidEscape: true,
}],

"no-restricted-properties": ["error", {
object: "describe",
property: "only",
}, {
object: "it",
property: "only",
}],
},
}, ...compat.extends("plugin:@typescript-eslint/recommended").map(config => ({
...config,
files: ["**/*.ts", "**/*.tsx"],
})), {
files: ["**/*.ts", "**/*.tsx"],

languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: "module",
},

rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-warning-comments": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/camelcase": "off",
"node/no-empty-function": "off",
"node/no-missing-import": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-require": "off",
"node/shebang": "off",
"no-dupe-class-members": "off",
"require-atomic-updates": "off",
},
}];
Loading

0 comments on commit 459de10

Please sign in to comment.