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

@moonphy/eslint-config-vue3

v0.1.3

Published

eslint配置

Downloads

1

Readme

eslint 配置

1. 使用方式

  1. 安装
npm i @moonphy/eslint-config-vue3 -D
  1. 使用 eslint.js
module.exports = {
    root: true,
    extends: ['@moonphy/eslint-config-vue3']
}

2. rules

    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-undef': 'off',
    'prefer-promise-reject-errors': 'off', // promise reject 可以不用带参数
    'no-new': 'off', // 可以使用new
    'space-before-function-paren': 'off',
    'vue/require-valid-default-prop': 'off',
    'vue/no-use-v-if-with-v-for': 'off',
    'vue/require-v-for-key': 'off',
    'vue/no-side-effects-in-computed-properties': 'off',
    'vue/no-unused-vars': 'off',
    'no-var': 'error', // 不允许使用var
    quotes: [1, 'single'], // 使用单引号
    radix: 'off',
    semi: ['error', 'never'], // 分号
    'brace-style': [2, '1tbs'], // 大括号风格
    'no-trailing-spaces': 2, // 一行结束后面有空格就发出警告
    'space-before-blocks': 2, // if function等的大括号之前需要有空格
    'spaced-comment': 2, // 注释双斜线后加空格
    'arrow-spacing': 2, // 箭头函数的箭头前后必须要有空格
    'arrow-parens': [2, 'as-needed'], // "always" (默认) 要求在所有情况下使用圆括号将参数括起来。 "as-needed" 在可以省略括号的地方强制不使用括号
    'keyword-spacing': [2, { before: true, after: true }], // 关键字前后必须加空格
    'space-infix-ops': 2, // 要求中缀操作符周围有空格
    'comma-spacing': 2, // 强制在逗号周围使用空格 [2, 3, 3, 4]
    'no-multiple-empty-lines': 2, // 不要有多个连续空行。
    'array-bracket-spacing': ['error', 'never'], // 数组间的空格
    'block-spacing': ['error', 'always'], // 禁止或强制在代码块中开括号前和闭括号后有空格
    'object-curly-spacing': ['error', 'always'], // 强制在花括号中使用一致的空格

    // 这些规则与 JavaScript 代码中可能的错误或逻辑错误有关:
    'for-direction': 2, // 强制 “for” 循环中更新子句的计数器朝着正确的方向移动
    'no-await-in-loop': 2, // 禁止在循环中 出现 await 请使用Promise.all()重构
    'no-compare-neg-zero': 2, // 禁止与 -0 进行比较 请使用Object.is(x, -0)。
    'vue/multi-word-component-names': 'off'