@nekogaming/eslint-config-esnext

4.1.1 • Public • Published

eslint-config-esnext

Pluggable [ESLint](https://eslint.org/docs/about/) [config](https://eslint.org/docs/developer-guide/shareable-configs) for [ECMAScript Next](https://kangax.github.io/compat-table/esnext) that you can import, extend and override

Updated outdated and deprecated packages.

Join the chat at https://gitter.im/kunalgolani/eslint-config npm version npm downloads GitHub issues Deps Dev Deps

ESNext: Safety Checks and Best Practices with a bias toward code concision / brevity

Usage

In your js project directory:

npm install --save-dev eslint-config-esnext

And in your .eslintrc.yaml:

extends:
  - esnext

Alternatively, in your .eslintrc.js or .eslintrc.json:

{
  "extends": ["esnext"]
}

To add a git-hook to your commits, consider using husky

npm install --save-dev husky

And in your package.json:

  "scripts": {
    "precommit": "eslint ."
  }

Config

This config is biased and opinionated, and errs on the side of too many rules instead of too few. Think of this as a superset of your repo's lint config, and discard what you don't like in it. It's easy to override and disable the rules you find inconvenient.

env:
  es6: true
  commonjs: true

enables ES6 features and CommonJS modules

parser: babel-eslint

enables parsing all babel supported code

parserOptions:
  ecmaVersion: 7
  sourceType: module
  ecmaFeatures:
    impliedStrict: true
    modules: true
    experimentalObjectRestSpread: true

allows es2015 modules and es2016 object rest and spread to be parsed, and applies strict mode to all js code

extends:
  - eslint:recommended
  - plugin:import/errors
  - plugin:import/warnings

includes the following rules:

rules:

selected from here, configured to:


ESNext Style Guide

Package Sidebar

Install

npm i @nekogaming/eslint-config-esnext

Weekly Downloads

1

Version

4.1.1

License

ISC

Unpacked Size

35.8 kB

Total Files

7

Last publish

Collaborators

  • thakyz