Socket
Book a DemoInstallSign in
Socket

eslint-config-oberon

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-oberon

Oberon's eslint config

3.0.2
latest
Source
npmnpm
Version published
Weekly downloads
61
22%
Maintainers
5
Weekly downloads
 
Created
Source

Oberon ESLint config & standard

The Oberon javascript code standard & config.

Codestyle

The gist

The config consists of a lot of rules, we'll summarize them here, but for the full set, see below.

  • Semicolons at the end of each statement.
  • camelCasing should be used on all object properties.
  • Always use curly brace conventions. Even if your block only consists of a single statement.
  • Single quotes are the default. But use double quotes within JSX.
  • Indents with 4 spaces, no tabs allowed.
  • Always use === for comparing equality
  • Don't use var, use const/let instead.
  • Don't declare multiple variables on a single line. Except for uninitialized variables. This is allowed:
const a, b, c;

This isn't:

const a = false, b = true, c = false;
  • Console/debugger calls will be marked as warnings. They should not be added to production code.

Usage

Add a .eslintrc file to your project:

{
    "extends": "oberon"
}

OR add the following to your project's package.json

{
    ...
    "eslintConfig": {
        "extends": "oberon"
    }
}

Install eslint & eslint-config-oberon locally (npm i eslint eslint-config-oberon -D)

  • npm i lint-staged husky -D
  • Add the following to your package.json:
    "husky": {
        "hooks": {
            "pre-commit": "npm run typecheck && lint-staged"
        }
    }

FAQs

Package last updated on 25 Nov 2021

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.