All Projects → mingelz → eslint-config-mingelz

mingelz / eslint-config-mingelz

Licence: MIT license
A shared ESLint configuration with Chinese comments. 一份带有完整中文注释的 ESLint 规则。

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eslint-config-mingelz

Javascript
JavaScript Style Guide
Stars: ✭ 117,286 (+781806.67%)
Mutual labels:  styleguide, linting, style-guide
Ue4 Style Guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,656 (+17606.67%)
Mutual labels:  styleguide, linting, style-guide
ue5-style-guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,892 (+19180%)
Mutual labels:  styleguide, linting, style-guide
Javascript Style Guide
Airbnb JavaScript 스타일 가이드
Stars: ✭ 132 (+780%)
Mutual labels:  styleguide, linting, style-guide
python
Python Style Guide
Stars: ✭ 49 (+226.67%)
Mutual labels:  styleguide, linting, style-guide
Javascript Airbnb
Перевод «JavaScript Style Guide» от Airbnb
Stars: ✭ 579 (+3760%)
Mutual labels:  styleguide, linting, style-guide
Typescript Guidelines
The TypeScript Guidebook
Stars: ✭ 104 (+593.33%)
Mutual labels:  styleguide, linting, style-guide
styleguide
Official code style guide of Banksalad
Stars: ✭ 91 (+506.67%)
Mutual labels:  styleguide, style-guide
Styleguide Generators
An overview of automatic living styleguide generators
Stars: ✭ 1,902 (+12580%)
Mutual labels:  styleguide, style-guide
Vue Styleguidist
Created from react styleguidist for Vue Components with a living style guide
Stars: ✭ 2,133 (+14120%)
Mutual labels:  styleguide, style-guide
Frontend Nanodegree Styleguide Zh
优达学城(Udacity)前端样式指南
Stars: ✭ 188 (+1153.33%)
Mutual labels:  styleguide, style-guide
Stylemark
Generate interactive style guides from Markdown.
Stars: ✭ 217 (+1346.67%)
Mutual labels:  styleguide, style-guide
chinese-learner
A desktop web application for learning Mandarin Chinese and its character stroke order.
Stars: ✭ 22 (+46.67%)
Mutual labels:  chinese, mandarin
Vue Styleguide Generator
React inspired style guide generator for Vue.js
Stars: ✭ 123 (+720%)
Mutual labels:  styleguide, style-guide
Android Kotlin Style Guide
Kotlin style guide of FRESH LIVE since April, 2015.
Stars: ✭ 121 (+706.67%)
Mutual labels:  styleguide, style-guide
Sscss
Light Sass lib for managing your font-size, margin, padding, and position values across breakpoints.
Stars: ✭ 119 (+693.33%)
Mutual labels:  styleguide, style-guide
Catalog
Create living style guides using Markdown or React
Stars: ✭ 1,527 (+10080%)
Mutual labels:  styleguide, style-guide
Nodebestpractices
✅ The Node.js best practices list (December 2021)
Stars: ✭ 72,734 (+484793.33%)
Mutual labels:  styleguide, style-guide
eslint-config-fullstack
A complete ESLint config file to help students avoid errors and learn best practices
Stars: ✭ 16 (+6.67%)
Mutual labels:  eslint-config, eslintconfig
Swift
Airbnb's Swift Style Guide.
Stars: ✭ 1,165 (+7666.67%)
Mutual labels:  styleguide, style-guide

eslint-config-mingelz

Version

A shared ESLint configuration with Chinese comments by mingelz.

一份带有完整中文注释的 ESLint 规则。请打开 rules 目录下的文件,阅读每个规则的详细说明。


Quick start | 快速开始

Installation | 安装

npm install eslint-config-mingelz --save-dev

Configure | 配置

Add a .eslintrc.js file with following content to your project root directory:
在项目根目录下新建 .eslingrc.js 文件,并写入下列内容:

module.exports = {
  env: {
    browser: true,
    node: true,
  },
  extends: [
    'mingelz',
  ],
}

Documentation | 文档

Basic configuration | 基本配置

