/nuxtjs, vuejs, eslint

Custom linting rules in NuxtJS and eslint

NuxtJS is a fantastic framework for creating VueJS applications. It comes bundled with Vue Router, Vuex, Vue Server Renderer and many more. All configured for you out of the box.
The problem I have with it, it comes with linting options set to force 2 spaces as indentation. I'm a "tab" guy, so making me use spaces for indentation drove me crazy. It took me a while to make eslint understand I want different rules in my project. Below is a version of .eslintrc.js file that worked for me.

Obviously, I assume you've selected eslint while installing NuxtJS, so you have all the necessary modules installed. Below config has been tested with (at the time of writing this post) latest version of NuxtJS 2.8.1

module.exports = {
	root: true,
	env: {
		browser: true,
		node: true
	parserOptions: {
		parser: 'babel-eslint'
	extends: [
	// add your custom rules here
	rules: {
		'nuxt/no-cjs-in-config': 'off',
		'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
		'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
		'vue/html-indent': ['error', 'tab'],
		'vue/html-closing-bracket-newline': 'off',
		'indent': [2, 'tab'],
		'no-tabs': 'off'

Go to official eslint VueJS plugin page for documentation oother rules that might suite your taste.