Coder Social home page Coder Social logo

eslint-config's Introduction

@ynan/eslint-config

统一各项目的 eslint 规范,规范基于eslint-config-alloy,项目内部会依赖所需要的 eslint 插件,无需单独安装 eslint 等插件。

使用方法

安装

npm install -D @ynan/eslint-config

配置

在根目录下增加.eslintrc.js 配置文件,将以下代码复制

//基础版本
module.exports = {
    extends: ['@ynan/eslint-config'],
    env: {
        // 这里填入你的项目用到的环境
        // 它们预定义了不同环境的全局变量,比如:
        //
        // browser: true,
        // node: true,
        // mocha: true,
        // jest: true,
        // jquery: true
    },
    globals: {
        // 这里填入你的项目需要的全局变量
        // false 表示这个全局变量不允许被重新赋值,比如:
        //
        // myGlobal: false
    },
    rules: {
        // 个性化配置,会覆盖默认配置
    }
};
//react+js
extends: ['@ynan/eslint-config/react'],
//react+ts
extends: ['@ynan/eslint-config/react-ts'],
//react-native+js
extends: ['@ynan/eslint-config/react-native'],
//react-native+ts
extends: ['@ynan/eslint-config/react-native-ts'],

其他

配合 prettier 代码格式化可用 @ynan/prettier-config

eslint-config's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.