Skip to content

Commit 32e050c

Browse files
committed
fix: unocss migration
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
1 parent b1a4434 commit 32e050c

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

.vscode/settings.json

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
{
2+
// Disable the default formatter, use eslint instead
23
"prettier.enable": false,
34
"editor.formatOnSave": false,
5+
6+
// Auto fix
47
"editor.codeActionsOnSave": {
58
"source.fixAll.eslint": "explicit",
69
"source.organizeImports": "never"
710
},
8-
// Enable the ESlint flat config support
9-
"eslint.experimental.useFlatConfig": true,
10-
// The following is optional.
11-
// It's better to put under project setting `.vscode/settings.json`
12-
// to avoid conflicts with working with different eslint configs
13-
// that does not support all formats.
11+
12+
// Silent the stylistic rules in you IDE, but still auto fix them
13+
"eslint.rules.customizations": [
14+
{ "rule": "style/*", "severity": "off" },
15+
{ "rule": "format/*", "severity": "off" },
16+
{ "rule": "*-indent", "severity": "off" },
17+
{ "rule": "*-spacing", "severity": "off" },
18+
{ "rule": "*-spaces", "severity": "off" },
19+
{ "rule": "*-order", "severity": "off" },
20+
{ "rule": "*-dangle", "severity": "off" },
21+
{ "rule": "*-newline", "severity": "off" },
22+
{ "rule": "*quotes", "severity": "off" },
23+
{ "rule": "*semi", "severity": "off" }
24+
],
25+
26+
// Enable eslint for all supported languages
1427
"eslint.validate": [
1528
"javascript",
1629
"javascriptreact",
@@ -21,7 +34,17 @@
2134
"markdown",
2235
"json",
2336
"jsonc",
24-
"yaml"
37+
"yaml",
38+
"toml",
39+
"xml",
40+
"gql",
41+
"graphql",
42+
"astro",
43+
"css",
44+
"less",
45+
"scss",
46+
"pcss",
47+
"postcss"
2548
],
2649
"typescript.tsdk": "node_modules/typescript/lib"
2750
}

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Plugin } from 'obsidian'
22
import { ViewPlugin } from '@codemirror/view'
33
import type { EditorView, PluginValue, ViewUpdate } from '@codemirror/view'
4-
import { createGenerator } from 'unocss'
5-
import type { UnoGenerator } from 'unocss'
4+
import { createGenerator } from '@unocss/core'
5+
import type { UnoGenerator } from '@unocss/core'
66

77
import { evaluateUserConfig } from './config'
88
import { defaultConfigRaw } from './constants'

0 commit comments

Comments
 (0)