NOTICE: This configuration is dependent on eslint@^7.24, please install it manually: npm install -D eslint.
注意: 此配置依赖 eslint@^7.24,请先手动安装此依赖: npm install -D eslint

module.exports = {
  env: {
    browser: true,
    node: true,
  },
  extends: [
    'mingelz',
  ],
  rules: {
    // your special rules
    // 你的需要补充的规则
  },
}

Vue configuration | Vue 配置

NOTICE: This configuration is dependent on eslint-plugin-vue@^7.9, please install it manually: npm install -D eslint-plugin-vue.
注意: 此配置依赖 eslint-plugin-vue@^7.9,请先手动安装此依赖: npm install -D eslint-plugin-vue

module.exports = {
  // ...
  extends: [
    'mingelz',
    // The configuration will detect Vue.js version of your project automatic.
    // 此配置会自动检查你使用的 Vue.js 版本,并开启相应规则
    'mingelz/rules/vue',
  ],
  // ...
}

React configuration | React 配置

NOTICE: This configuration is dependent on eslint-plugin-react@^7.23, please install it manually: npm install -D eslint-plugin-react
注意: 此配置依赖 eslint-plugin-react@^7.23,请先手动安装此依赖: npm install -D eslint-plugin-react

module.exports = {
  // ...
  extends: [
    'mingelz',
    'mingelz/rules/react',
  ],
  // ...
}

Node.js configuration | Node.js 配置

The ESLint built-in Node.js/CommonJS-specific rules are deprecating, use eslint-plugin-node instead.
ESLint 自带的 Node.js/CommonJS 规则已废弃,请使用 eslint-plugin-node 替代。

NOTICE: This configuration is dependent on eslint-plugin-node@^11.1, please install it manually: npm install -D eslint-plugin-node
注意: 此配置依赖 eslint-plugin-node@^11.1,请先手动安装此依赖: npm install -D eslint-plugin-node

module.exports = {
  // ...
  extends: [
    'mingelz',
    'mingelz/rules/node',
  ],
  // ...
}

ES Module configuration | ES Module 配置

NOTICE: This configuration is dependent on eslint-plugin-import@^2.23, please install it manually: npm install -D eslint-plugin-import
注意: 此配置依赖 eslint-plugin-import@^2.23,请先手动安装此依赖: npm install -D eslint-plugin-import

If you are using Webpack resolve.alias, it is recommended to install eslint-import-resolver-webpack via npm install -D eslint-import-resolver-webpack, and configure it according to the webpack configuration file.
如果你正在使用 Webpack 的 resolve.alias 能力,建议通过命令 npm install -D eslint-import-resolver-webpack 安装 eslint-import-resolver-webpack 插件,并参照下述代码正确配置你的 Webpack 配置文件路径。

module.exports = {
  // ...
  extends: [
    'mingelz',
    'mingelz/rules/es-module',
  ],
  settings: {
    'import/resolver': {
      // webpack config example
      // webpack 配置示例
      webpack: {
        config: './webpack.config.js',
      },
    },
  },
  // ...
}

JSDoc configuration | JSDoc 配置

The ESLint built-in JSDoc rules was deprecated, use eslint-plugin-jsdoc instead.
ESLint 自带的 JSDoc 规则已废弃,请使用 eslint-plugin-jsdoc 替代。

NOTICE: This configuration is dependent on eslint-plugin-jsdoc@32.2, please install it manually: npm install -D eslint-plugin-jsdoc
注意: 此配置依赖 eslint-plugin-jsdoc@^32.2,请先手动安装此依赖: npm install -D eslint-plugin-jsdoc

module.exports = {
  // ...
  extends: [
    'mingelz',
    'mingelz/rules/jsdoc',
  ],
  // ...
}

[WIP] JSX accessibility configuration | [未完成] JSX 无障碍配置

NOTICE: This configuration is dependent on eslint-plugin-jsx-a11y, please install it manually: npm install -D eslint-plugin-jsx-a11y
注意: 此配置依赖 eslint-plugin-jsx-a11y,请先手动安装此依赖: npm install -D eslint-plugin-jsx-a11y

module.exports = {
  // ...
  extends: [
    'mingelz',
    'mingelz/rules/jsx-a11y',
  ],
  // ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].