Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-vaadin

Package Overview
Dependencies
Maintainers
13
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-vaadin

Vaadin base JS/TS ESLint config

  • 1.0.0-alpha.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
531
increased by4.73%
Maintainers
13
Weekly downloads
 
Created
Source

eslint-config-vaadin

ESLint shareable config for the Vaadin JavaScript style guide

Installation

npm install --save-dev eslint-config-vaadin

or

yarn add --dev eslint-config-vaadin

Usage

After you have installed eslint-config-vaadin, you should be able to extend the following configs in the extends section of your ESLint configuration.

Available Configs

vaadin/javascript

A config that contains the JavaScript linting rules.

This config requires vaadin/prettier which must be added after any other configs.

{
  "extends": [
    "vaadin/javascript",
    // ... any other configs
    "vaadin/prettier"
  ]
}

vaadin/typescript

A config that contains the TypeScript linting rules.

This config is designed on top of the vaadin/javascript config so you don't have to enable the JavaScript config when using this one.

This config requires vaadin/prettier which must be added after any other configs.

{
  "extends": [
    "vaadin/typescript",
    // ... any other configs
    "vaadin/prettier"
  ]
}

vaadin/typescript-requiring-type-checking

A config that contains the TypeScript linting rules that require type information.

This config requires tsconfig.json at the project root with the include section that includes all the files that are referenced in your project. If your tsconfig.json is located somewhere other than the project root, you can use the parserOptions.project property.

This config can be used in addition to vaadin/typescript to make it more strict.

Please note that adding this config to your project can significantly affect linting performance since it requires TypeScript to build the whole project before ESLint can do its linting.

{
  "parserOptions": {
    "project": "path/to/your/tsconfig.json"
  },
  "extends": [
    "vaadin/typescript",
    "vaadin/typescript-requiring-type-checking",
    // ... any other configs
    "vaadin/prettier"
  ]
}

vaadin/lit

A config that contains the linting rules for tagged Lit templates.

This config is designed on top of the eslint-plugin-lit plugin.

This config is supposed to be used in combination with vaadin/javascript or vaadin/typescript.

{
  "extends": [
    "vaadin/lit"
  ]
}

vaadin/imports

A config that contains the linting rules for imports.

This config is designed on top of the eslint-plugin-import plugin. Please note that adding this config to your project can significantly affect linting performance.

This config is supposed to be used in combination with vaadin/javascript or vaadin/typescript.

{
  "extends": [
    "vaadin/imports"
  ]
}

vaadin/testing

A config that overrides some linting rules and sets up the eslint-plugin-chai-friendly plugin for test files.

This config is supposed to be used in combination with vaadin/javascript or vaadin/typescript.

{
  "extends": [
    "vaadin/testing"
  ]
}

Examples

Lit + JavaScript

{
  "extends": [
    "vaadin/javascript",
    "vaadin/lit",
    "vaadin/testing",
    "vaadin/prettier"
  ]
}

Lit + TypeScript

{
  "extends": [
    "vaadin/typescript",
    "vaadin/typescript-requiring-type-checking",
    "vaadin/lit",
    "vaadin/testing",
    "vaadin/prettier"
  ]
}

License

Apache License 2.0

Keywords

FAQs

Package last updated on 02 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc