@kcom/eslint-config

7.0.3 • Public • Published

ESLINT configuration files

A collection of eslint-config modules that can be included within projects using package.json dependencies to avoid sharing code.

browser-es2009-script.js

Typical Usage

A Finesse Gadget using only old ES5 features. Output is NOT packed with webmake. Javascript can run natively in IE11 without transpiling or polyfills.

This file would've been located in the Finesse_Gadgets folder. It would've been the root .eslintrc.js file and overridden by files in sub-folders.

Originally sourced and shared between all gadgets from old to new ones.

Extends

  • eslint:recommended

  • airbnb-base


browser-es2015-script.js

Description

A Finesse Gadget using newer ES6/ES2015 features:

  • arrow functions
  • constants
  • default parameters
  • template strings
  • property shorthand
  • destructuring
  • classes
  • promises

A Finesse Gadget that could be transpiled, using Babel, and packed with webmake.

Output can run in IE11 with polyfills and/or transpiling. Code will work natively in Chrome/Firefox.

Originally sourced and shared between all gadgets from old to new ones, but not transpiled or using gulp & webmake.

Extends

  • browser-es2009-script.js


browser-es2018-script.js

Description

A Finesse Gadget using newer ES8/ES2018 features:

  • Rest/Spread Properties
  • Asynchronous Iteration
  • Promise.finally
  • Template Literal Revision

A Finesse Gadget that could be transpiled, using Babel, and packed with webmake.

Output can run in IE11 with polyfills and/or transpiling. Code will work natively in Chrome/Firefox.

Originally sourced and developed for screenpop2.0 project which was the first to use this combination, with gulp & webmake support.

Extends

  • browser-es2015-script


How to use these files in your project

To use this module you simply need to write a package.json file and include the module. You DO NOT need to be transpiling, packing, etc. when creating the package.json.

Firstly, add some devDependencies to include this package within your source project.

package.json

  "devDependencies": {
    "@kcom/eslint-config": "^5.0.7",
  }

Secondly, create a .eslintrc.js file in your source folder and ensure you extend the required configuration:

.eslintrc.js

module.exports = {
  "extends": "@kcom/eslint-config/browser-es2009-script.js",
};

You can override any settings by editing your .eslintrc.js file as you would normally.

browser-es2018-script-typescript.js

Description

A Javascript or Typescript Finesse Gadget using newer ES8/ES2018 features:

  • Rest/Spread Properties
  • Asynchronous Iteration
  • Promise.finally
  • Template Literal Revision
  • Typescript support

A Finesse Gadget that could be transpiled, using Babel, and packed with webmake.

Output can run in IE11 with polyfills and/or transpiling. Code will work natively in Chrome/Firefox.

Designed whilst developing a Typescript gadget using the Scaffold tool.

Extends

  • browser-es2018-script


How to use these files in your project

To use this module you simply need to write a package.json file and include the module. You DO NOT need to be transpiling, packing, etc. when creating the package.json.

Firstly, add some devDependencies to include this package within your source project.

package.json

  "devDependencies": {
    "@kcom/eslint-config": "^5.0.7",
  }

Secondly, create a .eslintrc.js file in your source folder and ensure you extend the required configuration:

.eslintrc.js

module.exports = {
  "extends": "@kcom/eslint-config/browser-es2009-script.js",
};

You can override any settings by editing your .eslintrc.js file as you would normally.

Readme

Keywords

Package Sidebar

Install

npm i @kcom/eslint-config

Weekly Downloads

3

Version

7.0.3

License

ISC

Unpacked Size

13.2 kB

Total Files

8

Last publish

Collaborators

  • andysteel1
  • msreeves