Skip to content

Commit 85e1eff

Browse files
committed
wip
1 parent b732275 commit 85e1eff

10 files changed

Lines changed: 242 additions & 239 deletions

File tree

bun.lockb

49.3 KB
Binary file not shown.

eslint.config.mjs

Lines changed: 140 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import * as effectEslint from "@effect/eslint-plugin";
12
import { fixupPluginRules } from "@eslint/compat";
23
import { FlatCompat } from "@eslint/eslintrc";
34
import js from "@eslint/js";
45
import json from "@eslint/json";
56
import markdown from "@eslint/markdown";
67
import tsParser from "@typescript-eslint/parser";
7-
import deprecation from "eslint-plugin-deprecation";
88
import _import from "eslint-plugin-import";
99
import simpleImportSort from "eslint-plugin-simple-import-sort";
1010
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys";
@@ -14,143 +14,146 @@ import { fileURLToPath } from "node:url";
1414
const __filename = fileURLToPath(import.meta.url);
1515
const __dirname = path.dirname(__filename);
1616
const compat = new FlatCompat({
17-
baseDirectory: __dirname,
18-
recommendedConfig: js.configs.recommended,
19-
allConfig: js.configs.all,
17+
baseDirectory: __dirname,
18+
recommendedConfig: js.configs.recommended,
19+
allConfig: js.configs.all,
2020
});
2121

