0.0.4 • Published 1 year ago

editor-info v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

editor-info

Get details about the current editor environment.

Installation

yarn add editor-info

Usage

import editor from 'editor-info'

console.log(editor.isEditor)
// -> true

Example

When you want disable some ESLint rules in your editor.

// .eslintrc.js
const {isEditor} = require('editor-info')

module.exports = {
  root: true,
  extends: ['@fisker'],
  rules: {
    'no-console': isEditor ? 'off' : 'error',
  },
}

Supported Editors

NameConstant
Atomeditor.ATOM
Visual Studio Codeeditor.VSCODE

This package is heavily inspired by ci-info.

0.0.4

1 year ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago