Skip to content
ESlint config used for Nuxt.js
Branch: master
Clone or download
Latest commit 6bc9855 May 20, 2019

README.md

Nuxt ESLint Config

Build Status npm (scoped with tag) npm

ESlint config used for Nuxt.js.

Usage

Do you want to add the config to your own projects? There you go:

  1. Add this package to your devDependencies
$ npm i -D @nuxtjs/eslint-config
# or
$ yarn add -D @nuxtjs/eslint-config
  1. Add the peerDependencies to your project
$ npm i -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-jest eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint-plugin-vue
# or
$ yarn add -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-jest eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint-plugin-vue
  1. Create a .eslintrc file

  2. Extend our config (you can use just the scope name as ESLint will assume the eslint-config prefix):

{
  "extends": [
    "@nuxtjs"
  ]
}

Full example

A full example .eslintrc for a project with babel support:

Dont forget to npm i -D babel-eslint or yarn add -D babel-eslint

{
  "root": true,
  "parserOptions": {
    "parser": "babel-eslint",
    "sourceType": "module"
  },
  "extends": [
    "@nuxtjs"
  ]
}

License

Setup inspired by eslint-config-standard

MIT - Nuxt.js team

You can’t perform that action at this time.