SoybeanJS's eslint config presets with prettier

Overview

SoybeanJS's eslint config presets

  • Auto fix for formatting with prettier
  • Mulit config presets: JavaScript, TypeScript, Vue, React, ReactNative, Svelte and Solid
  • Lint also for html, json, yaml, markdown
  • Reasonable defaults, best practices, only one-line of config
  • Default Alias mapping "@" => "src", "~" => "./"

Package

eslint-config-soybeanjs-base

this is base config, lints for JacaScript, HTML, JSON, yaml, markdown.

eslint-config-soybeanjs-ts

this config extends soybeanjs-base, and it lints for TypeScript.

eslint-config-soybeanjs

this config equals to soybeanjs-ts

eslint-config-soybeanjs-vue

this config extends soybeanjs-ts, and it lints for Vue3

eslint-config-soybeanjs-vue2

this config extends soybeanjs-ts, and it lints for Vue2

eslint-config-soybeanjs-react

this config extends soybeanjs-ts, and it lints for React

eslint-config-soybeanjs-react-native

this config extends soybeanjs-react, and it lints for React Native

eslint-config-soybeanjs-svelte

this config extends soybeanjs-ts, and it lints for Svelte

eslint-config-soybeanjs-solid

this config extends soybeanjs-ts, and it lints for Solid

Usage

Install

pnpm i -D eslint

pnpm i -D eslint-config-soybeanjs # equals to soybeanjs-ts
pnpm i -D eslint-config-soybeanjs-base # base
pnpm i -D eslint-config-soybeanjs-ts # for TypeScript
pnpm i -D eslint-config-soybeanjs-vue # for Vue3
pnpm i -D eslint-config-soybeanjs-vue2 # for Vue2
pnpm i -D eslint-config-soybeanjs-react # for React
pnpm i -D eslint-config-soybeanjs-react-native # for React Native
pnpm i -D eslint-config-soybeanjs-svelte # for Svelte
pnpm i -D eslint-config-soybeanjs-solid # for Solid

Config eslint (.eslintrc | .eslintrc.js | .eslintrc.json)

{
  "extends": "soybeanjs" // or soybeanjs-base, soybeanjs-ts, soybeanjs-vue, soybeanjs-vue2, soybeanjs-react, soybeanjs-react-native, soybeanjs-svelte, soybeanjs-solid
}

You don't need .eslintignore normally as it has been provided by the preset.

Change import alias

{
  "settings": {
    "import/resolver": {
      "alias": { // default alias
        "map": [
          ["~", "."],
          ["@", "./src"]
        ],
        "extensions": [".js", ".jsx", ".mjs", ".ts", ".tsx", "mts", ".d.ts"]
      }
    }
  }
}

Add scripts for package.json

For example:

{
  "scripts": {
    "lint": "eslint . --fix"
  }
}
You might also like...

💻 A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools.

⚡ Next Typescript Template ⚡ A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools. Quic

Nov 23, 2022

😊 NextJS Template with Tailwindcss, Eslint, Prettier.

Next.js + Tailwind CSS Example By Pedromdsn Deploy your own Deploy the example using Vercel or preview live with StackBlitz How to use Execute create-

Sep 27, 2022

🤏 Codely's ESLint + Prettier configuration

🤏 Codely's ESLint + Prettier configuration

Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import statements. Valid for your JavaScript or TypeScript projects 🤟

Dec 29, 2022

Quickly bootstrap your next TypeScript REST API project. Node 16+, auto OpenAPI, Prettier+ESLint, Jest

REST API template with autogenerated OpenAPI Quickly bootstrap your next TypeScript REST API project with the most up to date template. Included a sam

Oct 1, 2022

A template for your NestJS projects including Typescript, Eslint, Prettier, Jest and Docker.

A template for your NestJS projects including Typescript, Eslint, Prettier, Jest and Docker.

NestJS Template Quickly start a new NestJS project A template for your NestJS projects including Typescript, Eslint, Prettier, Jest and Docker. ⏩ Gett

