Skip to content

ESLINT common config for vue3 - projects in DSB

License

Notifications You must be signed in to change notification settings

dsb-norge/eslint-config-dsb-vue3

Repository files navigation

eslint-config-dsb-vue3

npm version GitHub license

Installation

The default export contains all default ESLint rules for JavaScript Standard Style , including the recommended ruleset for Vue, and the ones listed in the rules section .

Note: It requires some peerDependencies as well.

Install the package with:

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:

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

Usage

Now add the config to either your package.json:

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

or to your .eslintrc:

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

or to your .eslintrc.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.