Skip to content

Commit b17618d

Browse files
authored
style: configure eslint and fix lint errors (#328)
1 parent 6143ba8 commit b17618d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+618
-626
lines changed

.eslintrc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

.prettierrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

.prettierrc.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import("prettier").Config} */
2+
export default {
3+
tabWidth: 4,
4+
semi: false,
5+
quotes: "single",
6+
}

eslint.config.mjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import eslintJS from "@eslint/js"
2+
import tsEslint from "typescript-eslint"
3+
4+
export default tsEslint.config({
5+
files: ["**/*.ts"],
6+
ignores: [
7+
"**/rs",
8+
"**/out",
9+
"**/pkg",
10+
"**/dist",
11+
"**/*.d.ts",
12+
"src/test/**/*",
13+
"src/wasm/**/*",
14+
"src/assets/**/*",
15+
"__mocks__/vscode.ts",
16+
],
17+
languageOptions: {
18+
parserOptions: {
19+
project: true,
20+
tsconfigRootDir: import.meta.dirname,
21+
},
22+
},
23+
extends: [
24+
eslintJS.configs.recommended,
25+
...tsEslint.configs.recommended,
26+
...tsEslint.configs.stylistic,
27+
],
28+
rules: {
29+
"@typescript-eslint/explicit-member-accessibility": [
30+
"off",
31+
{
32+
accessibility: "explicit",
33+
},
34+
],
35+
"arrow-parens": ["off", "always"],
36+
"import/order": "off",
37+
"@typescript-eslint/member-ordering": "off",
38+
"no-underscore-dangle": "off",
39+
"@typescript-eslint/naming-convention": "off",
40+
"jsdoc/newline-after-description": 0,
41+
"@typescript-eslint/consistent-indexed-object-style": "off",
42+
"@typescript-eslint/array-type": "off",
43+
"no-extra-boolean-cast": "off",
44+
"@typescript-eslint/no-empty-function": "off",
45+
"@typescript-eslint/no-explicit-any": "off",
46+
"@typescript-eslint/no-inferrable-types": "off",
47+
"@typescript-eslint/no-unused-vars": "off",
48+
"@typescript-eslint/ban-ts-comment": "off",
49+
"no-case-declarations": "off",
50+
"no-prototype-builtins": "off",
51+
"@typescript-eslint/consistent-type-definitions": "off",
52+
"@typescript-eslint/adjacent-overload-signatures": "off",
53+
},
54+
})

0 commit comments

Comments
 (0)