Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.87 KB

ENVIRONMENTS.md

File metadata and controls

54 lines (41 loc) · 1.87 KB

Environment Configurations

This module contains two different environment configurations for eslint (node and browser) that enable eslint globals common in those scenarios.

These environment configurations are utilized in the bundles that are included in this module and we highly recommend using those bundles in your eslint configs. However, you can consume these environment configurations individually if you'd like.

Node Environment

This module enables the below eslint env globals that are common in our node targetted codebases:

  • commonjs
  • es6
  • jasmine
  • jest
  • mocha
  • node
  • protractor

You can consume this environment configuration directly by adding the value: @swellaby/eslint-config/lib/env/node to the extends key in your eslint configuration file.

For example:

{
    "extends": [ "@swellaby/eslint-config/lib/env/node" ]
}

Browser Environment

This module enables the below eslint env globals that are common in our browser/web targetted codebases:

  • browser
  • es6
  • jasmine
  • jest
  • mocha
  • protractor

You can consume this environment configuration directly by adding the value: @swellaby/eslint-config/lib/env/browser to the extends key in your eslint configuration file.

For example:

{
    "extends": [ "@swellaby/eslint-config/lib/env/browser" ]
}

Back to Top