New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-metarhia

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-metarhia - npm Package Versions

13

8.2.2

Diff

timur.shemsedinov
published 8.2.1 •

Changelog

Source

[8.2.1][] - 2023-07-20

  • Update dependencies and package file structure
timur.shemsedinov
published 8.2.0 •

Changelog

Source

[8.2.0][] - 2023-07-06

  • Updated: consistent-return
timur.shemsedinov
published 8.1.0 •

Changelog

Source

[8.1.0][] - 2022-06-21

  • Updated: arrow-parens, handle-callback-err, operator-linebreak
timur.shemsedinov
published 8.0.0 •

Changelog

Source

[8.0.0][] - 2022-06-04

  • Dependencies updated to latest versions
  • ECMAScript 13 (2022) features support

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

<a name="7.0.0"></a>

timur.shemsedinov
published 7.0.1 •

belochub
published 7.0.0 •

Changelog

Source

7.0.0 (2019-02-01)

Features

  • rules: change space-before-function-paren for async functions (#26) (c5922b2)
  • rules: disallow unnecessary return await (#27) (d49c1ac)

BREAKING CHANGES

  • rules: with this change it is an error to not have a space before function parentheses in an async function declaration.

Before:

const a = async() => {};

After:

const a = async () => {};
  • rules: with this it is an error to use return await in an async function where it doesn't bring any benefits. Note that separate await and then return or return await inside of the try-catch block are still allowed.

This is an error:

async function foo() {
  return await bar();
}

These are not:

async function foo() {
  await bar();
  return;
}
async function foo() {
  try {
    return await bar();
  } catch (e) {}
}

<a name="6.1.0"></a>

belochub
published 6.1.0 •

Changelog

Source

6.1.0 (2018-12-07)

Features

  • rules: add parserOptions and set ecmaVersion to 2018 (#24) (18d8cd5)
  • rules: enable allowTemplateLiterals option for quotes rule (#23) (00e3ac2)

<a name="6.0.0"></a>

belochub
published 6.0.0 •

Changelog

Source

6.0.0 (2018-10-22)

Features

  • rules: add no-extra-parens rule (#21) (226fc9c)
  • rules: add no-return-assign rule (#19) (e8838ed)
  • rules: remove implicit-arrow-linebreak rule (#20) (d4f68d9)

BREAKING CHANGES

  • rules: with this change it is allowed to use parentheses only where they are necessary, except for arrow conditionals (to avoid conflicts with no-confusing-arrow rule), return assignments (to avoid conflicts with no-return-assign rule) and nested binary expressions (where parentheses can be used for clarity).

Before:

a = (b * c);

typeof (a);

const fn = () => (
  doSomething()
);

After:

a = b * c;

typeof a;

const fn = () => doSomething();
  • rules: before, it was possible to use assignment operators in a return statement without using parentheses, which could lead to some mistakes, where assignment operators are used in place of the comparison operators.

Before:

function doSomething() {
  return foo = bar + 2;
}

After:

function doSomething() {
  return foo === bar + 2;
}

// or

function doSomething() {
  return (foo = bar + 2);
}

<a name="5.0.0"></a>

belochub
published 5.0.0 •

Changelog

Source

5.0.0 (2018-09-28)

Features

  • rules: add consistent-return rule (#15) (e91c939)
  • rules: enforce curly braces on multiline blocks (#16) (3132fdc)

BREAKING CHANGES

  • rules: before this change, it was possible to have a function that used the return statement with a value only in some of its execution paths. This rule enforces function to explicitly return a value in every execution path if at least one execution path returns a value.

Before:

function doSomething(condition) {
    if (condition) {
        return true;
    } else {
        return;
    }
}

After:

function doSomething(condition) {
    if (condition) {
        return true;
    } else {
        return false;
    }
}

// or

function doSomething(condition) {
    if (condition) {
        return true;
    }
    return false;
}
  • rules: before this change, it was allowed to avoid the use of block statements (curly braces) with if, else, for, while, and do, when there is only one statement in the block. After this change, omitting the curly braces is only allowed when the statement is on the same line as if, else if, else, for, while, or do. Also, this change enforces consistency in the usage of curly braces for if, else if and else chains.

Before:

if (foo)
  bar();

if (x) a();
else {
  b();
  c();
}

After:

if (foo) bar();

// or

if (foo) {
  bar();
}

if (x) {
  a();
} else {
  b();
  c();
}

Some of the problems reported by this rule can be fixed via eslint --fix.

<a name="4.0.0"></a>

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc