npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-config-vaadin

v1.0.0-alpha.28

Published

Vaadin base JS/TS ESLint config

Downloads

3,092

Readme

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",
    // ... other project configs
    "vaadin/prettier"
  ]
}

vaadin/typescript

A config that extends vaadin/javascript with the TypeScript linting rules.

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

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

vaadin/typescript-requiring-type-checking

A config that extends vaadin/typescript with the TypeScript linting rules that require type information.

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.

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 requires vaadin/prettier which must be added after any other configs.

{
  "parserOptions": {
    "project": "path/to/your/tsconfig.json"
  },
  "extends": [
    "vaadin/typescript-requiring-type-checking",
    // ... other project 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"
  ]
}

vaadin/sort

A config that enables alphabetical sorting for objects, enums, JSX props, and exports. It serves as a substitute for the ESLint sort-keys rule, which lacks an auto-fixer. Please be aware that the ESLint team has a significant reason for not implementing an auto-fixer for this rule (see here). Use the config with caution.

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

Examples

Lit + JavaScript

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

Lit + TypeScript

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

Or, you can use a more strict config that requires type information:

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

License

Apache License 2.0