Skip to content

Commit b9bc6ce

Browse files
authored
Upgrade eslint to v9 (#517)
1 parent 3d4b67a commit b9bc6ce

19 files changed

+837
-646
lines changed

.eslintrc.cjs

-242
This file was deleted.

.prettierrc.cjs

-22
This file was deleted.

.prettierrc.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import type { Options } from 'prettier';
2+
3+
declare const options: Options;
4+
export = options;

.prettierrc.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// @ts-check
2+
3+
/**
4+
* @type {import('prettier').Config}
5+
*/
6+
export default {
7+
plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-packagejson'],
8+
singleQuote: true,
9+
trailingComma: 'all',
10+
overrides: [
11+
{
12+
files: '*.json5',
13+
options: {
14+
parser: 'json5',
15+
quoteProps: 'preserve',
16+
singleQuote: false,
17+
trailingComma: 'none',
18+
},
19+
},
20+
{
21+
files: '*.md',
22+
options: {
23+
// @ts-expect-error: known property
24+
organizeImportsSkipDestructiveCodeActions: true,
25+
},
26+
},
27+
{
28+
files: 'package.json',
29+
options: {
30+
packageSortOrder: ['name', 'version', 'description', 'scripts'],
31+
},
32+
},
33+
],
34+
};

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"vuepress",
3232
"yaml"
3333
],
34+
"eslint.options": {
35+
"flags": ["unstable_ts_config"]
36+
},
3437
"eslint.validate": ["javascript", "typescript"],
3538
"files.associations": {
3639
"*.json5": "jsonc"

0 commit comments

Comments
 (0)