<commit_before>/**
 * © 2017 Liferay, Inc. <https://liferay.com>
 *
 * SPDX-License-Identifier: MIT
 */

'use strict';

const fs = require('fs');
const local = require('./utils/local');

const config = {
	env: {
		es6: true,
	},
	extends: ['eslint:recommended', require.resolve('eslint-config-prettier')],
	parserOptions: {
		ecmaVersion: 2017,
		sourceType: 'module',
	},
	plugins: [local('liferay'), 'no-for-of-loops', 'no-only-tests', 'notice'],
	rules: {
		'default-case': 'error',
		'liferay/no-it-should': 'error',
		'liferay/padded-test-blocks': 'error',
		'no-console': ['error', {allow: ['warn', 'error']}],
		'no-for-of-loops/no-for-of-loops': 'error',
		'no-only-tests/no-only-tests': 'error',
		'no-return-assign': ['error', 'always'],
		'no-unused-expressions': 'error',
		'no-unused-vars': ['error', {argsIgnorePattern: '^_'}],
		'object-shorthand': 'error',
		'prefer-const': 'error',
		'quote-props': ['error', 'as-needed'],
		radix: 'error',
		'sort-keys': ['error', 'asc', {caseSensitive: true, natural: true}],
	},
};

if (fs.existsSync('copyright.js')) {
	config.rules['notice/notice'] = [
		'error',
		{
			templateFile: 'copyright.js',
		},
	];
}<commit_msg>feat: turn off no-control-regex rule (#80)<commit_after>/**
 * © 2017 Liferay, Inc. <https://liferay.com>
 *
 * SPDX-License-Identifier: MIT
 */

'use strict';

const fs = require('fs');
const local = require('./utils/local');

const config = {
	env: {
		es6: true,
	},
	extends: ['eslint:recommended', require.resolve('eslint-config-prettier')],
	parserOptions: {
		ecmaVersion: 2017,
		sourceType: 'module',
	},
	plugins: [local('liferay'), 'no-for-of-loops', 'no-only-tests', 'notice'],
	rules: {
		'default-case': 'error',
		'liferay/no-it-should': 'error',
		'liferay/padded-test-blocks': 'error',
		'no-console': ['error', {allow: ['warn', 'error']}],
		'no-control-regex': 'off',
		'no-for-of-loops/no-for-of-loops': 'error',
		'no-only-tests/no-only-tests': 'error',
		'no-return-assign': ['error', 'always'],
		'no-unused-expressions': 'error',
		'no-unused-vars': ['error', {argsIgnorePattern: '^_'}],
		'object-shorthand': 'error',
		'prefer-const': 'error',
		'quote-props': ['error', 'as-needed'],
		radix: 'error',
		'sort-keys': ['error', 'asc', {caseSensitive: true, natural: true}],
	},
};

if (fs.existsSync('copyright.js')) {
	config.rules['notice/notice'] = [
		'error',
		{
			templateFile: 'copyright.js',
		},
	];
}
{'fraction_non_alphanumeric': 0.24483043837882548, 'fraction_numerical': 0.008271298593879239, 'mean_word_length': 4.375555555555556, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '28154', 'n_tokens_mistral': 994, 'n_tokens_neox': 944, 'n_words': 167}