Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

datawrapper/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A shared set of eslint rules to be used across Datawrapper projects.

To use this config, install it via NPM:

npm install -D @datawrapper/eslint-config

Then you can include it in your project's eslint configuration, which most probably lives in its package.json:

"eslintConfig": {
    "extends": "@datawrapper/eslint-config"
}

For chart embeds, there is a particular restrictive set of rules that limits the use of certain window and document attributes:

"eslintConfig": {
    "extends": "@datawrapper/eslint-config/chart-plugin"
}

This config does not include the necessary parser and plugins for use with Svelte. Here's how the eslint-config for a chart plugin would look in practice:

"eslintConfig": {
    "parser": "babel-eslint",
    "extends": [
        "@datawrapper/eslint-config/chart-plugin",
        "plugin:@tivac/svelte/svelte"
    ],
    "plugins": [
        "html",
        "@tivac/svelte"
    ]
},

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published