npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dao-style/vue-cli-plugin-lint

v0.1.0

Published

**peerDependencies:**

Downloads

181

Readme

@dao-style/vue-cli-plugin-lint

peerDependencies:

"@vue/cli-service": "^5.0.0-0"

usage:

//1.install
vue add #@dao-style/vue-cli-plugin-lint

//2.lint
npm run lint
npm run lint:style 
npm run lint:type
npm run lint:es

git add .
npx run lint-staged

//3.commit
npm run commit //利用commitizen 辅助填写提交信息
//或者

// git commit -m '<type>[scope]: <subject>

// [body]

// [footer]'

//符合conventional提交规范

Stylelint

package.json :

{
     "scripts":{
        "lint:style": "stylelint \"src/**/*.{vue,scss,css}\" --config .stylelintrc.js --fix",
    }
    "devDependencies":{
       "stylelint": "^14.3.0",
        "postcss-html": "^1.3.0",
        "stylelint-config-recommended-vue": "^1.1.0",
        "stylelint-config-recess-order": "^3.0.0",
        "stylelint-config-sass-guidelines": "^9.0.1", 

       
    }
    
}

.stylelintrc.js extends:

stylelint-config-recommended-vue 在最后

[ "stylelint-config-recess-order", "stylelint-config-sass-guidelines", "stylelint-config-recommended-vue", ]

Eslint

package.json :

{
  "scripts":{
    "lint:es": "eslint \"src/**/*.{js,jsx,ts,tsx,vue}\" --config .eslintrc.js --fix --max-warnings=0",
  }
  "devDependencies":{
    "eslint": "^8.7.0",
    "eslint-plugin-json": "^3.1.0",
    "eslint-plugin-vue": "^8.4.0",
    "@vue/eslint-config-airbnb": "^6.0.0",
    "eslint-plugin-vuejs-accessibility": "^1.1.1",

    //ts
    "@typescript-eslint/eslint-plugin": "^5.10.1",
    "@typescript-eslint/parser": "^5.10.1",
    "@vue/cli-plugin-typescript": "~5.0.0-rc.2",
    "@vue/eslint-config-typescript": "^9.1.0",
  }
  
}

.eslintrc.js:

{
  parserOptions: {
    ecmaVersion: 2020,
    parser: "@typescript-eslint/parser",
    sourceType: "module",
    extraFileExtensions: [".vue"],
  },
  plugins: ["vue", "@typescript-eslint"],
  extends: [
    "plugin:json/recommended",
    "plugin:vue/vue3-recommended",
    "@vue/airbnb",
    "@vue/typescript/recommended",
  ],
  rules:{
    ,//https://github.com/typescript-eslint/typescript-eslint/issues/2483
    'no-shadow': 'off',
    '@typescript-eslint/no-shadow': 'error'
  }
}

plugin:vue/vue3-recommended plugin:json/recommended

CommitLint

  • lint规则:符合conventional提交规范。

  • commitizen辅助填写提交信息。

package.json :

{
     "scripts": {
      "commit": "git-cz",
    },
    "config": {
      "commitizen": {
        "path": "@commitlint/cz-commitlint",
      },
    },
    "devDependencies": {
      "@commitlint/cli": "^16.0.2",
      "@commitlint/config-conventional": "^16.0.0",
      "@commitlint/cz-commitlint": "^16.0.0",
      "commitizen": "^4.2.4",
    },
    "gitHooks": {
      "commit-msg": "commitlint -E GIT_PARAMS",
    },
}