Code Monkey home page Code Monkey logo

eslint-config's Introduction

@dhzh/eslint-config

npm

Special Statement: This project comes from @antfu/eslint-config. The two are almost the same, with only some differences to meet personal needs. In order to seek convenience and prevent some conflicts between the upstream branch and my own changes after forking, I chose to copy instead of fork.

Differences from @antfu/eslint-config:

  1. With semi: semi: true.
  2. Always arrow parens: arrowParens: true.
  3. Explicitly use 1tbs as brace style: braceStyle: '1tbs'.
  4. Disabled antfu's top level function rule: 'antfu/top-level-function': 'off'.
  5. Always curly:
  • 'antfu/curly': 'off'
  • 'curly': ['error', 'all']
  1. This eslint-config will enable ts/consistent-type-imports rule. But it will cause compile issue in nest projects. So I disabled it in this config in nest framework.
  2. Support '**/*.?([cm])js and '**/*.?([cm])jsx files in react projects.

Usage

Starter Wizard

We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config with one command.

pnpm dlx @dhzh/eslint-config@latest

Manual Install

If you prefer to set up manually:

pnpm i -D eslint @dhzh/eslint-config

And create eslint.config.mjs in your project root:

// eslint.config.mjs
import dhzh from '@dhzh/eslint-config';

export default dhzh();

License

MIT License © 2022-PRESENT Easton Zheng

eslint-config's People

Contributors

dhzhme avatar ezhme avatar

Stargazers

 avatar  avatar Roman avatar  avatar

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.