How to use eslint-config-xo - 3 common examples

To help you get started, we’ve selected a few eslint-config-xo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ChocPanda / eslint-config-xo-vue / src / base.js View on Github external
},
		env: {
			browser: true,
			es6: true
		},
		plugins: ['vue'],
		rules: {
			// 'vue/no-deprecated-scope-attribute': 'warn',
			// 'vue/keyword-spacing': xoConfigRules['keyword-spacing'],
			// 'vue/dot-location': xoConfigRules['dot-location'],
			// 'vue/no-empty-pattern': xoConfigRules['no-empty-pattern'],
			'vue/attribute-hyphenation': ['error', 'always'],
			'vue/attributes-order': 'warn',
			'vue/block-spacing': 'warn',
			'vue/brace-style': xoConfigRules['brace-style'],
			'vue/camelcase': xoConfigRules.camelcase,
			'vue/comma-dangle': xoConfigRules['comma-dangle'],
			'vue/comment-directive': ['error'],
			'vue/component-name-in-template-casing': [
				'error',
				'PascalCase',
				{ registeredComponentsOnly: false }
			],
			'vue/eqeqeq': xoConfigRules.eqeqeq,
			'vue/html-closing-bracket-newline': [
				'error',
				{
					singleline: 'never',
					multiline: 'always'
				}
			],
			'vue/html-closing-bracket-spacing': [
github ChocPanda / eslint-config-xo-vue / src / base.js View on Github external
// 'vue/keyword-spacing': xoConfigRules['keyword-spacing'],
			// 'vue/dot-location': xoConfigRules['dot-location'],
			// 'vue/no-empty-pattern': xoConfigRules['no-empty-pattern'],
			'vue/attribute-hyphenation': ['error', 'always'],
			'vue/attributes-order': 'warn',
			'vue/block-spacing': 'warn',
			'vue/brace-style': xoConfigRules['brace-style'],
			'vue/camelcase': xoConfigRules.camelcase,
			'vue/comma-dangle': xoConfigRules['comma-dangle'],
			'vue/comment-directive': ['error'],
			'vue/component-name-in-template-casing': [
				'error',
				'PascalCase',
				{ registeredComponentsOnly: false }
			],
			'vue/eqeqeq': xoConfigRules.eqeqeq,
			'vue/html-closing-bracket-newline': [
				'error',
				{
					singleline: 'never',
					multiline: 'always'
				}
			],
			'vue/html-closing-bracket-spacing': [
				'error',
				{
					startTag: 'never',
					endTag: 'never',
					selfClosingTag: 'always'
				}
			],
			'vue/html-end-tags': ['error'],
github ChocPanda / eslint-config-xo-vue / src / base.js View on Github external
const xoConfigRules = require('eslint-config-xo').rules;

module.exports = indent => {
	const defaultConfig = {
		parser: require.resolve('vue-eslint-parser'),
		parserOptions: {
			ecmaVersion: 2018,
			sourceType: 'module',
			ecmaFeatures: {
				jsx: true
			}
		},
		env: {
			browser: true,
			es6: true
		},
		plugins: ['vue'],

eslint-config-xo

ESLint shareable config for XO

MIT
Latest version published 25 days ago

Package Health Score

80 / 100
Full package analysis