Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.7 #258

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

v0.7 #258

wants to merge 14 commits into from

Conversation

fi3ework
Copy link
Owner

v0.7

Breaking changes:

💥 Split check abilities into separate packages

After v0.7, the usage will be like:

package.json

"vite-plugin-checker": "some version", 
"@vite-plugin-checker/eslint": "some version",
"eslint": "some version"

vite config

import { defineConfig } from 'vite'
import { checker } from 'vite-plugin-checker'
import { checker as eslint } from '@vite-plugin-checker/eslint'

export default defineConfig({
  plugins: [
    checker(
      [
        eslint({
          lintCommand: 'eslint ./src --ext .ts',
        }),
      ],
      {
        enableBuild: false,
      }
    ),
  ],
})

Why?

  • Friendly to user, user does not need to install any low-level packages dependented by ESLint for Stylelint.
  • vite-plugin-checker's dependencies will be much cleaner. No useless dependencies will be installed.
  • For better extensibility of the plugin, the checker count is scalable.

💥 Remove default export support

After v0.7, no default export will be provided from vite-plugin-checker to reduce ESM and CJS potential issues. The named export checker will be the only one to use. Also, new added checker packages will not provide default export but also a named export checker.

@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2023

⚠️ No Changeset found

Latest commit: 41d8350

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Jul 11, 2023

Deploy Preview for vite-plugin-checker ready!

Name Link
🔨 Latest commit 41d8350
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-checker/deploys/65bd30045197680008fddd98
😎 Deploy Preview https://deploy-preview-258--vite-plugin-checker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 69 to 71
"vscode-languageclient": "^7.0.0",
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
Copy link

@armano2 armano2 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those dependencies should be moved to vls package, as thats the only one that requires it

import fs from 'fs'
import { createRequire } from 'module'
import os from 'os'
import os from 'node:os'
import strip from 'strip-ansi'
import * as _vscodeUri from 'vscode-uri'

// hack to compatible with Jiti
// see details: https://github.com/fi3ework/vite-plugin-checker/issues/197
// @ts-expect-error
const URI = _vscodeUri?.default?.URI ?? _vscodeUri.URI
Copy link

@armano2 armano2 Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this "hack" should be moved to places where we import vscode-uri, as its no longer used in here we should remove it from this file


we should move it to vls package with its depencency

let level = DiagnosticLevel.Error
switch (d.severity) {
case 0: // off, ignore this
level = DiagnosticLevel.Error
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assign is unnecessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants