Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dsb-norge/eslint-config-dsb-vue3

ESLINT common config for vue3 - projects in DSB
https://github.com/dsb-norge/eslint-config-dsb-vue3

Last synced: 21 days ago
JSON representation

ESLINT common config for vue3 - projects in DSB

Awesome Lists containing this project

README

        

# eslint-config-dsb-vue3

[![npm version](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue3.svg)](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue3)
[![GitHub license](https://img.shields.io/npm/l/@dsb-norge/eslint-config-dsb-vue3)](https://github.com/dsb-norge/eslint-config-dsb-vue3/blob/master/LICENSE.md)

## Installation

The default export contains all default [ESLint rules](https://github.com/standard/eslint-config-standard) for [JavaScript Standard Style](http://standardjs.com/) , including
the [recommended ruleset for Vue](https://eslint.vuejs.org/), and the ones listed in the [rules section](https://github.com/dsb-norge/eslint-config-dsb-vue3/blob/master/index.js) .

Note: It requires some peerDependencies as well.

Install the package with:

```sh
npx install-peerdeps --dev @dsb-norge/eslint-config-dsb-vue3
```

Then install the correct versions of each peerDependency package, which are
listed by the command:

```sh
npm info "@dsb-norge/eslint-config-dsb-vue3@latest" peerDependencies
```

## Usage

Now add the config to either your `package.json`:

```json
{
"eslintConfig": {
"extends": "@dsb-norge/dsb-vue3"
}
}
```

or to your `.eslintrc`:

```json
{
"extends": "@dsb-norge/dsb-vue3"
}
```

or to your `.eslintrc.js`:

```js
module.exports = {
extends: '@dsb-norge/dsb-vue3'
}
```

## Assumptions

This ESLint configuration comes with some fundamental assumptions:

- vue.js 3 and/or node environment
- browser and/or node environment
- vite

Despite some assumptions, [you can easily overwrite, extend and unset
rules and any other setting in your custom eslint config](https://eslint.org/docs/user-guide/configuring).