Skip to content
Snippets Groups Projects
.eslintrc.js 755 B
Newer Older
  • Learn to ignore specific revisions
  • Christoph Wurst's avatar
    Christoph Wurst committed
    module.exports = {
    
    Kevin Ndung'u's avatar
    Kevin Ndung'u committed
    	root: true,
    	env: {
    		node: true,
    
    Christoph Wurst's avatar
    Christoph Wurst committed
    		amd: true,
    		jquery: true,
    		mocha: true,
    
    Kevin Ndung'u's avatar
    Kevin Ndung'u committed
    	},
    
    	plugins: [
    		'nextcloud',
    	],
    
    Kevin Ndung'u's avatar
    Kevin Ndung'u committed
    	extends: [
    		'plugin:vue/recommended',
    		'plugin:prettier/recommended',
    
    Christoph Wurst's avatar
    Christoph Wurst committed
    		'prettier/vue',
    		'eslint:recommended',
    
    Kevin Ndung'u's avatar
    Kevin Ndung'u committed
    	],
    	rules: {
    		'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    		'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    
    Christoph Wurst's avatar
    Christoph Wurst committed
    		'no-unused-vars': 'off',
    		'vue/no-v-html': 'off',
    		'no-case-declarations': 'off',
    
    		'nextcloud/no-deprecations': 'warn',
    		'nextcloud/no-removed-apis': 'error',
    
    Kevin Ndung'u's avatar
    Kevin Ndung'u committed
    	},
    	parserOptions: {
    		parser: 'babel-eslint',
    	},
    
    Christoph Wurst's avatar
    Christoph Wurst committed
    	globals: {
    		expect: true,
    		OC: true,
    		OCA: true,
    		t: true,
    		__webpack_public_path__: true,
    		__webpack_nonce__: true,
    	}
    
    Christoph Wurst's avatar
    Christoph Wurst committed
    }