Skip to content

Commit

Permalink
eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
banterability committed Jul 1, 2024
1 parent e85d9d4 commit 32ffe91
Show file tree
Hide file tree
Showing 5 changed files with 262 additions and 68 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.cjs

This file was deleted.

65 changes: 65 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import path from "node:path";
import { fileURLToPath } from "node:url";

import { fixupPluginRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import _import from "eslint-plugin-import";
import globals from "globals";

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/"],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
import: fixupPluginRules(_import),
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
},

rules: {
"import/order": [
"error",
{
alphabetize: {
order: "asc",
caseInsensitive: true,
},

groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"type",
],
"newlines-between": "always",
},
],
},
},
];
Loading

0 comments on commit 32ffe91

Please sign in to comment.