1. eslint-config-gbv
Internal linting rules for GBV projects.
eslint-config-gbv
Package: eslint-config-gbv
Created by: gbv
Last modified: Mon, 09 Oct 2023 09:23:16 GMT
Version: 1.1.0
License: MIT
Downloads: 69
Repository: https://github.com/gbv/eslint-config-gbv

Install

npm install eslint-config-gbv
yarn add eslint-config-gbv

eslint-config-gbv

License

Internal linting rules for GBV projects.

Table of Contents

Install

 npm i -D eslint-config-gbv

If you don't have eslint installed in your project yet, you need to do this:

 # For all projects (works with v6 and v7):
npm i -D eslint
# Additionally for Vue.js projects:
npm i -D eslint-plugin-vue

Usage

Add the following to you ESLint config:

 "extends": [
  "gbv"
]

For Vue.js projects, use the following instead (replace 2 with 3 for Vue 3 projects):

 "extends": [
  "gbv",
  "gbv/vue/2"
]

Please enforce linting before a commit in all projects.

Rules

General

Using eslint:recommended as a base, with the following overriding rules:

  • Indentation: Two spaces, indent case in switch statements.
  • Unix style line endings.
  • Double quotes.
  • Disallow quotes around object literal property names if they are not needed.
  • No semicolons.
  • Enforce comma dangle on multiline statements (see this).
  • Allow console.
  • Control statement brace style:
    • Enforce curly braces for all control statements.
    • Disallow single-line curly braces.

Vue.js

Using plugin:vue/recommended/plugin:vue/vue3-recommended as a base, with the following overriding rules:

  • Allow v-html.
  • No closing bracket newline.
  • One space for closing brackets on self-closing tags.

Maintainers

Contribute

PRs are welcome, but we only use this for our own project and it shouldn't be of much interest for anyone else.

If editing the README, please conform to the standard-readme specification.

License

MIT @2020 Verbundzentrale des GBV (VZG)

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin