Skip to content

Commit

Permalink
fix: unocss migration
Browse files Browse the repository at this point in the history
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
  • Loading branch information
nekomeowww committed Jul 10, 2024
1 parent b1a4434 commit 32e050c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
37 changes: 30 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
Expand All @@ -21,7 +34,17 @@
"markdown",
"json",
"jsonc",
"yaml"
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"css",
"less",
"scss",
"pcss",
"postcss"
],
"typescript.tsdk": "node_modules/typescript/lib"
}
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Plugin } from 'obsidian'
import { ViewPlugin } from '@codemirror/view'
import type { EditorView, PluginValue, ViewUpdate } from '@codemirror/view'
import { createGenerator } from 'unocss'
import type { UnoGenerator } from 'unocss'
import { createGenerator } from '@unocss/core'
import type { UnoGenerator } from '@unocss/core'

import { evaluateUserConfig } from './config'
import { defaultConfigRaw } from './constants'
Expand Down

0 comments on commit 32e050c

Please sign in to comment.