Socket
Socket
Sign inDemoInstall

eslint-config-molindo

Package Overview
Dependencies
14
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-molindo

Molindo ESLint config that implements our styleguide and helps to catch errors.


Version published
Weekly downloads
494
increased by6.7%
Maintainers
1
Install size
36.8 MB
Created
Weekly downloads
 

Changelog

Source

7.0.0

Features

  • Enable react/function-component-definition to have auto fix for using functions of React components (fixes #75)
  • Enable react/no-unstable-nested-components (fixes #77)
  • Enable {checksVoidReturn: {attributes: false}} for @typescript-eslint/no-misused-promises (fixes #86)
  • Enable @typescript-eslint/ban-ts-comment (fixes #89)
  • Upgrade available major versions of dependencies (@typescript-eslint/eslint-plugin)
  • Add molindo/tailwind

Fixes

  • Detect **/*.{e2e,cy}.{js,jsx,ts,tsx} as test files (fixes #67)
  • Change import/no-extraneous-dependencies rule configuration to allow dev dependencies in all files since it has too many false positives otherwise (fixes #71)
  • Add cy and Cypress globals when cypress config is used (fixes #79)
  • Disable no-use-before-define for TypeScript files (fixes #91)

Breaking changes

  • Require eslint@^8.45
  • eslint-config-molindo/setupPlugins has been removed, since it's no longer necessary (fixes #59)
  • Removed typescript from dependencies (consumers should install this)
  • CSS modules-related rules were moved to molindo/css-modules
  • Upstream breaking changes
    1. @typescript-eslint/eslint-plugin & @typescript-eslint/eslint-plugin
    2. eslint-plugin-jest
    3. prettier
    4. eslint-plugin-prettier
    5. eslint-plugin-unicorn (upgraded from v41 to v48)

Readme

Source

eslint-config-molindo

Goals

  1. Find errors that are detectable with static analysis.
  2. Make reading code easier by providing consistent code style.
  3. Make writing code faster by leveraging auto fix wherever possible.

Usage

  1. yarn add eslint eslint-config-molindo --dev
  2. Setup your project config in .eslintrc.js:
module.exports = {
  // Add configs based on your needs
  extends: [
    'molindo/typescript', // Or `molindo/javascript`
    
    'molindo/react', // Optional
    'molindo/css-modules', // Optional
    'molindo/tailwind', // Optional
    'molindo/jest', // Optional
    'molindo/cypress' // Optional
  ]
}
  1. If you use TypeScript, add "extends": "eslint-config-molindo/tsconfig.json" to your tsconfig.json.
  2. Happy linting!

Further configuration

Environment

Set the env in .eslintrc as necessary so ESLint doesn't report missing globals.

E.g.:

{
  "browser": true,
  "node": true,
  "es6": true,
  "jest": true
}

Editor integration

It's strongly recommended to use an eslint integration for your editor of choice (e. g. dbaeumer.vscode-eslint for VSCode so you see warnings and errors while writing code. Also the setting to auto fix errors on save should be turned on, so purely stylistic errors such as the ones reported by prettier are fixed automatically.

If your linter plugin checks your code as you type (before you save) it can be helpful to silence stylistic errors to reduce noise and let the formatting happen on save.

Versioning

  • Patch releases are for improved documentation, fixing a rule to stop reporting false positives and internal code changes.
  • Minor releases are for changes to rules that can automatically be fixed.
  • Major releases happen when rules are changed that can't be fixed automatically.

Keywords

FAQs

Last updated on 11 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc