Socket
Book a DemoInstallSign in
Socket

@modyqyw/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modyqyw/eslint-config

An ESLint shareable config for JavaScript/TypeScript/React/ReactNative/Taro/Vue2/Vue3/UniApp projects.

latest
Source
npmnpm
Version
1.9.4
Version published
Maintainers
1
Created
Source

DEPRECATED. Check @modyqyw/fabric.

@modyqyw/eslint-config

An ESLint shareable config for JavaScript/TypeScript/React/ReactNative/Taro/Vue2/Vue3/UniApp projects.

Usage

JavaScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw"],
};

TypeScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw"],
};

React / ReactNative / Taro3 + JavaScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/react"],
};

React / ReactNative / Taro3 + TypeScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/react"],
};

Vue2 / UniApp + JavaScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue2"],
};

Vue2 / UniApp + TypeScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue2-typescript"],
};

Vue3 / UniApp + JavaScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue3"],
};

Vue3 / UniApp + TypeScript

npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
  extends: ["@modyqyw/eslint-config/vue3-typescript"],
};

VSCode

  • Install plugins.
  • Set up Settings.json. Then F1 => Format Document => F1 => File: Save.
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue"
  ],
  "files.eol": "\n",
  "files.associations": {
    "*.wxml": "html",
    "*.wxs": "javascript",
    "*.wxss": "css",
    "*.axml": "html",
    "*.sjs": "javascript",
    "*.acss": "css",
    "*.swan": "html",
    "*.ttml": "html",
    "*.ttss": "css",
    "*.jxml": "html",
    "*.jxss": "css",
    "*.wpy": "vue",
    "*.nvue": "vue",
    "*.ux": "vue"
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  }
}

More Configs

@modyqyw/eslint-config and @modyqyw/stylelint-config do not use any Prettier config and plugin, while @modyqyw/fabric does.

License

MIT

Copyright (c) 2020-present MillCloud

Keywords

eslint

FAQs

Package last updated on 20 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.