All Projects → Jocs → Eslint_docs

Jocs / Eslint_docs

🇨🇳A translation of ESLint Documents, including configration and rules.

Labels

Projects that are alternatives of or similar to Eslint docs

Eslint Plugin Redux Saga
ESLint rules for redux-saga
Stars: ✭ 134 (-17.79%)
Mutual labels:  eslint
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (-13.5%)
Mutual labels:  eslint
Eslint Plugin Boundaries
Eslint plugin checking architecture boundaries between elements
Stars: ✭ 157 (-3.68%)
Mutual labels:  eslint
Igcommit
Git pre-receive hook to check commits and code style
Stars: ✭ 135 (-17.18%)
Mutual labels:  eslint
Gatsby V2 Tutorial Starter
Gatsby V2 Starter - product of step by step tutorial
Stars: ✭ 139 (-14.72%)
Mutual labels:  eslint
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-11.04%)
Mutual labels:  eslint
Eslint Plugin Unicorn
Various awesome ESLint rules
Stars: ✭ 2,157 (+1223.31%)
Mutual labels:  eslint
Awesome Vue Cli3 Example
🦅 Awesome example for rapid Vue.js development using vue-cli3 .
Stars: ✭ 160 (-1.84%)
Mutual labels:  eslint
Book
《现代化前端工程师权威指南》https://guoyongfeng.github.io/book/
Stars: ✭ 141 (-13.5%)
Mutual labels:  eslint
Vue Webpack Config
Koa2、Webpack、Vue、React、Node
Stars: ✭ 151 (-7.36%)
Mutual labels:  eslint
Open Rest
Standard rest server, Base on restify and sequelize
Stars: ✭ 136 (-16.56%)
Mutual labels:  eslint
Redux React Starter
DEPRECATED use the new https://github.com/didierfranc/react-webpack-4
Stars: ✭ 137 (-15.95%)
Mutual labels:  eslint
React Itunes Search
🎵Simple web app for itunes search with React
Stars: ✭ 147 (-9.82%)
Mutual labels:  eslint
React Native Boilerplate
A React Native boilerplate with Expo, Redux, React Navigation, Styled Components and some 💕 included.
Stars: ✭ 135 (-17.18%)
Mutual labels:  eslint
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-4.29%)
Mutual labels:  eslint
React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (-17.79%)
Mutual labels:  eslint
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (-11.66%)
Mutual labels:  eslint
Eslint Config Alloy
Progressive ESLint config for your React/Vue/TypeScript projects
Stars: ✭ 2,202 (+1250.92%)
Mutual labels:  eslint
Eslint Watch
ESLint with simple watching capabilities
Stars: ✭ 159 (-2.45%)
Mutual labels:  eslint
Lighthouse Badges
🚦Generate badges (shields.io) based on Lighthouse performance.
Stars: ✭ 150 (-7.98%)
Mutual labels:  eslint

ESLint 配置及规则说明

一、项目中包含:

**Rules:**该文件夹中包含了ESLint Rules的中文翻译(暂不包含v2.0.0新增Rules)。

Configration: 该文件夹内包含一个ESLint配置说明文件。

.eslintrc: 该文件是可以是你项目中有且仅有ESLint的配置文件,不包含规则简要解释。

eslintrc.json: 该文件可以是你项目中有且仅有ESLint的配置文件,包含简要的规则解释。

Migrating-to-v2.0.0: ESLint迁移至v2.0.0手册,和Rules和Configration相关部分进行了翻译。

二、配置文件使用说明

1. 安装依赖:

package.json文件中添加如下依赖(如果没有package.son文件需首先通过npm init 创建package.son 文件):

"devDependencies": {
    "babel-core": "^6.5.2",
    "babel-eslint": "^4.1.8",
    "eslint": "^2.1.0",
    "eslint-plugin-promise": "^1.0.8",
    "eslint-plugin-standard": "^1.3.2"
  }

运行如下命令:

npm install

2. 将文件夹中的eslintrc.json文件放置在项目根目录

并将eslintrc.json重命名为.eslintrc(或者直接使用文件夹中的.eslintrc文件)

3. 修改配置文件

根据自己项目需要,在配置文件中globals配置项中添加项目所需全局变量:举个栗子:

"globals": {
    "document": true,
    "navigator": true,
    "window": true,
    "angular":true //添加项目所需没有申明的全局变量
  },

4. 让ESLint运行起来

修改package.json文件。在script 配置项中添加如下代码:举个栗子:

  "scripts": {
    "lint": "eslint app.jsx test" //其中app.jsx test需要替换成你项目需要检测的文件或文件夹
  },

命令行运行如下代码:

npm run lint

好了,现在就可以在终端看检测结果了。

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].