Skip to content

Commit 4b04168

Browse files
committed
chore: fix prettier in lint
1 parent d7728d9 commit 4b04168

45 files changed

Lines changed: 1048 additions & 877 deletions

Some content is hidden

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

config/eslint.config.mjs

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
// @ts-check
22

33
import eslint from "@eslint/js";
4-
import eslintPluginPrettierRecommended from "eslint-plugin-prettier";
4+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
55
import tseslint from "typescript-eslint";
66

77
import { dirname } from "path";
88
import { fileURLToPath } from "url";
99

10-
export default tseslint.config({
11-
files: ["**/*.ts"],
12-
extends: [
13-
eslint.configs.recommended,
14-
...tseslint.configs.recommendedTypeChecked,
15-
],
16-
rules: {
17-
"@typescript-eslint/no-unused-vars": [
18-
"error",
19-
{
20-
args: "all",
21-
argsIgnorePattern: "^_",
22-
caughtErrors: "all",
23-
caughtErrorsIgnorePattern: "^_",
24-
destructuredArrayIgnorePattern: "^_",
25-
varsIgnorePattern: "^_",
26-
ignoreRestSiblings: true,
27-
},
28-
],
29-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
30-
"@typescript-eslint/no-unsafe-member-access": "off",
31-
"@typescript-eslint/require-await": "off",
32-
"no-empty": "off",
33-
"prefer-const": [
34-
"error",
35-
{ ignoreReadBeforeAssign: true, destructuring: "all" },
10+
export default [
11+
...tseslint.config({
12+
files: ["**/*.ts"],
13+
extends: [
14+
eslint.configs.recommended,
15+
...tseslint.configs.recommendedTypeChecked,
3616
],
37-
},
38-
plugins: { prettier: eslintPluginPrettierRecommended },
39-
languageOptions: {
40-
parserOptions: {
41-
project: true,
42-
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
17+
rules: {
18+
"@typescript-eslint/no-unused-vars": [
19+
"error",
20+
{
21+
args: "all",
22+
argsIgnorePattern: "^_",
23+
caughtErrors: "all",
24+
caughtErrorsIgnorePattern: "^_",
25+
destructuredArrayIgnorePattern: "^_",
26+
varsIgnorePattern: "^_",
27+
ignoreRestSiblings: true,
28+
},
29+
],
30+
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
31+
"@typescript-eslint/no-unsafe-member-access": "off",
32+
"@typescript-eslint/require-await": "off",
33+
"no-empty": "off",
34+
"prefer-const": [
35+
"error",
36+
{ ignoreReadBeforeAssign: true, destructuring: "all" },
37+
],
38+
},
39+
languageOptions: {
40+
parserOptions: {
41+
project: true,
42+
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
43+
},
4344
},
44-
},
45-
});
45+
}),
46+
eslintPluginPrettierRecommended,
47+
];

packages/ccc/eslint.config.mjs

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
// @ts-check
22

33
import eslint from "@eslint/js";
4-
import eslintPluginPrettierRecommended from "eslint-plugin-prettier";
4+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
55
import tseslint from "typescript-eslint";
66

77
import { dirname } from "path";
88
import { fileURLToPath } from "url";
99

10-
export default tseslint.config({
11-
files: ["**/*.ts"],
12-
extends: [
13-
eslint.configs.recommended,
14-
...tseslint.configs.recommendedTypeChecked,
15-
],
16-
rules: {
17-
"@typescript-eslint/no-unused-vars": [
18-
"error",
19-
{
20-
args: "all",
21-
argsIgnorePattern: "^_",
22-
caughtErrors: "all",
23-
caughtErrorsIgnorePattern: "^_",
24-
destructuredArrayIgnorePattern: "^_",
25-
varsIgnorePattern: "^_",
26-
ignoreRestSiblings: true,
27-
},
28-
],
29-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
30-
"@typescript-eslint/no-unsafe-member-access": "off",
31-
"@typescript-eslint/require-await": "off",
32-
"no-empty": "off",
33-
"prefer-const": [
34-
"error",
35-
{ ignoreReadBeforeAssign: true, destructuring: "all" },
10+
export default [
11+
...tseslint.config({
12+
files: ["**/*.ts"],
13+
extends: [
14+
eslint.configs.recommended,
15+
...tseslint.configs.recommendedTypeChecked,
3616
],
37-
},
38-
plugins: { prettier: eslintPluginPrettierRecommended },
39-
languageOptions: {
40-
parserOptions: {
41-
project: true,
42-
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
17+
rules: {
18+
"@typescript-eslint/no-unused-vars": [
19+
"error",
20+
{
21+
args: "all",
22+
argsIgnorePattern: "^_",
23+
caughtErrors: "all",
24+
caughtErrorsIgnorePattern: "^_",
25+
destructuredArrayIgnorePattern: "^_",
26+
varsIgnorePattern: "^_",
27+
ignoreRestSiblings: true,
28+
},
29+
],
30+
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
31+
"@typescript-eslint/no-unsafe-member-access": "off",
32+
"@typescript-eslint/require-await": "off",
33+
"no-empty": "off",
34+
"prefer-const": [
35+
"error",
36+
{ ignoreReadBeforeAssign: true, destructuring: "all" },
37+
],
38+
},
39+
languageOptions: {
40+
parserOptions: {
41+
project: true,
42+
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
43+
},
4344
},
44-
},
45-
});
45+
}),
46+
eslintPluginPrettierRecommended,
47+
];

packages/ckb-ccc/eslint.config.mjs

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
// @ts-check
22

33
import eslint from "@eslint/js";
4-
import eslintPluginPrettierRecommended from "eslint-plugin-prettier";
4+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
55
import tseslint from "typescript-eslint";
66

77
import { dirname } from "path";
88
import { fileURLToPath } from "url";
99

10-
export default tseslint.config({
11-
files: ["**/*.ts"],
12-
extends: [
13-
eslint.configs.recommended,
14-
...tseslint.configs.recommendedTypeChecked,
15-
],
16-
rules: {
17-
"@typescript-eslint/no-unused-vars": [
18-
"error",
19-
{
20-
args: "all",
21-
argsIgnorePattern: "^_",
22-
caughtErrors: "all",
23-
caughtErrorsIgnorePattern: "^_",
24-
destructuredArrayIgnorePattern: "^_",
25-
varsIgnorePattern: "^_",
26-
ignoreRestSiblings: true,
27-
},
28-
],
29-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
30-
"@typescript-eslint/no-unsafe-member-access": "off",
31-
"@typescript-eslint/require-await": "off",
32-
"no-empty": "off",
33-
"prefer-const": [
34-
"error",
35-
{ ignoreReadBeforeAssign: true, destructuring: "all" },
10+
export default [
11+
...tseslint.config({
12+
files: ["**/*.ts"],
13+
extends: [
14+
eslint.configs.recommended,
15+
...tseslint.configs.recommendedTypeChecked,
3616
],
37-
},
38-
plugins: { prettier: eslintPluginPrettierRecommended },
39-
languageOptions: {
40-
parserOptions: {
41-
project: true,
42-
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
17+
rules: {
18+
"@typescript-eslint/no-unused-vars": [
19+
"error",
20+
{
21+
args: "all",
22+
argsIgnorePattern: "^_",
23+
caughtErrors: "all",
24+
caughtErrorsIgnorePattern: "^_",
25+
destructuredArrayIgnorePattern: "^_",
26+
varsIgnorePattern: "^_",
27+
ignoreRestSiblings: true,
28+
},
29+
],
30+
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
31+
"@typescript-eslint/no-unsafe-member-access": "off",
32+
"@typescript-eslint/require-await": "off",
33+
"no-empty": "off",
34+
"prefer-const": [
35+
"error",
36+
{ ignoreReadBeforeAssign: true, destructuring: "all" },
37+
],
38+
},
39+
languageOptions: {
40+
parserOptions: {
41+
project: true,
42+
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
43+
},
4344
},
44-
},
45-
});
45+
}),
46+
eslintPluginPrettierRecommended,
47+
];
Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
// @ts-check
22

33
import eslint from "@eslint/js";
4-
import eslintPluginPrettierRecommended from "eslint-plugin-prettier";
4+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
55
import tseslint from "typescript-eslint";
66

77
import { dirname } from "path";
88
import { fileURLToPath } from "url";
99

10-
export default tseslint.config({
11-
files: ["**/*.ts"],
12-
extends: [
13-
eslint.configs.recommended,
14-
...tseslint.configs.recommendedTypeChecked,
15-
],
16-
rules: {
17-
"@typescript-eslint/no-unused-vars": [
18-
"error",
19-
{
20-
args: "all",
21-
argsIgnorePattern: "^_",
22-
caughtErrors: "all",
23-
caughtErrorsIgnorePattern: "^_",
24-
destructuredArrayIgnorePattern: "^_",
25-
varsIgnorePattern: "^_",
26-
ignoreRestSiblings: true,
27-
},
28-
],
29-
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
30-
"@typescript-eslint/no-unsafe-member-access": "off",
31-
"@typescript-eslint/require-await": "off",
32-
"no-empty": "off",
33-
"prefer-const": [
34-
"error",
35-
{ ignoreReadBeforeAssign: true, destructuring: "all" },
10+
export default [
11+
...tseslint.config({
12+
files: ["**/*.ts"],
13+
extends: [
14+
eslint.configs.recommended,
15+
...tseslint.configs.recommendedTypeChecked,
3616
],
37-
},
38-
plugins: { prettier: eslintPluginPrettierRecommended },
39-
languageOptions: {
40-
parserOptions: {
41-
project: true,
42-
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
17+
rules: {
18+
"@typescript-eslint/no-unused-vars": [
19+
"error",
20+
{
21+
args: "all",
22+
argsIgnorePattern: "^_",
23+
caughtErrors: "all",
24+
caughtErrorsIgnorePattern: "^_",
25+
destructuredArrayIgnorePattern: "^_",
26+
varsIgnorePattern: "^_",
27+
ignoreRestSiblings: true,
28+
},
29+
],
30+
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
31+
"@typescript-eslint/no-unsafe-member-access": "off",
32+
"@typescript-eslint/require-await": "off",
33+
"no-empty": "off",
34+
"prefer-const": [
35+
"error",
36+
{ ignoreReadBeforeAssign: true, destructuring: "all" },
37+
],
38+
},
39+
languageOptions: {
40+
parserOptions: {
41+
project: true,
42+
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
43+
},
4344
},
44-
},
45-
});
45+
}),
46+
eslintPluginPrettierRecommended,
47+
];

0 commit comments

Comments
 (0)