module.exports = {
	root: true,
	env: {
		browser: true,
		node: true
	},
	parser: 'vue-eslint-parser',
	plugins: [ '@typescript-eslint' ],
	extends: [
		'eslint:recommended',
		'plugin:@typescript-eslint/eslint-recommended',
		'plugin:@typescript-eslint/recommended',
		'plugin:@typescript-eslint/recommended-requiring-type-checking',
		'prettier/@typescript-eslint'
	],
	parserOptions: {
		tsconfigRootDir: 'src',
		project: [ '../tsconfig.json' ],
		parser: '@typescript-eslint/parser',
		ecmaVersion: 2020,
		sourceType: 'module'
	},
	rules: {
		'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
		'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
		'@typescript-eslint/ban-ts-ignore': 'off',
		'@typescript-eslint/explicit-function-return-type': 'off',
		'@typescript-eslint/no-explicit-any': 'off',
		'@typescript-eslint/no-var-requires': 'off',
		'@typescript-eslint/no-empty-function': 'off',
		'vue/custom-event-name-casing': 'off',
		'no-use-before-define': 'off',
		// 'no-setting-before-define': [
		//   'error',
		//   {
		//     functions: false,
		//     classes: true,
		//   },
		// ],
		'@typescript-eslint/no-use-before-define': 'off',
		// '@typescript-eslint/no-setting-before-define': [
		//   'error',
		//   {
		//     functions: false,
		//     classes: true,
		//   },
		// ],
		'@typescript-eslint/ban-ts-comment': 'off',
		'@typescript-eslint/ban-types': 'off',
		'@typescript-eslint/no-non-null-assertion': 'off',
		'@typescript-eslint/explicit-module-boundary-types': 'off',
		'@typescript-eslint/no-unused-vars': 'off',
		'@typescript-eslint/camelcase': 'off',
		'no-unused-vars': 'off',
		'space-before-function-paren': 'off',
		'vue/script-indent': 'off'
	},
	overrides: [
		{
			files: [ '*.vue' ],
			rules: {
				indent: 'off'
			}
		}
	]
};