Oct 7, 2022

A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Docker.

A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Docker.

Next.js Template Quickly start a new Next.js project A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Do

Oct 7, 2022

A template for your Node.js projects including Typescript, Eslint, Prettier, Jest and Docker.

A template for your Node.js projects including Typescript, Eslint, Prettier, Jest and Docker.

Node.js Template Quickly start a new Node.js project A template for your Node.js projects including Typescript, Eslint, Prettier, Jest and Docker. ⏩ G

Oct 12, 2022

A Nextjs-Typescript boilerplate , configured with Tailwindcss, Eslint, Prettier, Lint-staged ,Husky and commitizen

Minimal Nextjs Typescript boilerplate A Minimal Next-Typescript boilerplate to quickly and easily bootstrap your next project. Comes pre-configured wi

Nov 4, 2022

Repository for the LogRocket meetup: Configuring ESLint And Prettier For TypeScript. ✨

logrocket-eslint-prettier-typescript ✨ Configuring ESLint And Prettier For TypeScript ✨ Join Josh Goldberg on October 21st at 2 p.m. EDT and learn how

Dec 21, 2022
Owner
Soybean
Soybean
Soybean's eslint config presets

Soybean's eslint config presets Auto fix for formatting with prettier TypeScript, Vue, React out-of-box Lint also for json, yaml, markdown Sorted impo

Soybean 38 Dec 21, 2022
✨ An Eslint config to improve your code

eslint-config-descartes ✨ An Eslint config to improve your code by Descartes Team How to use? 1 - Install Eslint npm instal eslint-config-descartes es

Descartes 4 Dec 21, 2022
vite-react-typescript with eslint and prettier predefined settings

Vite + React + Typescript + Eslint + Prettier A starter for React with Typescript with the fast Vite and all static code testing with Eslint and forma

The Sword Breaker 315 Dec 30, 2022
Rollup + Babel + Prettier + Strict ESlint + VSCode - Enterprise grade boilerplate

Javascript package boilerplate by HackingBay Rollup + Babel + Prettier + Strict ESlint + VSCode - Enterprise grade boilerplate Minimalist js package b

HackingBay 1 Dec 28, 2021
Rollup + React + Babel + Prettier + Strict ESlint and Stylelint + Sass + VSCode + Playground app - Enterprise grade boilerplate

React package boilerplate by HackingBay Rollup + React 17 + Babel + Prettier + Strict ESlint and Stylelint + Sass + VSCode + Playground app - Enterpri

HackingBay 2 Jan 19, 2022
🚀Starter project with Angular 13, Ngx-admin, NestJS, Nx Workspace, Jest, Cypress, ESLint & Prettier 🚀

Angular 13 + Ngx-admin + NestJs + NX Starter project with Angular 13, Ngx-admin, NestJs, Nx Workspace, Jest, Cypress, ESLint & Prettier Features ✅ Ang

Wilfried 49 Jan 4, 2023
💅 A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, Prettier, GitHub Action releases and more.

Electron App ??  A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, P

Dalton Menezes 155 Dec 29, 2022
Remix + Cloudflare Workers + Wrangler2 + Tailwind + ESLint + Prettier + Vitest + Playwright

Welcome to Remix! Remix Docs Development You will be running two processes during development: The Miniflare server (miniflare is a local environment

null 48 Dec 19, 2022
Create a new project with Next.js, TypeScript, Eslint, Prettier in just 1 second and you don't need to setup anything.

Next + TypeScript + Eslint + Prettier Template ?? Create a new project with Next.js, TypeScript, Eslint, Prettier in just 1 second and you don't need

Hung Minh 11 Oct 2, 2022
TypeScript + Nextjs + Tailwind => TNT🧨 (plus Prettier and ESLint configuration).

Bye bye next boilerplate, welcome to TNT! About This is TNT, Nextjs boilerplate powered by Typescript, Tailwind. This template also has customized ESL

Arvîn mostafaei 15 Aug 7, 2022