🤏 Codely's ESLint + Prettier configuration

Overview

🤏 Codely's ESLint + Prettier configuration

Codely Open Source CodelyTV Courses

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

Take a look, play and have fun with this. Stars are welcome 😊

👀 How to use

  1. Install the dependency
    npm install --save-dev eslint-config-codely
  2. Add it to your .eslintrc.js file:
    {
      extends: [ "eslint-config-codely" ]
    }
  3. If you are using TypeScript, extend the TypeScript configuration instead, and point to your tsconfig.json in parserOptions:
    {
      extends: [ "eslint-config-codely/typescript" ],
      parserOptions: {
        project: ["./tsconfig.json"],
      },
    }

ℹ️ Please note that some of the rules enabled by default require that you have strict: true in your tsconfig.json.

🤔 What it does

👌  Codely Code Quality Standards

Publishing this package we are committing ourselves to the following code quality standards:

  • 🤝 Respect Semantic Versioning: No breaking changes in patch or minor versions
  • 🤏  No surprises in transitive dependencies: Use the bare minimum dependencies needed to meet the purpose
  • 🎯  One specific purpose to meet without having to carry a bunch of unnecessary other utilities
  •  Tests as documentation and usage examples
  • 📖 Well documented ReadMe showing how to install and use
  • ⚖️ License favoring Open Source and collaboration
You might also like...

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

A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

ExpressJs-Boilerplate An ExpressJs boilerplate configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses

Mar 8, 2023

This package includes some opinionated configuration for ESLint.

eslint-config-float This package includes some opinionated configuration for ESLint, used at Float and friends. Installation You can install and use t

Jan 7, 2022

This package includes the sensible ESLint configuration used by our team

TypeScript + Prettier ESLint configuration for CasterlyApp team (and others)

Jan 26, 2022
Comments
  • fix typescript member oredering not working

    fix typescript member oredering not working

    Hola, cómo están?

    Los cambios que hice, son debido a que con typescript, no estaba leyendo correctamente la configuración de eslint, debido a que se le estaban pasando parámetros inexistentes al atributo @typescript-eslit/member-ordering.

    Con los cambios que hice, funciona nuevamente el linter, sin ningún problema.

    Me quedo a la espera de cualquier comment.

    Saludos!

    opened by francoborgiani 2
  • Parsing error

    Parsing error

    Hola codeliers, lo primero, gran trabajo como siempre.

    He estado probando la configuración y con las siguientes versiones:

    {
        "eslint": "^8.25.0",
        "eslint-config-codely": "^2.0.0",
        "eslint-config-prettier": "^8.5.0",
        "eslint-plugin-hexagonal-architecture": "^1.0.3",
        "prettier": "^2.7.1"
    }
    

    y configuración de .eslintrc.js con typescript:

    {
      extends: [ "eslint-config-codely/typescript" ],
      parserOptions: {
        project: ["./tsconfig.json"],
      },
    }
    

    Al lanzar "npx eslint ." en mi proyecto, me salta este error:

      0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
      The file does not match your project config: .eslintrc.js.
      The file must be included in at least one of the projects provided
    

    He comprobado que el error se soluciona al aplicar el parserOptions solamente a los ficheros "ts":

    {
      extends: [ "eslint-config-codely/typescript" ],
      overrides: [
        {
          files: ["**/*.ts"],
          parserOptions: {
            project: ["./tsconfig.json"],
          },
        }
      ]
    }
    

    No tengo claro si es un error de algunas versiones o que está pasando, pero esto me funcionó a mi. Por si a alguien le ayuda o se quiere actualizar en el README.md

    opened by xavikortes 2
  • unused-imports not installed

    unused-imports not installed

    Thanks for your work, first of all.

    I get a weird issue with the required packages. Your package.json lists several dependencies:

    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-simple-import-sort": "^7.0.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    

    All of them are installed fine, except eslint-plugin-unused-imports

    I do get it in my package-lock.json:

    imagen

    But it's not in the node_modules folder:

    imagen

    It is, however, inside your package's folder:

    imagen

    Because of that, linting fails in my IDE:

    imagen

    Tested in Ubuntu and MacOS. (node v16.17.0 & npm 8.15.0)

    opened by cmoralesweb 1
  • feat: do not sort union and intersection types

    feat: do not sort union and intersection types

    Why: After testing it out in a large codebase, we have seen that this rule warms the code readability instead of improving it. This is because we normally try to order type intersections conceptually. Examples:

    -export type ButtonVariations = "primary" | "secondary" | "tertiary" | "inverted"; // conceptually ordered. Better.
    +export type ButtonVariations = "inverted" | "primary" | "secondary" | "tertiary"; // alphabetically ordered. Worse.
    
    -size?: "small" | "medium" | "large" | "xl"; // conceptually ordered. Better.
    +size?: "large" | "medium" | "small" | "xl"; // alphabetically ordered. Worse.
    
    opened by JavierCane 0
Owner
CodelyTV
Code examples for our software development videos and courses
CodelyTV
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
💻 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

João Gabriel 13 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-

Pedro Nogueira 6 Sep 27, 2022
SoybeanJS's eslint config presets with prettier

SoybeanJS's eslint config presets Auto fix for formatting with prettier Mulit config presets: JavaScript, TypeScript, Vue, React, ReactNative, Svelte

Soybean 38 Dec 21, 2022