2222
export default [
23-
{
24-
ignores: ["**/dist", "**/build", "**/docs"],
25-
},
26-
...compat.extends(
27-
"eslint:recommended",
28-
"plugin:@typescript-eslint/eslint-recommended",
29-
"plugin:@typescript-eslint/recommended",
30-
"plugin:@effect/recommended",
31-
),
32-
{
33-
files: ["src/**/*.{ts,tsx,js,jsx,mjs}", "test/**/*.ts"],
34-
plugins: {
35-
deprecation,
36-
import: fixupPluginRules(_import),
37-
"sort-destructure-keys": sortDestructureKeys,
38-
"simple-import-sort": simpleImportSort,
39-
},
40-
languageOptions: {
41-
parser: tsParser,
42-
ecmaVersion: 2018,
43-
sourceType: "module",
44-
},
45-
settings: {
46-
"import/parsers": {
47-
"@typescript-eslint/parser": [".ts", ".tsx"],
48-
},
49-
"import/resolver": {
50-
typescript: {
51-
alwaysTryTypes: true,
52-
},
53-
},
54-
},
55-
rules: {
56-
"no-fallthrough": "off",
57-
"no-irregular-whitespace": "off",
58-
"object-shorthand": "error",
59-
"prefer-destructuring": "off",
60-
"sort-imports": "off",
61-
62-
"no-restricted-syntax": [
63-
"error",
64-
{
65-
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
66-
message: "Do not use spread arguments in Array.push",
67-
},
68-
],
69-
70-
"no-console": "off",
71-
"no-unused-vars": "off",
72-
"prefer-rest-params": "off",
73-
"prefer-spread": "off",
74-
"import/first": "error",
75-
"import/newline-after-import": "error",
76-
"import/no-duplicates": "error",
77-
"import/no-unresolved": "off",
78-
"import/order": "off",
79-
"simple-import-sort/imports": "off",
80-
"sort-destructure-keys/sort-destructure-keys": "error",
81-
"deprecation/deprecation": "off",
82-
83-
"@typescript-eslint/array-type": [
84-
"warn",
85-
{
86-
default: "generic",
87-
readonly: "generic",
88-
},
89-
],
90-
91-
"@typescript-eslint/member-delimiter-style": 0,
92-
"@typescript-eslint/no-non-null-assertion": "off",
93-
"@typescript-eslint/ban-types": "off",
94-
"@typescript-eslint/no-explicit-any": "off",
95-
"@typescript-eslint/no-empty-interface": "off",
96-
"@typescript-eslint/consistent-type-imports": "warn",
97-
98-
"@typescript-eslint/no-unused-vars": [
99-
"error",
100-
{
101-
argsIgnorePattern: "^_",
102-
varsIgnorePattern: "^_",
103-
},
104-
],
105-
106-
"@typescript-eslint/ban-ts-comment": "off",
107-
"@typescript-eslint/camelcase": "off",
108-
"@typescript-eslint/explicit-function-return-type": "off",
109-
"@typescript-eslint/explicit-module-boundary-types": "off",
110-
"@typescript-eslint/interface-name-prefix": "off",
111-
"@typescript-eslint/no-array-constructor": "off",
112-
"@typescript-eslint/no-use-before-define": "off",
113-
"@typescript-eslint/no-namespace": "off",
114-
115-
"@effect/dprint": [
116-
"error",
117-
{
118-
config: {
119-
indentWidth: 2,
120-
lineWidth: 120,
121-
semiColons: "asi",
122-
quoteStyle: "alwaysDouble",
123-
trailingCommas: "never",
124-
operatorPosition: "maintain",
125-
"arrowFunction.useParentheses": "force",
126-
},
127-
},
128-
],
129-
},
130-
},
131-
{
132-
files: ["**/*.json"],
133-
plugins: {
134-
json,
135-
},
136-
language: "json/json",
137-
138-
rules: {
139-
"json/no-duplicate-keys": "error",
140-
141-
"no-irregular-whitespace": "off",
142-
},
143-
},
144-
{
145-
files: ["**/*.md"],
146-
plugins: {
147-
markdown,
148-
},
149-
language: "markdown/commonmark",
150-
rules: {
151-
"markdown/no-html": "error",
152-
153-
"no-irregular-whitespace": "off",
154-
},
155-
},
23+
{
24+
ignores: ["**/dist", "**/build", "**/docs"],
25+
},
26+
...compat.extends(
27+
"eslint:recommended",
28+
"plugin:@typescript-eslint/eslint-recommended",
29+
"plugin:@typescript-eslint/recommended",
30+
),
31+
...effectEslint.configs.dprint,
32+
{
33+
plugins: {
34+
import: fixupPluginRules(_import),
35+
"sort-destructure-keys": sortDestructureKeys,
36+
"simple-import-sort": simpleImportSort,
37+
},
38+
39+
languageOptions: {
40+
parser: tsParser,
41+
ecmaVersion: 2018,
42+
sourceType: "module",
43+
},
44+
45+
settings: {
46+
"import/parsers": {
47+
"@typescript-eslint/parser": [".ts", ".tsx"],
48+
},
49+
50+
"import/resolver": {
51+
typescript: {
52+
alwaysTryTypes: true,
53+
},
54+
},
55+
},
56+
57+
rules: {
58+
"no-fallthrough": "off",
59+
"no-irregular-whitespace": "off",
60+
"object-shorthand": "error",
61+
"prefer-destructuring": "off",
62+
"sort-imports": "off",
63+
64+
"no-restricted-syntax": [
65+
"error",
66+
{
67+
selector:
68+
"CallExpression[callee.property.name='push'] > SpreadElement.arguments",
69+
message: "Do not use spread arguments in Array.push",
70+
},
71+
],
72+
73+
"no-unused-vars": "off",
74+
"require-yield": "off",
75+
"prefer-rest-params": "off",
76+
"prefer-spread": "off",
77+
"import/first": "error",
78+
"import/newline-after-import": "error",
79+
"import/no-duplicates": "error",
80+
"import/no-unresolved": "off",
81+
"import/order": "off",
82+
"simple-import-sort/imports": "off",
83+
"sort-destructure-keys/sort-destructure-keys": "error",
84+
"deprecation/deprecation": "off",
85+
86+
"@typescript-eslint/array-type": [
87+
"warn",
88+
{
89+
default: "generic",
90+
readonly: "generic",
91+
},
92+
],
93+
94+
"@typescript-eslint/member-delimiter-style": 0,
95+
"@typescript-eslint/no-non-null-assertion": "off",
96+
"@typescript-eslint/ban-types": "off",
97+
"@typescript-eslint/no-explicit-any": "off",
98+
"@typescript-eslint/no-empty-interface": "off",
99+
"@typescript-eslint/consistent-type-imports": "warn",
100+
101+
"@typescript-eslint/no-unused-vars": [
102+
"error",
103+
{
104+
argsIgnorePattern: "^_",
105+
varsIgnorePattern: "^_",
106+
},
107+
],
108+
109+
"@typescript-eslint/ban-ts-comment": "off",
110+
"@typescript-eslint/camelcase": "off",
111+
"@typescript-eslint/explicit-function-return-type": "off",
112+
"@typescript-eslint/explicit-module-boundary-types": "off",
113+
"@typescript-eslint/interface-name-prefix": "off",
114+
"@typescript-eslint/no-array-constructor": "off",
115+
"@typescript-eslint/no-use-before-define": "off",
116+
"@typescript-eslint/no-namespace": "off",
117+
118+
"@effect/dprint": [
119+
"error",
120+
{
121+
config: {
122+
indentWidth: 2,
123+
lineWidth: 120,
124+
semiColons: "asi",
125+
quoteStyle: "alwaysDouble",
126+
trailingCommas: "never",
127+
operatorPosition: "maintain",
128+
"arrowFunction.useParentheses": "force",
129+
},
130+
},
131+
],
132+
},
133+
},
134+
{
135+
files: ["**/*.json"],
136+
plugins: {
137+
json,
138+
},
139+
language: "json/json",
140+
141+
rules: {
142+
"json/no-duplicate-keys": "error",
143+
144+
"no-irregular-whitespace": "off",
145+
},
146+
},
147+
{
148+
files: ["**/*.md"],
149+
plugins: {
150+
markdown,
151+
},
152+
language: "markdown/commonmark",
153+
rules: {
154+
"markdown/no-html": "error",
155+
156+
"no-irregular-whitespace": "off",
157+
},
158+
},
156159
];

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
default = pkgs.mkShell {
1313
packages = with pkgs; [
1414
bun
15-
nodejs_23
1615
];
1716
};
1817
});

0 commit comments

Comments
 (0)