Skip to content

Commit

Permalink
Fix peer deps / linting / sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
philogicae committed Sep 24, 2024
1 parent f3dbae5 commit 4ac26d5
Show file tree
Hide file tree
Showing 55 changed files with 1,174 additions and 282 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

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

This file was deleted.

62 changes: 62 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { fixupConfigRules } from "@eslint/compat";
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: ["**/node_modules/", "**/dist/", "**/docs/"],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
)), {
settings: {
"import/resolver": {
node: {
paths: ["packages/**"],
extensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
},
},

"import/ignore": ["./node_modules", "./dist"],
},

rules: {
"@typescript-eslint/no-explicit-any": "off",

"import/order": ["error", {
"newlines-between": "always",
groups: [["builtin", "external"], ["internal"]],

pathGroups: [{
pattern: "react",
group: "external",
position: "before",
}, {
pattern: "@/**",
group: "internal",
position: "before",
}],

alphabetize: {
order: "asc",
caseInsensitive: true,
},
}],
},
}, {
files: ["examples/**/*.{ts,tsx}"],
rules: {
"import/no-unresolved": "off",
},
}];
Loading

0 comments on commit 4ac26d5

Please sign in to comment.